[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [virtio-dev] [PATCH v6] virtio-blk: add zoned block device specification
On Sun, Sep 04, 2022 at 12:56:01PM -0400, Dmitry Fomichev wrote: > @@ -4746,7 +4930,15 @@ \subsection{Device Operation}\label{sec:Device Types / Block Device / Device Ope > le32 reserved; > le64 sector; > u8 data[]; > - u8 status; > + union { > + u8 status; > + > + struct { > + u8 status; > + u8 reserved[7]; > + le64 append_sector; > + } zone_append_in_hdr; > + }; If a zone append request is sent to a device without VIRTIO_BLK_F_ZONED, then should the device store VIRTIO_BLK_S_UNSUPP to status or to zone_append_in_hdr.status? (I think the answer is status.) It seems simpler to avoid this problem and instead define: struct virtio_blk_zone_append_in_hdr { le64 append_sector; } and say that zone append requests have this struct *before* struct virtio_blk_in_hdr. So the layout is: le32 type; le32 reserved; le64 sector; u8 data[]; le64 append_sector; u8 status; That way the location of the status field does not change, it's always the last byte. Stefan
Attachment:
signature.asc
Description: PGP signature
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]