qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 1/3] block: Extrace bdrv_parse_detect_zeroes_


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH v2 1/3] block: Extrace bdrv_parse_detect_zeroes_flags
Date: Wed, 10 Jun 2015 17:11:56 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

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/address@hidden/msg301990.html

Fam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]