Accepting request 964176 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/964176 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocfs2-tools?expand=0&rev=82
This commit is contained in:
commit
f204e7fff6
54
fsck.ocfs2-do-not-try-locking-after-replaying-journa.patch
Normal file
54
fsck.ocfs2-do-not-try-locking-after-replaying-journa.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 7085e9177adc7197250d872c50a05dfc9c531bdc Mon Sep 17 00:00:00 2001
|
||||
From: Konstantin N <b.m.kast@gmail.com>
|
||||
Date: Thu, 3 Mar 2022 00:56:44 +0300
|
||||
Subject: [PATCH] fsck.ocfs2: do not try locking after replaying journals if -F
|
||||
is given
|
||||
|
||||
With -F option, `fsck.ocfs2` skips locking down the cluster, but not if
|
||||
the journals are replayed. If it has to replay the journals then it
|
||||
tries to lock down the cluster regardless of -F.
|
||||
|
||||
This fix moves the check to `fsck_lock_fs()` function so the flag
|
||||
is checked in any case when cluster locking is attempted.
|
||||
|
||||
Signed-off-by: Konstantin Neshin <b.m.kast@gmail.com>
|
||||
---
|
||||
fsck.ocfs2/fsck.c | 15 ++++++++-------
|
||||
1 file changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/fsck.ocfs2/fsck.c b/fsck.ocfs2/fsck.c
|
||||
index 757224f43846..13d68f9862f9 100644
|
||||
--- a/fsck.ocfs2/fsck.c
|
||||
+++ b/fsck.ocfs2/fsck.c
|
||||
@@ -707,6 +707,10 @@ static errcode_t fsck_lock_fs(o2fsck_state *ost)
|
||||
{
|
||||
errcode_t ret;
|
||||
|
||||
+ if (!(ost->ost_fs->fs_flags & OCFS2_FLAG_RW) || ost->ost_skip_o2cb ||
|
||||
+ ocfs2_mount_local(ost->ost_fs))
|
||||
+ return 0;
|
||||
+
|
||||
ret = o2cb_init();
|
||||
if (ret) {
|
||||
com_err(whoami, ret, "while initializing the cluster");
|
||||
@@ -986,13 +990,10 @@ int main(int argc, char **argv)
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (open_flags & OCFS2_FLAG_RW && !ost->ost_skip_o2cb &&
|
||||
- !ocfs2_mount_local(ost->ost_fs)) {
|
||||
- ret = fsck_lock_fs(ost);
|
||||
- if (ret) {
|
||||
- fsck_mask |= FSCK_ERROR;
|
||||
- goto close;
|
||||
- }
|
||||
+ ret = fsck_lock_fs(ost);
|
||||
+ if (ret) {
|
||||
+ fsck_mask |= FSCK_ERROR;
|
||||
+ goto close;
|
||||
}
|
||||
|
||||
printf("Checking OCFS2 filesystem in %s:\n", filename);
|
||||
--
|
||||
2.34.1
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 22 14:40:00 UTC 2022 - heming.zhao@suse.com
|
||||
|
||||
- fsck.ocfs2: do not try locking after replaying journals if -F is given (bsc#1196705)
|
||||
+ fsck.ocfs2-do-not-try-locking-after-replaying-journa.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 12 14:20:25 UTC 2021 - ghe@suse.com
|
||||
|
||||
|
@ -58,6 +58,7 @@ Patch406: 0008-ocfs2-tools-add-systemd-support-fix.patch
|
||||
Patch501: fixed-mounted.ocfs2-output-when-some-devices-are-Not.patch
|
||||
Patch502: update-mounted.ocfs2-mounted.c.patch
|
||||
Patch503: libocfs2-roll-back-when-dir_index-creation-fails.patch
|
||||
Patch504: fsck.ocfs2-do-not-try-locking-after-replaying-journa.patch
|
||||
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: e2fsprogs-devel
|
||||
@ -168,6 +169,7 @@ OCFS2 filesystem.
|
||||
%patch501 -p1
|
||||
%patch502 -p1
|
||||
%patch503 -p1
|
||||
%patch504 -p1
|
||||
|
||||
%build
|
||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||
|
Loading…
Reference in New Issue
Block a user