From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Liu, Changpeng" Subject: RE: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands support Date: Tue, 5 Jun 2018 00:55:19 +0000 Message-ID: References: <1527558144-3825-1-git-send-email-changpeng.liu@intel.com> <20180531103047.GB27838@stefanha-x1.localdomain> <20180601085935.GA8196@stefanha-x1.localdomain> <102ec75b-68c9-a488-d0c3-223ab09254bc@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <102ec75b-68c9-a488-d0c3-223ab09254bc@redhat.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Paolo Bonzini , Stefan Hajnoczi Cc: "cavery@redhat.com" , "virtualization@lists.linux-foundation.org" List-Id: virtualization@lists.linuxfoundation.org > -----Original Message----- > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > Sent: Monday, June 4, 2018 6:03 PM > To: Liu, Changpeng ; Stefan Hajnoczi > > Cc: virtualization@lists.linux-foundation.org; cavery@redhat.com; > jasowang@redhat.com; Wang, Wei W > Subject: Re: [PATCH v4] virtio_blk: add DISCARD and WRIET ZEROES commands > support > > On 04/06/2018 06:14, Liu, Changpeng wrote: > >>> 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