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-09-08 14:22:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocfs2-tools (Old)
 and      /work/SRC/openSUSE:Factory/.ocfs2-tools.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocfs2-tools"

Thu Sep  8 14:22:11 2022 rev:83 rq:1001671 version:1.8.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocfs2-tools/ocfs2-tools.changes  2022-03-23 
20:20:23.422531058 +0100
+++ /work/SRC/openSUSE:Factory/.ocfs2-tools.new.2083/ocfs2-tools.changes        
2022-09-08 14:22:47.582549747 +0200
@@ -1,0 +2,7 @@
+Fri Sep  7 10:26:00 UTC 2022 - [email protected]
+
+- enable defragfs.ocfs2 and honor upstream patch dump_fs_locks support v4 
(bsc#1203166)
+  + modify ocfs2_tools.spec to enable defragfs
+  + bug-1203166-dump_fs_locks-support-v4.patch
+
+-------------------------------------------------------------------

New:
----
  bug-1203166-dump_fs_locks-support-v4.patch

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

Other differences:
------------------
++++++ ocfs2-tools.spec ++++++
--- /var/tmp/diff_new_pack.eTXhVf/_old  2022-09-08 14:22:48.294551390 +0200
+++ /var/tmp/diff_new_pack.eTXhVf/_new  2022-09-08 14:22:48.302551408 +0200
@@ -55,10 +55,12 @@
 Patch228:       0007-Improve-error-message-if-DLM-service-is-unavailable.patch
 Patch405:       0007-vendor-Add-vendor-files-for-sles12.patch
 Patch406:       0008-ocfs2-tools-add-systemd-support-fix.patch
+# below are upstream patches
 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
+Patch505:       bug-1203166-dump_fs_locks-support-v4.patch
 
 BuildRequires:  autoconf
 BuildRequires:  e2fsprogs-devel
@@ -170,6 +172,7 @@
 %patch502 -p1
 %patch503 -p1
 %patch504 -p1
+%patch505 -p1
 
 %build
 %global _lto_cflags %{_lto_cflags} -ffat-lto-objects
@@ -218,8 +221,6 @@
 make DESTDIR="%{buildroot}" install
 cd ..
 
-rm %{buildroot}/sbin/defragfs.ocfs2
-rm %{buildroot}/%{_mandir}/man8/defragfs.ocfs2.8
 mv %{buildroot}/{,/usr}/sbin/o2image
 mv %{buildroot}/{,/usr}/sbin/debugfs.ocfs2
 #mv %{buildroot}/{,/usr}/sbin/ocfs2_controld.pcmk
@@ -272,6 +273,7 @@
 /sbin/mount.ocfs2
 /sbin/ocfs2_hb_ctl
 /sbin/o2cluster
+/sbin/defragfs.ocfs2
 %{_sbindir}/o2image
 %{_sbindir}/debugfs.ocfs2
 %{_sbindir}/o2hbmonitor
@@ -289,6 +291,7 @@
 %{_mandir}/man8/o2image.8.gz
 %{_mandir}/man8/o2cluster.8.gz
 %{_mandir}/man8/o2hbmonitor.8.gz
+%{_mandir}/man8/defragfs.ocfs2.8*
 %{_mandir}/man5/o2cb.sysconfig.5.gz
 %{_mandir}/man5/ocfs2.cluster.conf.5.gz
 %{_mandir}/man7/ocfs2.7.gz

++++++ bug-1203166-dump_fs_locks-support-v4.patch ++++++
>From ec2ee1c946ceefacb9f0df5d942d0a1dac40af9a Mon Sep 17 00:00:00 2001
From: Steffen Butzer <[email protected]>
Date: Sat, 16 Jul 2022 18:36:44 +0200
Subject: [PATCH] dump_fs_locks: support v4

---
 debugfs.ocfs2/dump_fs_locks.c | 42 +++++++++++++++++++++++++----------
 1 file changed, 30 insertions(+), 12 deletions(-)

diff --git a/debugfs.ocfs2/dump_fs_locks.c b/debugfs.ocfs2/dump_fs_locks.c
index 05f5227470b0..546213cdc210 100644
--- a/debugfs.ocfs2/dump_fs_locks.c
+++ b/debugfs.ocfs2/dump_fs_locks.c
@@ -225,13 +225,14 @@ static void dump_meta_lvb(const char *raw_lvb, FILE *out)
 }
 
 /* 0 = eof, > 0 = success, < 0 = error */
