diff options
author | Marius Vollmer <mvollmer@redhat.com> | 2016-05-25 09:58:30 +0300 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2016-11-23 15:59:53 +0100 |
commit | e168e59f40e2dca98f71e8d3bf6c0e83f0e0a527 (patch) | |
tree | e98fe8addc8a9d7398dabb5ea1fd7096b985759e | |
parent | cbea968971894643764b695c643cf65ff884d391 (diff) |
Revert "Reread partition table before wiping when creating new partitions"
This reverts commit 5c859c99df.
The BLKRRPART ioctl is dangerous in that it causes pairs of remove/add
uevents for all partitions which in turn confuse our internal data
structures and cause the block devices to briefly disappear from the
filesystem.
Rereading the partition table is also unnecessary since parted,
libblockdev, and udevd do that already.
Thus, 5c859c99df might actually make things worse instead of fixing the
bug it is intended to fix.
-rw-r--r-- | src/udiskslinuxpartitiontable.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/udiskslinuxpartitiontable.c b/src/udiskslinuxpartitiontable.c index 7870ca8..d3bd9c2 100644 --- a/src/udiskslinuxpartitiontable.c +++ b/src/udiskslinuxpartitiontable.c @@ -343,7 +343,6 @@ handle_create_partition (UDisksPartitionTable *table, uid_t caller_uid; gid_t caller_gid; gboolean do_wipe = TRUE; - gboolean was_partitioned = FALSE; GError *error; error = NULL; @@ -590,10 +589,6 @@ handle_create_partition (UDisksPartitionTable *table, /* this is sometimes needed because parted(8) does not generate the uevent itself */ udisks_linux_block_object_trigger_uevent (UDISKS_LINUX_BLOCK_OBJECT (object)); - was_partitioned = (udisks_object_peek_partition_table (object) != NULL); - if (was_partitioned) - udisks_linux_block_object_reread_partition_table (UDISKS_LINUX_BLOCK_OBJECT (object)); - /* sit and wait for the partition to show up */ g_warn_if_fail (wait_data->pos_to_wait_for > 0); wait_data->partition_table_object = object; @@ -649,9 +644,6 @@ handle_create_partition (UDisksPartitionTable *table, /* this is sometimes needed because parted(8) does not generate the uevent itself */ udisks_linux_block_object_trigger_uevent (UDISKS_LINUX_BLOCK_OBJECT (partition_object)); - if (was_partitioned) - udisks_linux_block_object_reread_partition_table (UDISKS_LINUX_BLOCK_OBJECT (object)); - udisks_partition_table_complete_create_partition (table, invocation, g_dbus_object_get_object_path (G_DBUS_OBJECT (partition_object))); |