[parted-devel] Bug: Removal of BLKPG causes regression of ability to manipulate disks with other partitions in use

Hans de Goede hdegoede at redhat.com
Thu Mar 18 15:45:02 UTC 2010


Hi,

On 03/18/2010 04:37 PM, Phillip Susi wrote:
> It seems that Hans de Goede ( CCing ) removed support for the BLKPG
> ioctls instead of BLKRRPART on 2009-08-28 according to the ChangeLog.
> This prevents using parted to manipulate partitions on disks where other
> partitions are in use on Linux, which worked in parted 1.8.  Related
> bugs are:
>
> https://bugs.launchpad.net/parted/+bug/540940
> http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/253
>
> Why was this support removed, and is it possible to have it put back?

It was removed because it lacked proper error checking, The 1.8 code was
ignoring BLKRRPART errors (such as for example those hrown by busy
partitions), which allowed one to modify partitions which are not in use.

But this meant that no proper error checking was done, so if the user
did not exactly know what he was doing he parted would say all was fine,
while in reality the kernels view of the partitions did not match the
new layout. Since this is dangerous and error prone the use of
BLKRRPART was removed.

Regards,

Hans





More information about the parted-devel mailing list