[parted-devel] [PATCH] use 1MB partition alignment with GPT and disks with !512b sector sizes

Jim Meyering jim at meyering.net
Wed Jan 28 17:17:27 UTC 2009


Matt Domsch <Matt_Domsch at dell.com> wrote:
> This creates a new 1MB start alignment constraint, and has GPT use it
> when disks have a logical block size != 512 bytes.  This might need to
> be extended to do so if the disk has a physical sector size != 512
> bytes as well, for the case of 512b logical, 4k physical sectors,
> where we really want the partitions on 4k boundaries at least.
>
> Note, Vista uses a 1MB partition alignment always now, where XP and
> earlier used the standard cylinder boundary.  We might want to default
> parted to using 1MB alignments always, but to not overwrite exising
> partition layouts.
>
> Note also, I haven't seen parted code to handle "odd alignment".
> http://lists.alioth.debian.org/pipermail/parted-devel/2007-December/002055.html
> http://www.idema.org/_smartsite/modules/local/data_file/show_file.php?cmd=download&data_file_id=1719
> describes T13 Identify Device command, word 209, which shows how to
> get this alignment. It seems future SATA disks will use "odd
> alignment" as that's what XP used, but for SCSI that isn't determined
> yet.

Hi Matt,

Thanks for the patches.
Please specify if they're intended for master or next.
Have you run "make check" for them?
It's also good to run "make distcheck" or at least "make syntax-check".

Do you need to submit new copyright papers with the FSF?
I see that you disclaimed a single parted patch (gpt-related)
back in 2001.

You can really accelerate acceptance by providing some testing-oriented
information, like before/after output from parted -s dev -m units s print
that demonstrates changes induced by your patch.
Better still would be to add a test case showing the same thing
but automating the steps and comparing against expected output.
There are many examples in tests/.
Best is if you can design a test to be run as non-root, using a
file-backed device.



More information about the parted-devel mailing list