This commit is contained in:
parent
15999428e4
commit
b39e94864b
37
multipath-tools-kpartx-wrong-partition-offset
Normal file
37
multipath-tools-kpartx-wrong-partition-offset
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
commit 6d1bf23952e810ce41dd9f9d25e817eb56ecf93f
|
||||||
|
Author: Hannes Reinecke <hare@suse.de>
|
||||||
|
Date: Tue May 27 14:07:37 2008 +0200
|
||||||
|
|
||||||
|
kpartx: Fixup stacked device offset
|
||||||
|
|
||||||
|
For stacked devices we should calculate the offset relative to
|
||||||
|
the enclosing partition, not the entire device.
|
||||||
|
|
||||||
|
References: 394658
|
||||||
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||||
|
|
||||||
|
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
|
||||||
|
index 13d039d..68f17c8 100644
|
||||||
|
--- a/kpartx/kpartx.c
|
||||||
|
+++ b/kpartx/kpartx.c
|
||||||
|
@@ -467,6 +467,7 @@ main(int argc, char **argv){
|
||||||
|
d = c;
|
||||||
|
while (c) {
|
||||||
|
for (j = 0; j < n; j++) {
|
||||||
|
+ uint64_t start;
|
||||||
|
int k = slices[j].container - 1;
|
||||||
|
|
||||||
|
if (slices[j].size == 0)
|
||||||
|
@@ -492,10 +493,11 @@ main(int argc, char **argv){
|
||||||
|
}
|
||||||
|
strip_slash(partname);
|
||||||
|
|
||||||
|
+ start = slices[j].start - slices[k].start;
|
||||||
|
if (safe_sprintf(params, "%d:%d %" PRIu64,
|
||||||
|
slices[k].major,
|
||||||
|
slices[k].minor,
|
||||||
|
- slices[j].start)) {
|
||||||
|
+ start)) {
|
||||||
|
fprintf(stderr, "params too small\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 28 09:50:28 CEST 2008 - hare@suse.de
|
||||||
|
|
||||||
|
- Calculate correct partition offset in kpartx (bnc#394658)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 9 13:25:30 CEST 2008 - hare@suse.de
|
Fri May 9 13:25:30 CEST 2008 - hare@suse.de
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ Requires: device-mapper kpartx
|
|||||||
PreReq: %insserv_prereq %fillup_prereq coreutils grep diffutils
|
PreReq: %insserv_prereq %fillup_prereq coreutils grep diffutils
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 0.4.7
|
Version: 0.4.7
|
||||||
Release: 122
|
Release: 125
|
||||||
Summary: Tools to Manage Multipathed Devices with the device-mapper
|
Summary: Tools to Manage Multipathed Devices with the device-mapper
|
||||||
Source: multipath-tools-%{version}.tar.bz2
|
Source: multipath-tools-%{version}.tar.bz2
|
||||||
Source1: multipath.init.suse
|
Source1: multipath.init.suse
|
||||||
@ -39,6 +39,7 @@ Patch10: %{name}-remove-DAEMON-defines
|
|||||||
Patch11: %{name}-suse-build-fixes
|
Patch11: %{name}-suse-build-fixes
|
||||||
Patch12: %{name}-add-dm_linear
|
Patch12: %{name}-add-dm_linear
|
||||||
Patch13: %{name}-use-underscore-for-partnames
|
Patch13: %{name}-use-underscore-for-partnames
|
||||||
|
Patch14: %{name}-kpartx-wrong-partition-offset
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package provides the tools to manage multipathed devices by
|
This package provides the tools to manage multipathed devices by
|
||||||
@ -93,6 +94,7 @@ Authors:
|
|||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
%patch12 -p1
|
%patch12 -p1
|
||||||
%patch13 -p1
|
%patch13 -p1
|
||||||
|
%patch14 -p1
|
||||||
cp %{S:1} multipath/multipath.init.suse
|
cp %{S:1} multipath/multipath.init.suse
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -150,6 +152,8 @@ mkdir -p $RPM_BUILD_ROOT/var/cache/multipath/
|
|||||||
%{_mandir}/man8/kpartx.8*
|
%{_mandir}/man8/kpartx.8*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 28 2008 hare@suse.de
|
||||||
|
- Calculate correct partition offset in kpartx (bnc#394658)
|
||||||
* Fri May 09 2008 hare@suse.de
|
* Fri May 09 2008 hare@suse.de
|
||||||
- Fixup kpartx rules (bnc#387667)
|
- Fixup kpartx rules (bnc#387667)
|
||||||
* Tue Apr 29 2008 hare@suse.de
|
* Tue Apr 29 2008 hare@suse.de
|
||||||
|
Loading…
Reference in New Issue
Block a user