IDE bug - was: Re: uncorrectable ext2 errors

From: Andries Brouwer
Date: Sun Aug 10 2003 - 17:37:50 EST


On Mon, Aug 11, 2003 at 12:10:20AM +0200, Jan Niehusmann wrote:
> On Sun, Aug 10, 2003 at 11:58:34PM +0200, Andries Brouwer wrote:
> > OK. So, this means that you cannot access past the 2^28 sector boundary.
> >
> > So, you can address at most 137 GB of your disk.
> >
> > Did you say that it was 250 GB?
>
> Exactly. And it's reported as 250GB, and I can access parts of the disk
> behind the 137 GB limit without an error message, but it looks like
> writing to these parts, it silently overwrites content at the beginning
> of the drive. Like it just discards the upper bits of the address or
> something like that.

Yes, that it what it does.

Look at my post from yesterday or so with Subject: [PATCH sketch] More IDE stuff

ide-disk.c: __ide_do_rw_disk() issues read/write requests to the disk.
It does

if (drive->addressing == 1) /* 48-bit LBA */
return lba_48_rw_disk(drive, rq, (unsigned long long) block);
if (drive->select.b.lba) /* 28-bit LBA */
return lba_28_rw_disk(drive, rq, (unsigned long) block);
return chs_rw_disk(drive, rq, (unsigned long) block);

with checking the size of block.
And init_idedisk_capacity() does not check addressing.

In my above post I gave a patch for 2.6.0-test3.
But the IDE code for 2.4 and 2.6 is very similar, so the patch, once applied
to 2.6 should also be backported to 2.4.

Andries

-
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/