Merge branch 'virtio' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux...
[pandora-kernel.git] / include / linux / virtio_blk.h
index fd294c5..167720d 100644 (file)
@@ -15,6 +15,9 @@
 #define VIRTIO_BLK_F_BLK_SIZE  6       /* Block size of disk is available*/
 #define VIRTIO_BLK_F_SCSI      7       /* Supports scsi command passthru */
 #define VIRTIO_BLK_F_FLUSH     9       /* Cache flush command support */
+#define VIRTIO_BLK_F_TOPOLOGY  10      /* Topology information is available */
+
+#define VIRTIO_BLK_ID_BYTES    20      /* ID string length */
 
 struct virtio_blk_config {
        /* The capacity (in 512-byte sectors). */
@@ -29,8 +32,20 @@ struct virtio_blk_config {
                __u8 heads;
                __u8 sectors;
        } geometry;
+
        /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */
        __u32 blk_size;
+
+       /* the next 4 entries are guarded by VIRTIO_BLK_F_TOPOLOGY  */
+       /* exponent for physical block per logical block. */
+       __u8 physical_block_exp;
+       /* alignment offset in logical blocks. */
+       __u8 alignment_offset;
+       /* minimum I/O size without performance penalty in logical blocks. */
+       __u16 min_io_size;
+       /* optimal sustained I/O size in logical blocks. */
+       __u32 opt_io_size;
+
 } __attribute__((packed));
 
 /*
@@ -54,6 +69,9 @@ struct virtio_blk_config {
 /* Cache flush command */
 #define VIRTIO_BLK_T_FLUSH     4
 
+/* Get device ID command */
+#define VIRTIO_BLK_T_GET_ID    8
+
 /* Barrier before this op. */
 #define VIRTIO_BLK_T_BARRIER   0x80000000