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

Phillip Susi psusi at cfl.rr.com
Tue Mar 30 03:50:07 UTC 2010


Attaching the current patch applied in Ubuntu and commenting:

On Mon, 2010-03-29 at 13:04 -0400, Phillip Susi wrote:
> On 3/29/2010 12:44 PM, Jim Meyering wrote:
> > If you can use an existing FD, then please do.
> > That would be far better.
> 
> Will do.

It seems that parted currently only opens an fd on the raw disk, not the
partitions.  It looks like the BLKPG ioctls were originally intended to
allow requests to read the partition tables in use on the raw device,
but these have not yet been implemented, so the HD_GETGEO ioctl is
required on the partition device, requiring the local open().  While it
would be nice to be able to reuse an existing fd, it does not appear
possible at this time, so Ubuntu is moving forward with this patch for
the lucid release.  Please review and comment or apply if you find it
acceptable.

Again, error-check-BLKPG.patch is to be applied on top of
put-back-BLKPG.patch I posted earlier, which reverses the changes from
parted 1.8 to parted 2.2.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: error-check-BLKPG.patch
Type: text/x-patch
Size: 4388 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20100329/d086f737/attachment-0001.bin>


More information about the parted-devel mailing list