Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:openSUSE:Factory:rpmlint
parted
libparted-make-BLKRRPART-more-robust.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libparted-make-BLKRRPART-more-robust.patch of Package parted
From: Petr Uzel <petr.uzel@suse.cz> Subject: libparted: Make BLKRRPART more robust Patch-mainline: no, upstream does not use BLKRRPART and leaves DASDs broken --- libparted/arch/linux.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) Index: parted-3.3/libparted/arch/linux.c =================================================================== --- parted-3.3.orig/libparted/arch/linux.c +++ parted-3.3/libparted/arch/linux.c @@ -39,6 +39,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> #include <sys/sysmacros.h> @@ -3242,14 +3243,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 ( @@ -3259,10 +3261,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; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor