RE: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support
From: Liu, Changpeng <hidden>
Date: 2018-06-05 00:55:19
-----Original Message----- From: Paolo Bonzini [mailto:pbonzini@redhat.com] Sent: Monday, June 4, 2018 6:03 PM To: Liu, Changpeng <redacted>; Stefan Hajnoczi [off-list ref] Cc: virtualization@lists.linux-foundation.org; cavery@redhat.com; jasowang@redhat.com; Wang, Wei W [off-list ref] Subject: Re: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support On 04/06/2018 06:14, Liu, Changpeng wrote:quoted
quoted
quoted
But I believe the specification says VIRTIO_BLK_T_OUT means direction, so OR the two bits together should compliance with the specification.I cannot find that in the specification: http://docs.oasis-open.org/virtio/virtio/v1.0/cs04/virtio-v1.0-cs04.html#x1- 2020002 and it would contradict the "The type of the request is either ... or ..." wording that I quoted from the spec above. If you do find something in the spec, please let me know and we can figure out how to make the spec consistent.I saw comments from file linux/usr/include/uapi/linux/virtio_blk.h, which says VIRTIO_BLK_T_OUT may be combined with other commands and means direction, the specification does not have such description.I don't think it is in the specification indeed (however, 11 and 13 were chosen so that VIRTIO_BLK_T_OUT can still indicate direction).
Correct, we don't need to OR VIRTIO_BLK_T_OUT again for DISCARD and WRITE ZEROES commands. I'll remove it in next patch set.
Paolo