forked from pool/ocfs2-tools
Accepting request 801080 from network:ha-clustering:Factory
OBS-URL: https://build.opensuse.org/request/show/801080 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocfs2-tools?expand=0&rev=76
This commit is contained in:
commit
4d7d34416b
49
debugfs.ocfs2-Fix-the-error-on-devices-with-sector-s.patch
Normal file
49
debugfs.ocfs2-Fix-the-error-on-devices-with-sector-s.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 4ab576767129a89f3ff6d60c85c23c3be80c2dae Mon Sep 17 00:00:00 2001
|
||||||
|
From: Gang He <ghe@suse.com>
|
||||||
|
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
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 6 11:30:20 UTC 2020 - ghe@suse.com
|
||||||
|
|
||||||
|
- Fix debugfs.ocfs2 error on devices with sector size 4096 (bsc#1170530)
|
||||||
|
+ debugfs.ocfs2-Fix-the-error-on-devices-with-sector-s.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jan 30 10:29:12 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
|
Thu Jan 30 10:29:12 UTC 2020 - Thorsten Kukuk <kukuk@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package ocfs2-tools
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -60,6 +60,7 @@ Patch501: bnc#96864-ocfs2console-fix-starting-failure.patch
|
|||||||
Patch502: fsck.ocfs2-fix-compile-error-when-glibc-upgrade.patch
|
Patch502: fsck.ocfs2-fix-compile-error-when-glibc-upgrade.patch
|
||||||
Patch503: mounted.ocfs2-use-sys-sysmacros.h-include-for-makede.patch
|
Patch503: mounted.ocfs2-use-sys-sysmacros.h-include-for-makede.patch
|
||||||
Patch504: fix-build-failure-with-glibc-2.28.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: autoconf
|
||||||
BuildRequires: e2fsprogs-devel
|
BuildRequires: e2fsprogs-devel
|
||||||
@ -172,6 +173,7 @@ OCFS2 filesystem.
|
|||||||
%patch502 -p1
|
%patch502 -p1
|
||||||
%patch503 -p1
|
%patch503 -p1
|
||||||
%patch504 -p1
|
%patch504 -p1
|
||||||
|
%patch505 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||||
|
Loading…
Reference in New Issue
Block a user