[parted-devel] [PATCH 2/4] libparted: remove extraneous blkpg add partition ped exception
Phillip Susi
psusi at ubuntu.com
Thu Jan 12 17:18:59 UTC 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 1/12/2012 10:41 AM, Jim Meyering wrote:
> That patch makes it so parted tells the kernel about the slightly
> larger size so that it will object not just for a simple overlap,
> but also if we try to create a partition that overlaps those last
> two sectors.
After looking at it carefully, it appears to me that before Collin's
patch, it made sure to leave a whole cylinder before the first logical
partition. After his patch, it only requires 2 sectors, not a whole
cylinder.
It also appears that the constraint that this function generates is
only used when aligning the extended partition, so it only matters for
the purposes of align-check. It has no affect on this test.
The reason that BLKPG_ADD_PARTITION fails when the logical partition
starts on the immediately following sector is because
_blkpg_add_partition sets the length of the extended partition to 2
sectors when it is added. It should not do this when there is a
logical partition that claims that second sector, and then this would
work fine.
So what this test is really validating is that parted incorrectly
attempts to add overlapping partitions to the kernel, and that the
kernel fails that request. I think that the incorrect behavior should
be fixed and the test should validate that it works, not that it fails.
I'll work on a patch tonight.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPDxYDAAoJEJrBOlT6nu75F/kH/0Hv5QrsjOxsX7hDV5IGHXYQ
G5tWmRPfhEs+KVJ1Yw0Yl4Z1twCSYtwnDlkhEMAVRQtKiqmullrJAYtmG95NEmEP
g4yV8qZkr1kV+8Ji0r4PgtWrSI/E5PcE6ZdzR3hRaIoJnrhBHZx3m1TtLVmmf0eF
UZ8v+cwsULEuMNtLJLu9ByCfNRIvFAO548CxCK5oPPOmQFybDf1tzK6W1t7+UnKu
8+CvViwtePjuX89j5niVV7/Q6ETZvmbetxiPrOwzyhZwGpqCncwJbUCdXUyHjEcJ
bSWOlTdUAx1syzT5+4rt6o8bc+79zmNirs61pAEleMpFwfTy/2EqX5siYk0m8yM=
=adk1
-----END PGP SIGNATURE-----
More information about the parted-devel
mailing list