45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
|
From 69cc320d6a8640dd8069e81ac02ee7d50fc1e8cd Mon Sep 17 00:00:00 2001
|
||
|
From: Petr Uzel <petr.uzel@suse.cz>
|
||
|
Date: Fri, 14 Feb 2014 09:12:47 +0100
|
||
|
Subject: [PATCH] Revert "linux: remove DASD restriction on
|
||
|
_disk_sync_part_table"
|
||
|
|
||
|
This reverts commit 9fa0e1800db5b9f094ae481fd95a51da03f19e95.
|
||
|
---
|
||
|
libparted/arch/linux.c | 21 +++++++++++++--------
|
||
|
1 file changed, 13 insertions(+), 8 deletions(-)
|
||
|
|
||
|
Index: parted-3.1/libparted/arch/linux.c
|
||
|
===================================================================
|
||
|
--- parted-3.1.orig/libparted/arch/linux.c
|
||
|
+++ parted-3.1/libparted/arch/linux.c
|
||
|
@@ -2919,15 +2919,20 @@ linux_disk_commit (PedDisk* disk)
|
||
|
return _dm_reread_part_table (disk);
|
||
|
#endif
|
||
|
if (disk->dev->type != PED_DEVICE_FILE) {
|
||
|
+ /* The ioctl() command BLKPG_ADD_PARTITION does not notify
|
||
|
+ * the devfs system; consequently, /proc/partitions will not
|
||
|
+ * be up to date, and the proper links in /dev are not
|
||
|
+ * created. Therefore, if using DevFS, we must get the kernel
|
||
|
+ * to re-read and grok the partition table.
|
||
|
+ */
|
||
|
+ /* Work around kernel dasd problem so we really do BLKRRPART */
|
||
|
+ int ok = 1;
|
||
|
+ if (disk->dev->type != PED_DEVICE_DASD && _have_blkpg ()) {
|
||
|
+ if (!_disk_sync_part_table (disk))
|
||
|
+ ok = 0;
|
||
|
+ }
|
||
|
|
||
|
- /* We now require BLKPG support. If this assertion fails,
|
||
|
- please write to the mailing list describing your system.
|
||
|
- Assuming it's never triggered, ...
|
||
|
- FIXME: remove this assertion in 2012. */
|
||
|
- assert (_have_blkpg ());
|
||
|
-
|
||
|
- if (!_disk_sync_part_table (disk))
|
||
|
- return 0;
|
||
|
+ return ok;
|
||
|
}
|
||
|
|
||
|
return 1;
|