Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ocfs2-tools for openSUSE:Factory 
checked in at 2022-03-23 20:18:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocfs2-tools (Old)
 and      /work/SRC/openSUSE:Factory/.ocfs2-tools.new.25692 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocfs2-tools"

Wed Mar 23 20:18:30 2022 rev:82 rq:964176 version:1.8.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocfs2-tools/ocfs2-tools.changes  2021-11-13 
22:49:08.501278298 +0100
+++ /work/SRC/openSUSE:Factory/.ocfs2-tools.new.25692/ocfs2-tools.changes       
2022-03-23 20:20:23.422531058 +0100
@@ -1,0 +2,6 @@
+Tue Mar 22 14:40:00 UTC 2022 - heming.z...@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
+
+-------------------------------------------------------------------

New:
----
  fsck.ocfs2-do-not-try-locking-after-replaying-journa.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ocfs2-tools.spec ++++++
--- /var/tmp/diff_new_pack.BZNfgn/_old  2022-03-23 20:20:24.166531478 +0100
+++ /var/tmp/diff_new_pack.BZNfgn/_new  2022-03-23 20:20:24.170531480 +0100
@@ -58,6 +58,7 @@
 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 @@
 %patch501 -p1
 %patch502 -p1
 %patch503 -p1
+%patch504 -p1
 
 %build
 %global _lto_cflags %{_lto_cflags} -ffat-lto-objects

++++++ fsck.ocfs2-do-not-try-locking-after-replaying-journa.patch ++++++
>From 7085e9177adc7197250d872c50a05dfc9c531bdc Mon Sep 17 00:00:00 2001
From: Konstantin N <b.m.k...@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.k...@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

Reply via email to