From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx9zW-0008PK-0D for qemu-devel@nongnu.org; Tue, 26 May 2015 04:13:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yx9zS-00064e-GM for qemu-devel@nongnu.org; Tue, 26 May 2015 04:13:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yx9zS-00064X-A4 for qemu-devel@nongnu.org; Tue, 26 May 2015 04:13:34 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4Q8DXhu017679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 26 May 2015 04:13:33 -0400 From: Markus Armbruster References: <1431460381-8530-1-git-send-email-jsnow@redhat.com> <55525D43.6060402@redhat.com> <87y4kht2oc.fsf@blackfin.pond.sub.org> <555F670D.5010307@redhat.com> Date: Tue, 26 May 2015 10:13:30 +0200 In-Reply-To: <555F670D.5010307@redhat.com> (John Snow's message of "Fri, 22 May 2015 13:27:41 -0400") Message-ID: <877frvg3it.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] qapi: add dirty bitmap status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: qemu-devel@nongnu.org John Snow writes: > On 05/22/2015 04:52 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 05/12/2015 01:53 PM, John Snow wrote: >>>> Bitmaps can be in a handful of different states with potentially >>>> more to come as we tool around with migration and persistence patches. >>>> >>>> Instead of having a bunch of boolean fields, it was suggested that we >>>> just have an enum status field that will help expose the reason to >>>> management APIs why certain bitmaps may be unavailable for various >>>> commands >>>> >>>> (e.g. busy in another operation, busy being migrated, etc.) >>> >>> Might be worth mentioning that this is an API change, but safe because >>> the old API is unreleased (and therefore, this patch MUST go in the 2.4 >>> time frame, if at all). >>> >>>> >>>> Suggested-by: Eric Blake >>>> Signed-off-by: John Snow >>>> --- >>>> block.c | 13 ++++++++++++- >>>> include/block/block.h | 1 + >>>> qapi/block-core.json | 23 +++++++++++++++++++++-- >>>> 3 files changed, 34 insertions(+), 3 deletions(-) >>>> >>> >>> Reviewed-by: Eric Blake >> >> Patch does two things: >> >> 1. Convert status from bool frozen to enum. >> 2. Add new status 'disabled'. >> >> I would've done this separately, but it's no big deal. But I think we >> should spell it out in the commit message. >> >> What about: >> >> qapi: add dirty bitmap status >> >> Bitmaps can be in a handful of different states with potentially >> more to come as we tool around with migration and persistence patches. >> >> Management applications may need to know why certain bitmaps are >> unavailable for various commands, e.g. busy in another operation, >> busy being migrated, etc. >> >> Right now, all we offer is BlockDirtyInfo's boolean member 'frozen'. >> Instead of adding more booleans, replace it by an enumeration member >> 'status' with values 'active' and 'frozen'. Then add new value >> 'disabled'. >> >> Incompatible change. Fine because the changed part hasn't been >> released so far. >> >> Suggested-by: Eric Blake >> Signed-off-by: John Snow >> Reviewed-by: Eric Blake >> [Commit message tweaked] >> Signed-off-by: Markus Armbruster >> > > This is OK by me, Markus. I'll assume that you are OK with or have > already made these changes locally, so I won't resend. Applied to my block-next branch, thanks!