aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/virtio_blk.h
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-10-27 18:15:57 -0400
committerMichal Marek <mmarek@suse.cz>2010-10-27 18:15:57 -0400
commitb74b953b998bcc2db91b694446f3a2619ec32de6 (patch)
tree6ce24caabd730f6ae9287ed0676ec32e6ff31e9d /include/linux/virtio_blk.h
parentabb438526201c6a79949ad45375c051b6681c253 (diff)
parentf6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff)
Merge commit 'v2.6.36' into kbuild/misc
Update to be able to fix a recent change to scripts/basic/docproc.c (commit eda603f).
Diffstat (limited to 'include/linux/virtio_blk.h')
-rw-r--r--include/linux/virtio_blk.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
index fd294c56d571..167720d695ed 100644
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@ -15,6 +15,9 @@
15#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/ 15#define VIRTIO_BLK_F_BLK_SIZE 6 /* Block size of disk is available*/
16#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */ 16#define VIRTIO_BLK_F_SCSI 7 /* Supports scsi command passthru */
17#define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */ 17#define VIRTIO_BLK_F_FLUSH 9 /* Cache flush command support */
18#define VIRTIO_BLK_F_TOPOLOGY 10 /* Topology information is available */
19
20#define VIRTIO_BLK_ID_BYTES 20 /* ID string length */
18 21
19struct virtio_blk_config { 22struct virtio_blk_config {
20 /* The capacity (in 512-byte sectors). */ 23 /* The capacity (in 512-byte sectors). */
@@ -29,8 +32,20 @@ struct virtio_blk_config {
29 __u8 heads; 32 __u8 heads;
30 __u8 sectors; 33 __u8 sectors;
31 } geometry; 34 } geometry;
35
32 /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ 36 /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */
33 __u32 blk_size; 37 __u32 blk_size;
38
39 /* the next 4 entries are guarded by VIRTIO_BLK_F_TOPOLOGY */
40 /* exponent for physical block per logical block. */
41 __u8 physical_block_exp;
42 /* alignment offset in logical blocks. */
43 __u8 alignment_offset;
44 /* minimum I/O size without performance penalty in logical blocks. */
45 __u16 min_io_size;
46 /* optimal sustained I/O size in logical blocks. */
47 __u32 opt_io_size;
48
34} __attribute__((packed)); 49} __attribute__((packed));
35 50
36/* 51/*
@@ -54,6 +69,9 @@ struct virtio_blk_config {
54/* Cache flush command */ 69/* Cache flush command */
55#define VIRTIO_BLK_T_FLUSH 4 70#define VIRTIO_BLK_T_FLUSH 4
56 71
72/* Get device ID command */
73#define VIRTIO_BLK_T_GET_ID 8
74
57/* Barrier before this op. */ 75/* Barrier before this op. */
58#define VIRTIO_BLK_T_BARRIER 0x80000000 76#define VIRTIO_BLK_T_BARRIER 0x80000000
59 77