-static int dump_version_two_and_three(FILE *file, FILE *out, int v3)
+static int dump_version_two_or_more(FILE *file, FILE *out, int version)
 {
        unsigned long long num_prmode, num_exmode;
        unsigned int num_prmode_failed, num_exmode_failed;
        unsigned long long  total_prmode, total_exmode;
        unsigned long long  avg_prmode = 0, avg_exmode = 0;
        unsigned int max_prmode, max_exmode, num_refresh;
+       unsigned long long  last_prmode, last_exmode, wait;
        int ret;
 
 #define NSEC_PER_USEC   1000
@@ -244,7 +245,10 @@ static int dump_version_two_and_three(FILE *file, FILE 
*out, int v3)
                     "%llu\t"
                     "%u\t"
                     "%u\t"
-                    "%u",
+                    "%u\t"
+                    "%llu\t"
+                    "%llu\t"
+                    "%llu",
                     &num_prmode,
                     &num_exmode,
                     &num_prmode_failed,
@@ -253,13 +257,16 @@ static int dump_version_two_and_three(FILE *file, FILE 
*out, int v3)
                     &total_exmode,
                     &max_prmode,
                     &max_exmode,
-                    &num_refresh);
-       if (ret != 9) {
+                    &num_refresh,
+                    &last_prmode,
+                    &last_exmode,
+                    &wait);
+       if (ret != 12) {
                ret = -EINVAL;
                goto out;
        }
 
-       if (!v3) {
+       if (version < 3) {
                max_prmode /= NSEC_PER_USEC;
                max_exmode /= NSEC_PER_USEC;
        }
@@ -271,14 +278,26 @@ static int dump_version_two_and_three(FILE *file, FILE 
*out, int v3)
                avg_exmode = total_exmode/num_exmode;
 
        fprintf(out, "PR > Gets: %llu  Fails: %u    Waits Total: %lluus  "
-               "Max: %uus  Avg: %lluns\n",
+               "Max: %uus  Avg: %lluns",
                num_prmode, num_prmode_failed, total_prmode/NSEC_PER_USEC,
                max_prmode, avg_prmode);
+       if (version > 3) {
+               fprintf(out, " Last: %lluus", last_prmode);
+       }
+       fprintf(out, "\n");
        fprintf(out, "EX > Gets: %llu  Fails: %u    Waits Total: %lluus  "
-               "Max: %uus  Avg: %lluns\n",
+               "Max: %uus  Avg: %lluns",
                num_exmode, num_exmode_failed, total_exmode/NSEC_PER_USEC,
                max_exmode, avg_exmode);
-       fprintf(out, "Disk Refreshes: %u\n", num_refresh);
+       if (version > 3) {
+               fprintf(out, " Last: %lluus", last_exmode);
+       }
+       fprintf(out, "\n");
+       fprintf(out, "Disk Refreshes: %u", num_refresh);
+       if (version > 3) {
+               fprintf(out, " First Wait: %lluus", wait);
+       }
+       fprintf(out, "\n");
 
        ret = 1;
 out:
@@ -388,13 +407,13 @@ static int end_line(FILE *f)
        return 0;
 }
 
-#define CURRENT_PROTO 3
+#define CURRENT_PROTO 4
 /* returns 0 on error or end of file */
 static int dump_one_lockres(FILE *file, FILE *out, int lvbs, int only_busy,
                            struct list_head *locklist)
 {
        unsigned int version;
-       int ret, v3;
+       int ret;
        int skipped = 0;
 
        ret = fscanf(file, "%x\t", &version);
@@ -413,8 +432,7 @@ static int dump_one_lockres(FILE *file, FILE *out, int 
lvbs, int only_busy,
 
        if (!skipped) {
                if (version > 1) {
-                       v3 = !!(version == 3);
-                       ret = dump_version_two_and_three(file, out, v3);
+                       ret = dump_version_two_or_more(file, out, version);
                        if (ret <= 0)
                                return 0;
                }
-- 
2.26.2

Reply via email to