Tag config space fields as having virtio endian-ness.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -57,20 +57,20 @@ · 56 unmodified lines | ||
| 57 | 57 | |
| 58 | 58 | struct virtio_blk_config { |
| 59 | 59 | /* The capacity (in 512-byte sectors). */ |
| 60 | − __u64 capacity; | |
| 60 | + __virtio64 capacity; | |
| 61 | 61 | /* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */ |
| 62 | − __u32 size_max; | |
| 62 | + __virtio32 size_max; | |
| 63 | 63 | /* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */ |
| 64 | − __u32 seg_max; | |
| 64 | + __virtio32 seg_max; | |
| 65 | 65 | /* geometry of the device (if VIRTIO_BLK_F_GEOMETRY) */ |
| 66 | 66 | struct virtio_blk_geometry { |
| 67 | − __u16 cylinders; | |
| 67 | + __virtio16 cylinders; | |
| 68 | 68 | __u8 heads; |
| 69 | 69 | __u8 sectors; |
| 70 | 70 | } geometry; |
| 71 | 71 | |
| 72 | 72 | /* block size of device (if VIRTIO_BLK_F_BLK_SIZE) */ |
| 73 | − __u32 blk_size; | |
| 73 | + __virtio32 blk_size; | |
| 74 | 74 | |
| 75 | 75 | /* the next 4 entries are guarded by VIRTIO_BLK_F_TOPOLOGY */ |
| 76 | 76 | /* exponent for physical block per logical block. */ |
| @@ -78,42 +78,42 @@ struct virtio_blk_config { · 1 unmodified line | ||
| 78 | 78 | /* alignment offset in logical blocks. */ |
| 79 | 79 | __u8 alignment_offset; |
| 80 | 80 | /* minimum I/O size without performance penalty in logical blocks. */ |
| 81 | − __u16 min_io_size; | |
| 81 | + __virtio16 min_io_size; | |
| 82 | 82 | /* optimal sustained I/O size in logical blocks. */ |
| 83 | − __u32 opt_io_size; | |
| 83 | + __virtio32 opt_io_size; | |
| 84 | 84 | |
| 85 | 85 | /* writeback mode (if VIRTIO_BLK_F_CONFIG_WCE) */ |
| 86 | 86 | __u8 wce; |
| 87 | 87 | __u8 unused; |
| 88 | 88 | |
| 89 | 89 | /* number of vqs, only available when VIRTIO_BLK_F_MQ is set */ |
| 90 | − __u16 num_queues; | |
| 90 | + __virtio16 num_queues; | |
| 91 | 91 | |
| 92 | 92 | /* the next 3 entries are guarded by VIRTIO_BLK_F_DISCARD */ |
| 93 | 93 | /* |
| 94 | 94 | * The maximum discard sectors (in 512-byte sectors) for |
| 95 | 95 | * one segment. |
| 96 | 96 | */ |
| 97 | − __u32 max_discard_sectors; | |
| 97 | + __virtio32 max_discard_sectors; | |
| 98 | 98 | /* |
| 99 | 99 | * The maximum number of discard segments in a |
| 100 | 100 | * discard command. |
| 101 | 101 | */ |
| 102 | − __u32 max_discard_seg; | |
| 102 | + __virtio32 max_discard_seg; | |
| 103 | 103 | /* Discard commands must be aligned to this number of sectors. */ |
| 104 | − __u32 discard_sector_alignment; | |
| 104 | + __virtio32 discard_sector_alignment; | |
| 105 | 105 | |
| 106 | 106 | /* the next 3 entries are guarded by VIRTIO_BLK_F_WRITE_ZEROES */ |
| 107 | 107 | /* |
| 108 | 108 | * The maximum number of write zeroes sectors (in 512-byte sectors) in |
| 109 | 109 | * one segment. |
| 110 | 110 | */ |
| 111 | − __u32 max_write_zeroes_sectors; | |
| 111 | + __virtio32 max_write_zeroes_sectors; | |
| 112 | 112 | /* |
| 113 | 113 | * The maximum number of segments in a write zeroes |
| 114 | 114 | * command. |
| 115 | 115 | */ |
| 116 | − __u32 max_write_zeroes_seg; | |
| 116 | + __virtio32 max_write_zeroes_seg; | |
| 117 | 117 | /* |
| 118 | 118 | * Set if a VIRTIO_BLK_T_WRITE_ZEROES request may result in the |
| 119 | 119 | * deallocation of one or more of the sectors. |