> -----Original Message-----
> From: Paolo Bonzini [mailto:[email protected]]
> Sent: Tuesday, February 27, 2018 4:42 PM
> To: Liu, Changpeng <[email protected]>; [email protected];
> [email protected]
> Cc: [email protected]; [email protected]; Wodkowski, PawelX
> <[email protected]>; Harris, James R <[email protected]>
> Subject: Re: [virtio-dev] Re: [RFC] virtio-blk: add discard and write zeroes
> features
> to specification
>
> On 27/02/2018 06:45, Liu, Changpeng wrote:
> >> Perhaps we can put a bit here saying whether write_zeroes will ever look
> >> at the \field{unmap} bit? Like:
> >>
> >> u8 write_zeroes_may_unmap;
> >
> > I do take this into consideration, if write zeroes is supported and discard
> > is not
> supported,
> > even the OS send write zeroes command with unmap bit enabled, the backend
> will also
> > ignore this bit, so the configuration parameter seems useless.
>
> The reason is that it lets the guest OS know if WRITE ZEROES with UNMAP
> will be fast or not. It's not super important, but it is easy enough to
> add and also easy enough to fill in for the host.
Ok, I will add it.
>
> Paolo