Hi,
On 03/18/2010 05:12 PM, Phillip Susi wrote:
On 3/18/2010 12:09 PM, Hans de Goede wrote:
That would end up with the same result as we have now, the commit() would
fail as the BLKRRPART would fail on the in use partitions.
So by taking out the BLKRRPART we have the same end result with
significantly
less code.
No, it wouldn't. BLKRRPART fails if ANY partition on the disk is in
use. The BLKPG ioctls allow you to add a new partition whenever you
like, and remove a partition as long as that specific partition is not
in use.
I don't remember the exact details, but iirc the blkpg code worked by
first removing all partitions, and re-adding them ignoring all
errors in the process to allow "skipping" busy partitions.
Only making it remove / re-add changed partitions would have required
serious reworking of the code in question. So I opted for just throwing
it out all together.
Also BLKPG does not work on all types of partitionable devices (it does
not work for example on dasd disks).
Anyways, as said doing BLKPG correctly requires some significant
reworking of the old code, patches welcome.
Regards,
Hans
_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel