[parted-devel] [PATCH] Use disk geometry as basis for ext2 sector sizes.

Steven Lang Steven.Lang at hgst.com
Mon Jan 12 21:29:29 UTC 2015


The only place the geometry is actually used is in determining which of the detected filesystems is a best fit for the device, based on the size. Since usually only one filesystem will be detected, it is always the best fit, no matter how large it is.

When including the 4k block size commit without the commit that removes the check on geometry bounds, the ext2 detection fails on 4k block size devices. Otherwise, the bug that the patch fixes is not causing any problems currently.

________________________________________
From: Phillip Susi <phillsusi at gmail.com> on behalf of Phillip Susi <psusi at ubuntu.com>
Sent: Friday, January 09, 2015 11:52 AM
To: Steven Lang; parted-devel at lists.alioth.debian.org
Subject: Re: [parted-devel] [PATCH] Use disk geometry as basis for ext2 sector sizes.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 1/9/2015 2:44 PM, Steven Lang wrote:
> It's a bit of a long story, but the short answer was that I was
> testing some aspects of 4k sector size with different combinations
> of commits. When I had included 80678b but not fa815a, ext2
> detection failed because the geometry of the ext2 filesystem would
> always exceed the geometry of the device.

Failed where though?  I can't see anywhere that geometry is actually
used.  You mention the commits allowing filesystem detection to work
at all on 4k drives, and allowing you to ignore partitions ( not
filesystems ) that do not fit inside the disk, but I don't seem to
have a problem detecting ext4 and don't get any warning about it being
too large.

> I don't think the current code shows any effects of the bug,
> though conceivably if the filesystem detection were to detect two
> different filesystems on a device with 4k sector size, it would
> rarely pick ext2/3/4 as the "correct" one even if it was, due to
> the size being so grossly off. But barring that rather contrived
> and probably carefully crafted situation, I can't see anywhere it
> would be an issue in the current code base since the geometry
> returned by the filesystem is only used to find the best fit.

Ahh, I forgot about the old rescue command.  Oddly though, it doesn't
seem to work even on a 512 byte sector disk.  I'll have to figure out why.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)

iQEcBAEBAgAGBQJUsDGMAAoJENRVrw2cjl5R6iYIAKjgp89jGvETmBtbCVplqLaR
VRQGRuKcYaYpalVyG2n5p8oTk6x/kX64KOQ+8FeOttWJ3BveQmAgafRqkYy9gN2+
rLjmlctZDQkCyN/J9uPKUEDQ9jV4IZ7vlQphLBsYs0oF+Wf/otP1AZN4ZcgkLMfP
/nE8AhJ3cUhF9KOZYXHKEqV+0EH6UBQR2BcZ5uMSIBS7ukFd6DwrHegVxIFDS2DM
8Ldertb2VUkGXJWOcfrTc7bgss3N9hwRZT5pDuw9NWsdZ1mkIekEtxeHp1YoNkhh
iXG89XgdLkOKGChj6lYzeqk3TMSsF3RdF3xZynh1eT95nqHsAJFHuLZLx5mXf0I=
=5m0+
-----END PGP SIGNATURE-----



More information about the parted-devel mailing list