Re: [PATCH] virtio_blk: add block topology support

From: Alexey Zaytsev
Date: Thu Jul 14 2011 - 19:36:54 EST


On Mon, Feb 1, 2010 at 04:10, Rusty Russell <rusty@xxxxxxxxxxxxxxx> wrote:
> On Sun, 31 Jan 2010 06:49:10 am Christoph Hellwig wrote:
>> On Sat, Jan 30, 2010 at 03:29:49PM +1030, Rusty Russell wrote:
>> > I bow to your expertise on that. ÂMy only query is the __u16 for min_io_size; is that likely to restrict us?
>>
>> Looks like you caught me there - I wrote the above odd format about the
>> physical_block exponent, but scsi actually does the min_io and opt_io
>> size in logical blocks, too. ÂWith that in account the u16 as in scsi
>> is perfectly fine.
>
> Thanks, applied.

Ugh, guys. I know it's already applied long ago, but this kind of
contradicts the virtio specification, doesn't it?


VIRTIO_BLK_F_SECTOR_MAX (10) Maximum total sectors in
an I/O.
[...]

4. If the VIRTIO_BLK_F_SECTOR_MAX feature is negotiated, the sec-
tors_max eld should be read to determine the maximum I/O size for
the driver to use. No requests should be submitted which go beyond this
limit.

struct virtio_blk_config {
u64 capacity ;
u32 si z e_ m ax ;
u32 seg_max ;
struct virtio_blk_geometry {
u16 cylinders ;
u8 heads ;
u8 sectors ;
} geometry ;
u32 blk_size ;
u32 sectors_max ;
};
--
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/