Odd code in sd_init()

Alexander Viro (viro@math.psu.edu)
Sat, 4 May 2002 02:35:20 -0400 (EDT)


sd_init() contains the following loop:

for (k = 0; k < N_USED_SD_MAJORS; k++) {
request_queue_t *q = blk_get_queue(mk_kdev(SD_MAJOR(k), 0));
blk_queue_hardsect_size(q, 512);
}

... which is a damn interesting thing to do, seeing that it's called when
we do scsi_register_device(&sd_template) and before we get any chance to
set ->queue, so we actually end up setting sector size for hell knows
what (well, for default queues of our majors - i.e. stuff that won't be
used).

Either I'm missing something, or that code is bogus. Jens, Linus?

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