diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2014-10-07 10:39:49 -0400 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2014-12-09 05:05:26 -0500 |
| commit | 19c1c5a64c3b8eeb65b63abba248b880dd584589 (patch) | |
| tree | d0c2ae46d54dbde97cb167613e3f732b15c3b6e1 /include/uapi/linux | |
| parent | fdd819b21576c361bf0dcdd9522df4ccabf7aaa8 (diff) | |
virtio_blk: v1.0 support
Based on patch by Cornelia Huck.
Note: for consistency, and to avoid sparse errors,
convert all fields, even those no longer in use
for virtio v1.0.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/virtio_blk.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/uapi/linux/virtio_blk.h b/include/uapi/linux/virtio_blk.h index 9ad67b267584..247c8ba8544a 100644 --- a/include/uapi/linux/virtio_blk.h +++ b/include/uapi/linux/virtio_blk.h | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/virtio_ids.h> | 29 | #include <linux/virtio_ids.h> |
| 30 | #include <linux/virtio_config.h> | 30 | #include <linux/virtio_config.h> |
| 31 | #include <linux/virtio_types.h> | ||
| 31 | 32 | ||
| 32 | /* Feature bits */ | 33 | /* Feature bits */ |
| 33 | #define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */ | 34 | #define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */ |
| @@ -114,18 +115,18 @@ struct virtio_blk_config { | |||
| 114 | /* This is the first element of the read scatter-gather list. */ | 115 | /* This is the first element of the read scatter-gather list. */ |
| 115 | struct virtio_blk_outhdr { | 116 | struct virtio_blk_outhdr { |
| 116 | /* VIRTIO_BLK_T* */ | 117 | /* VIRTIO_BLK_T* */ |
| 117 | __u32 type; | 118 | __virtio32 type; |
| 118 | /* io priority. */ | 119 | /* io priority. */ |
| 119 | __u32 ioprio; | 120 | __virtio32 ioprio; |
| 120 | /* Sector (ie. 512 byte offset) */ | 121 | /* Sector (ie. 512 byte offset) */ |
| 121 | __u64 sector; | 122 | __virtio64 sector; |
| 122 | }; | 123 | }; |
| 123 | 124 | ||
| 124 | struct virtio_scsi_inhdr { | 125 | struct virtio_scsi_inhdr { |
| 125 | __u32 errors; | 126 | __virtio32 errors; |
| 126 | __u32 data_len; | 127 | __virtio32 data_len; |
| 127 | __u32 sense_len; | 128 | __virtio32 sense_len; |
| 128 | __u32 residual; | 129 | __virtio32 residual; |
| 129 | }; | 130 | }; |
| 130 | 131 | ||
| 131 | /* And this is the final byte of the write scatter-gather list. */ | 132 | /* And this is the final byte of the write scatter-gather list. */ |
