Re: ./fs/partitions/check.c: off-by-one error ?

From: Alan Stern
Date: Tue Apr 22 2008 - 11:49:15 EST


On Tue, 22 Apr 2008, Randy Dunlap wrote:

> On Tue, 22 Apr 2008 12:38:29 +0200 Jan Kara wrote:
>
> > > I already re-formatted the card under Linux as well as under Windows XP and got
> > > always the same behaviour.
> > This looks more like a strange interaction of your device size (it
> > claims to have 3902463 sectors) and your partitioning programs which
> > create partition ending at sector 3902464. Can you send the partition
> > table you have on the device? E.g:
> > fdisk /dev/sda
> > x
> > p
> >
> > will print detailed information about the partition table.
>
> Is this something that using US_FL_FIX_CAPACITY will fix?
>
> US_FL_FIX_CAPACITY -> sets ->fix_capacity, then:
>
> /* Some devices return the total number of sectors, not the
> * highest sector number. Make the necessary adjustment. */
> if (sdp->fix_capacity) {
> --sdkp->capacity;

FIX_CAPACITY will make it worse. The device would appear to have only
3902462 sectors and the partition table will still refer sector
3902464.

The card should be repartitioned as well as reformatted, both under
Linux.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/