From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP
Date: Thu, 29 Sep 2016 16:10:22 +0800 [thread overview]
Message-ID: <20160929081022.GB2432@lemon> (raw)
In-Reply-To: <bdaea2f7-1fe4-8e7a-7479-a77a4ca00848@redhat.com>
On Thu, 09/29 09:58, Paolo Bonzini wrote:
>
>
> On 29/09/2016 04:21, Fam Zheng wrote:
> > On Wed, 09/28 18:11, Max Reitz wrote:
> >> Note that BDRV_REQ_MAY_UNMAP does not mean "Yes, please discard" but
> >> just "You may discard if it's easier for you". But it's actually not
> >> easier for us, so I don't see why we're doing it.
> >>
> >> As far as I can guess you actually want some way to tell a block driver
> >> to actually make an effort to discard clusters as long they then read
> >> back as zero (which is why you cannot simply use bdrv_pdiscard()).
> >> However, I think this would require a new flag called
> >> BDRV_REQ_SHOULD_UNMAP (which should imply BDRV_REQ_MAY_UNMAP).
> >
> > This flag doesn't make sense to me, if the protocol doesn't know how to unmap,
> > it can ignore BDRV_REQ_MAY_UNMAP, but not BDRV_REQ_SHOULD_UNMAP. It just
> > complicates things a little.
>
> I don't think we actually have a use for a "MAY" unmap flag. Either we
> keep the not-so-perfect name or we replace MAY_UNMAP with "should" or
> "want" or "would_like" unmap... But Fam's patch does do what was
> intended for the flag (which is the equivalent of the UNMAP bit in the
> SCSI WRITE SAME command).
After reading rfc2119, now I agree that "SHOULD" is better. :)
Fam
next prev parent reply other threads:[~2016-09-29 8:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 7:04 [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP Fam Zheng
2016-09-28 16:11 ` Max Reitz
2016-09-29 2:21 ` Fam Zheng
2016-09-29 7:58 ` Paolo Bonzini
2016-09-29 8:10 ` Fam Zheng [this message]
2016-10-01 13:08 ` Max Reitz
2016-09-29 9:29 ` Kevin Wolf
2016-09-29 9:55 ` Fam Zheng
2016-09-29 10:39 ` Kevin Wolf
2016-09-29 12:14 ` Paolo Bonzini
2016-09-29 12:48 ` Kevin Wolf
2016-09-29 12:50 ` Paolo Bonzini
2016-09-29 12:56 ` Paolo Bonzini
2016-09-30 2:04 ` Fam Zheng
2016-09-30 12:38 ` Kevin Wolf
2016-10-12 1:14 ` Fam Zheng
2016-10-12 8:42 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160929081022.GB2432@lemon \
--to=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).