On Thu, Jun 22, 2000 at 11:40:20AM +0200, M G Berberich wrote:
> The code that causes the "reset" of the sector-size is in
> 'drivers/block/genhd.c'
Yes, this code is a bit ugly:
> disk_number_of_sects = NR_SECTS((&hd->part[MINOR(dev)]));
Ach. NR_SECTS is a define meant to extract the nr_sects field
from a partition table struct where it is unaligned.
Here it is applied to a struct hd_struct, which happens to
have a field nr_sects as well, and
hd->part[MINOR(dev)].nr_sects
is the canonical way to address this.
> printk(" %s: RESETTINGING SECTOR SCALE from %d to 1",
s/RESETTINGING/RESETTING/
But the question is whether this code is wrong.
One could make a case for the statement that every heuristic
in the kernel is wrong. And here we have a heuristic for guessing
whether the partition table was written using 512-byte or 2048-byte
sectors. The heuristic itself is reasonable enough. But since 2.2.15
did not yet have this heuristic, it follows that in all cases where
the heuristic applies and 2.2.15 was OK, 2.2.16 will break.
So, I would not be unhappy if this code were removed again.
[We are creating more and more Linux problems, where at the start
there was only an incompatibility between DOS and Linux.]
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]