[parted-devel] [PATCH 6/9] Support 64K clusters for FAT16.

Joel Granados jgranado at redhat.com
Tue Jun 9 08:01:38 UTC 2009


On Sat, Jun 06, 2009 at 08:57:56AM +0200, Jim Meyering wrote:
> Joel Granados wrote:
> 
> > On Fri, Jun 05, 2009 at 02:55:07PM +0200, Jim Meyering wrote:
> >> Joel Granados Moreno wrote:
> >> > A 64K cluster size (128 sectors) for FAT16 is not common but is possible.
> >> > Allow the use of 128 sector clusters instead of outputting an error.
> >> > ---
> >> >  libparted/fs/fat/calc.c |    2 +-
> >> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >> >
> >> > diff --git a/libparted/fs/fat/calc.c b/libparted/fs/fat/calc.c
> >> > index 026aec8..327ae67 100644
> >> > --- a/libparted/fs/fat/calc.c
> >> > +++ b/libparted/fs/fat/calc.c
> >> > @@ -62,7 +62,7 @@ PedSector
> >> >  fat_max_cluster_size (FatType fat_type) {
> >> >  	switch (fat_type) {
> >> >  		case FAT_TYPE_FAT12: return 1;	/* dunno... who cares? */
> >> > -		case FAT_TYPE_FAT16: return 32768/512;
> >> > +		case FAT_TYPE_FAT16: return 65536/512;
> >> >  		case FAT_TYPE_FAT32: return 65536/512;
> >> >  	}
> >> >  	return 0;
> >>
> >> Is there a test case to exercise this?
> >> Or a bug report?
> >
> > look at
> > http://lists.alioth.debian.org/pipermail/parted-devel/2009-June/002882.html
> 
> Ah, then we will mention that link in the commit log:

Ok. Will add it to the comment.

> 
>    http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/207
> 
> > There is the bug report and there is the reason why I chose not to do a
> > test for it.  If you know of any way to avoid the situation described in
> > the link, please share it with me :)
> 
> This is small and looks safe enough that
> I'm willing to forgo the test.

Still I would want to test it.  I discovered some days ago that one can
acutally create test to use "real" disks.  This issue is a good way to
explore that mechanism, but I think it is best explored in the next
parted release. :)

Regards.

-- 
Joel Andres Granados
Brno, Czech Republic, Red Hat.



More information about the parted-devel mailing list