From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:34418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gyHsU-0003ee-8b for qemu-devel@nongnu.org; Mon, 25 Feb 2019 10:09:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gyHsR-0001TF-HL for qemu-devel@nongnu.org; Mon, 25 Feb 2019 10:09:10 -0500 References: <20190223000614.13894-1-jsnow@redhat.com> <20190223000614.13894-2-jsnow@redhat.com> <4aea2945-9e5e-e293-8a4d-ceb2780b12cc@virtuozzo.com> From: Eric Blake Message-ID: Date: Mon, 25 Feb 2019 09:08:48 -0600 MIME-Version: 1.0 In-Reply-To: <4aea2945-9e5e-e293-8a4d-ceb2780b12cc@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 01/10] block/dirty-bitmap: add recording and busy properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , John Snow , "qemu-devel@nongnu.org" , "qemu-block@nongnu.org" Cc: Markus Armbruster , Kevin Wolf , Juan Quintela , Max Reitz , "libvir-list@redhat.com" , "Dr. David Alan Gilbert" , Stefan Hajnoczi , Fam Zheng On 2/25/19 9:01 AM, Vladimir Sementsov-Ogievskiy wrote: > 23.02.2019 3:06, John Snow wrote: >> The current API allows us to report a single status, which we've defined as: >> >> Frozen: has a successor, treated as qmp_locked, may or may not be enabled. >> Locked: no successor, qmp_locked. may or may not be enabled. >> Disabled: Not frozen or locked, disabled. >> Active: Not frozen, locked, or disabled. >> >> The problem is that both "Frozen" and "Locked" mean nearly the same thing, >> and that both of them do not intuit whether they are recording guest writes >> or not. >> >> This patch deprecates that status field and introduces two orthogonal >> properties instead to replace it. >> >> Signed-off-by: John Snow >> --- >> +++ b/qapi/block-core.json >> @@ -458,7 +458,14 @@ >> # >> # @granularity: granularity of the dirty bitmap in bytes (since 1.4) >> # >> -# @status: current status of the dirty bitmap (since 2.4) >> +# @status: Deprecated in favor of @recording and @locked. (since 2.4) >> +# >> +# @recording: true if the bitmap is recording new writes from the guest. >> +# Replaces `active` and `disabled` statuses. (since 4.0) >> +# >> +# @busy: true if the bitmap is in-use by some operation (NBD or jobs) >> +# and cannot be modified via QMP or used by another operation. >> +# Replaces `locked` and `frozen` statuses. (since 4.0) > > > Don't we want instead an array of flags? Which will include also persistent and > inconsistent? No, I don't think an array of flags is worth the extra complications in generation and parsing of the JSON. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org