I am not Andre, and probably also late - vger stuff arrives here
with a delay of more than 24 hours. But let me see.
Various places check the device size before doing I/O.
For example, looking at a 2.3.39 source, ide.c:start_request() has
if (blockend > drive->part[minor].nr_sects) {
printk("%s: bad access\n", drive->name);
goto kill_rq;
}
So, it seems that before we can look at the partition table of
a device, we must know the size, or at least have a nonzero nr_sects,
otherwise bread will fail.
Now in check.c the routine setup_dev() does
dev->part[0].nr_sects = 0;
dev->init(dev);
resetup_one_dev(dev, drive);
and
dev->init(dev);
fills in the right value in nr_sects, needed by the
check_partition() called by resetup_one_dev().
So, just deleting the dev->init(dev); call here will fail, I think.
Note that scsi also has sd_geninit().
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/