Hello community,

here is the log from the commit of package ocfs2-tools for openSUSE:Factory 
checked in at 2020-05-07 14:56:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocfs2-tools (Old)
 and      /work/SRC/openSUSE:Factory/.ocfs2-tools.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ocfs2-tools"

Thu May  7 14:56:57 2020 rev:76 rq:801080 version:1.8.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/ocfs2-tools/ocfs2-tools.changes  2020-02-05 
19:43:29.315318744 +0100
+++ /work/SRC/openSUSE:Factory/.ocfs2-tools.new.2738/ocfs2-tools.changes        
2020-05-07 14:57:07.638577657 +0200
@@ -1,0 +2,6 @@
+Wed May  6 11:30:20 UTC 2020 - [email protected]
+
+- Fix debugfs.ocfs2 error on devices with sector size 4096 (bsc#1170530)
+  + debugfs.ocfs2-Fix-the-error-on-devices-with-sector-s.patch
+
+-------------------------------------------------------------------

New:
----
  debugfs.ocfs2-Fix-the-error-on-devices-with-sector-s.patch

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

Other differences:
------------------
++++++ ocfs2-tools.spec ++++++
--- /var/tmp/diff_new_pack.wZH66v/_old  2020-05-07 14:57:08.782579719 +0200
+++ /var/tmp/diff_new_pack.wZH66v/_new  2020-05-07 14:57:08.782579719 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ocfs2-tools
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -60,6 +60,7 @@
 Patch502:       fsck.ocfs2-fix-compile-error-when-glibc-upgrade.patch
 Patch503:       mounted.ocfs2-use-sys-sysmacros.h-include-for-makede.patch
 Patch504:       fix-build-failure-with-glibc-2.28.patch
+Patch505:       debugfs.ocfs2-Fix-the-error-on-devices-with-sector-s.patch
 
 BuildRequires:  autoconf
 BuildRequires:  e2fsprogs-devel
@@ -172,6 +173,7 @@
 %patch502 -p1
 %patch503 -p1
 %patch504 -p1
+%patch505 -p1
 
 %build
 %global _lto_cflags %{_lto_cflags} -ffat-lto-objects

++++++ debugfs.ocfs2-Fix-the-error-on-devices-with-sector-s.patch ++++++
>From 4ab576767129a89f3ff6d60c85c23c3be80c2dae Mon Sep 17 00:00:00 2001
From: Gang He <[email protected]>
Date: Wed, 6 May 2020 18:06:07 +0800
Subject: [PATCH] debugfs.ocfs2: Fix the error on devices with sector size 4096

Debugfs.ocfs2 can not work on devices with sector size 4096,
e.g.
 # debugfs.ocfs2 -s 1 /dev/sdd
 open: I/O error on channel Can't get the blocksize from the device by the num 1
 # blockdev --getss /dev/sdd
 4096

we should remove these line hard code, then debugfs.ocfs2 works on
different sector size devices.
---
 debugfs.ocfs2/commands.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/debugfs.ocfs2/commands.c b/debugfs.ocfs2/commands.c
index cc88583c..b1ee6172 100644
--- a/debugfs.ocfs2/commands.c
+++ b/debugfs.ocfs2/commands.c
@@ -482,14 +482,6 @@ static errcode_t get_blocksize(char* dev, uint64_t offset, 
uint64_t *blocksize,
        if (ret)
                goto bail;
 
-       /* since ocfs2_super_block inode can be stored in OCFS2_MIN_BLOCKSIZE,
-        * so here we just use the minimum block size and read the information
-        * in the specific offset.
-        */
-       ret = io_set_blksize(channel, OCFS2_MIN_BLOCKSIZE);
-       if (ret)
-               goto bail;
-
        ret = ocfs2_malloc_block(channel, &buf);
        if (ret)
                goto bail;
@@ -507,7 +499,7 @@ static errcode_t get_blocksize(char* dev, uint64_t offset, 
uint64_t *blocksize,
                offset = hdr->hdr_superblocks[super_no-1] * hdr->hdr_fsblksz;
        }
 
-       blkno = offset / OCFS2_MIN_BLOCKSIZE;
+       blkno = offset / io_get_blksize(channel);
        ret = io_read_block(channel, blkno, 1, buf);
        if (ret)
                goto bail;
-- 
2.21.0


Reply via email to