Odd code in sd_init()

From: Alexander Viro (viro@math.psu.edu)
Date: Sat May 04 2002 - 01:35:20 EST

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

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/

This archive was generated by hypermail 2b29 : Tue May 07 2002 - 22:00:22 EST