- Make informing the kernel by BLKRRPART (specific to s390) more
robust by sleeping between every retry and by placing exclusive file lock on the blockdevice (bnc#886005) - libparted-make-BLKRRPART-more-robust.patch OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=97
This commit is contained in:
parent
4f4200ec76
commit
987a8290eb
48
libparted-make-BLKRRPART-more-robust.patch
Normal file
48
libparted-make-BLKRRPART-more-robust.patch
Normal file
@ -0,0 +1,48 @@
|
||||
---
|
||||
libparted/arch/linux.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: parted-3.1/libparted/arch/linux.c
|
||||
===================================================================
|
||||
--- parted-3.1.orig/libparted/arch/linux.c
|
||||
+++ parted-3.1/libparted/arch/linux.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/utsname.h> /* for uname() */
|
||||
+#include <sys/file.h>
|
||||
#include <scsi/scsi.h>
|
||||
#include <assert.h>
|
||||
#ifdef ENABLE_DEVICE_MAPPER
|
||||
@@ -2901,14 +2902,15 @@ static int
|
||||
_kernel_reread_part_table (PedDevice* dev)
|
||||
{
|
||||
LinuxSpecific* arch_specific = LINUX_SPECIFIC (dev);
|
||||
- int retry_count = 9;
|
||||
+ int retry_count = 5;
|
||||
|
||||
sync();
|
||||
+ flock(arch_specific->fd, LOCK_EX);
|
||||
while (ioctl (arch_specific->fd, BLKRRPART)) {
|
||||
retry_count--;
|
||||
sync();
|
||||
- if (retry_count == 3)
|
||||
- sleep(1); /* Pause to allow system to settle */
|
||||
+
|
||||
+ sleep(1); /* Pause to allow system to settle */
|
||||
|
||||
if (!retry_count) {
|
||||
ped_exception_throw (
|
||||
@@ -2918,10 +2920,12 @@ _kernel_reread_part_table (PedDevice* de
|
||||
"table on %s (%s). As a result, it may not "
|
||||
"reflect all of your changes until after reboot."),
|
||||
dev->path, strerror (errno));
|
||||
+ flock(arch_specific->fd, LOCK_UN);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
+ flock(arch_specific->fd, LOCK_UN);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 18 10:10:07 UTC 2014 - puzel@suse.com
|
||||
|
||||
- Make informing the kernel by BLKRRPART (specific to s390) more
|
||||
robust by sleeping between every retry and by placing
|
||||
exclusive file lock on the blockdevice (bnc#886005)
|
||||
- libparted-make-BLKRRPART-more-robust.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 16 13:14:09 UTC 2014 - puzel@suse.com
|
||||
|
||||
|
@ -64,6 +64,7 @@ Patch36: libparted-add-support-for-EAV-DASD-partitions.patch
|
||||
Patch37: libparted-mklabel-to-support-EAV-DASD.patch
|
||||
Patch38: libparted-Avoid-dasd-as-default-disk-type-while-probe.patch
|
||||
Patch39: libparted-mklabel-to-support-EDEV-DASD.patch
|
||||
Patch40: libparted-make-BLKRRPART-more-robust.patch
|
||||
Patch100: parted-fatresize-autoconf.patch
|
||||
Requires: /sbin/udevadm
|
||||
BuildRequires: check-devel
|
||||
@ -150,6 +151,7 @@ to develop applications that require these.
|
||||
%patch37 -p1
|
||||
%patch38 -p1
|
||||
%patch39 -p1
|
||||
%patch40 -p1
|
||||
%patch100 -p1
|
||||
|
||||
%build
|
||||
|
Loading…
x
Reference in New Issue
Block a user