diff options
author | Christian Borntraeger <borntraeger@de.ibm.com> | 2008-05-29 11:08:26 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-07-25 12:06:05 +1000 |
commit | 066f4d82a67f621ddd547bfa4b9c94631d8457b0 (patch) | |
tree | 96bdeadd9af5b16476186df0ea8056175bc16cbb /include | |
parent | e962fa660d391fc9b90988e6538c94c858c099f9 (diff) | |
download | blackbird-op-linux-066f4d82a67f621ddd547bfa4b9c94631d8457b0.tar.gz blackbird-op-linux-066f4d82a67f621ddd547bfa4b9c94631d8457b0.zip |
virtio_blk: check for hardsector size from host
Currently virtio_blk assumes a 512 byte hard sector size. This can cause
trouble / performance issues if the backing has a different block size
(like a file on an ext3 file system formatted with 4k block size or a dasd).
Lets add a feature flag that tells the guest to use a different hard sector
size than 512 byte.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/virtio_blk.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index 6a66c7f30bcb..c1aef85243bf 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h @@ -13,6 +13,7 @@ #define VIRTIO_BLK_F_SEG_MAX 2 /* Indicates maximum # of segments */ #define VIRTIO_BLK_F_GEOMETRY 4 /* Legacy geometry available */ #define VIRTIO_BLK_F_RO 5 /* Disk is read-only */ +#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ struct virtio_blk_config { @@ -28,6 +29,8 @@ struct virtio_blk_config __u8 heads; __u8 sectors; } geometry; + /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ + __u32 blk_size; } __attribute__((packed)); /* These two define direction. */ |