From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Jeff Cody <jcody@redhat.com>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 1/3] block: Extrace bdrv_parse_detect_zeroes_flags
Date: Wed, 10 Jun 2015 17:11:56 +0800 [thread overview]
Message-ID: <20150610091156.GA11648@ad.nay.redhat.com> (raw)
In-Reply-To: <5575AC85.7020101@redhat.com>
On Mon, 06/08 16:53, Paolo Bonzini wrote:
>
>
> On 08/06/2015 16:17, Eric Blake wrote:
> >> > +
> >> > + if (detect_zeroes == BLOCKDEV_DETECT_ZEROES_OPTIONS_UNMAP &&
> >> > + !(bdrv_flags & BDRV_O_UNMAP)) {
> >> > + error_setg(errp, "setting detect-zeroes to unmap is not allowed "
> >> > + "without setting discard operation to unmap");
> >> > + }
> > I think it might be better to have a tri-state enum, than to have two
> > competing bools where only 3 of the 4 states are valid.
>
> Note that this is not a bool. We have one bool and one 3-element enum
> (off/on/unmap), where only 5 of the 6 states are valid. Also, at least
> detect-zeroes would go away if we had some kind of blockdev-mirror
> (where the target is added first with blockdev-add), so I think it's
> better to leave it separate.
Agreed. But by then "drive-mirror derive=... detect-zeroes=unmap unmap=false"
will be way too confusing.
I say let's save that and just go for blockdev-add :)
https://www.mail-archive.com/qemu-devel@nongnu.org/msg301990.html
Fam
next prev parent reply other threads:[~2015-06-10 9:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 10:34 [Qemu-devel] [PATCH v2 0/3] mirror: Allow detection of zeroes on source sectors Fam Zheng
2015-06-08 10:34 ` [Qemu-devel] [PATCH v2 1/3] block: Extrace bdrv_parse_detect_zeroes_flags Fam Zheng
2015-06-08 14:17 ` Eric Blake
2015-06-08 14:53 ` Paolo Bonzini
2015-06-10 9:11 ` Fam Zheng [this message]
2015-06-10 9:24 ` Fam Zheng
2015-06-08 10:34 ` [Qemu-devel] [PATCH v2 2/3] qapi: Add "detect-zeroes" option to drive-mirror Fam Zheng
2015-06-08 10:47 ` Paolo Bonzini
2015-06-08 14:21 ` Eric Blake
2015-06-08 10:34 ` [Qemu-devel] [PATCH v2 3/3] iotests: Add test cases for drive-mirror "detect-zeroes" option Fam Zheng
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=20150610091156.GA11648@ad.nay.redhat.com \
--to=famz@redhat.com \
--cc=armbru@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).