From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLIno-0006np-9v for qemu-devel@nongnu.org; Tue, 10 Feb 2015 16:57:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLInk-0001ox-8w for qemu-devel@nongnu.org; Tue, 10 Feb 2015 16:57:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLInk-0001nm-0T for qemu-devel@nongnu.org; Tue, 10 Feb 2015 16:57:00 -0500 Message-ID: <54DA7EA8.8060108@redhat.com> Date: Tue, 10 Feb 2015 16:56:56 -0500 From: Max Reitz MIME-Version: 1.0 References: <1423532117-14490-1-git-send-email-jsnow@redhat.com> <1423532117-14490-3-git-send-email-jsnow@redhat.com> In-Reply-To: <1423532117-14490-3-git-send-email-jsnow@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v12 02/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com, vsementsov@parallels.com, stefanha@redhat.com On 2015-02-09 at 20:35, John Snow wrote: > The new command pair is added to manage user created dirty bitmap. The > dirty bitmap's name is mandatory and must be unique for the same device, > but different devices can have bitmaps with the same names. > > The granularity is an optional field. If it is not specified, we will > choose a default granularity based on the cluster size if available, > clamped to between 4K and 64K to mirror how the 'mirror' code was > already choosing granularity. If we do not have cluster size info > available, we choose 64K. This code has been factored out into a helper > shared with block/mirror. > > This patch also introduces the 'block_dirty_bitmap_lookup' helper, > which takes a device name and a dirty bitmap name and validates the > lookup, returning NULL and setting errp if there is a problem with > either field. This helper will be re-used in future patches in this > series. > > The types added to block-core.json will be re-used in future patches > in this series, see: > 'qapi: Add transaction support to block-dirty-bitmap-{add, enable, disable}' > > Signed-off-by: Fam Zheng > Signed-off-by: John Snow > --- > block.c | 20 ++++++++++ > block/mirror.c | 10 +---- > blockdev.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++ > include/block/block.h | 1 + > qapi/block-core.json | 55 +++++++++++++++++++++++++++ > qmp-commands.hx | 51 +++++++++++++++++++++++++ > 6 files changed, 228 insertions(+), 9 deletions(-) Reviewed-by: Max Reitz