From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56193) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYGwq-0007Jl-6m for qemu-devel@nongnu.org; Thu, 10 Apr 2014 11:31:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WYGwj-0004cZ-KI for qemu-devel@nongnu.org; Thu, 10 Apr 2014 11:31:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23784) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WYGwj-0004cT-Bc for qemu-devel@nongnu.org; Thu, 10 Apr 2014 11:31:21 -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 s3AFVHgW018824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 10 Apr 2014 11:31:20 -0400 Message-ID: <5346AD4B.2050004@redhat.com> Date: Thu, 10 Apr 2014 16:40:11 +0200 From: Max Reitz MIME-Version: 1.0 References: <1396961442-24046-1-git-send-email-mreitz@redhat.com> <1396961442-24046-2-git-send-email-mreitz@redhat.com> <534421EB.9050801@redhat.com> In-Reply-To: <534421EB.9050801@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/6] block-commit: Expose granularity List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi On 08.04.2014 18:20, Eric Blake wrote: > On 04/08/2014 06:50 AM, Max Reitz wrote: >> Allow QMP users to manipulate the granularity used in the block-commit >> command. >> >> Signed-off-by: Max Reitz >> --- > >> +++ b/include/block/block_int.h >> @@ -426,6 +426,7 @@ void stream_start(BlockDriverState *bs, BlockDriverState *base, >> * @top: Top block device to be committed. >> * @base: Block device that will be written into, and become the new top. >> * @speed: The maximum speed, in bytes per second, or 0 for unlimited. >> + * @granularity: The granularity, in bytes, or 0 for a default value. >> * @on_error: The action to take upon error. >> * @cb: Completion function for the job. >> * @opaque: Opaque pointer value passed to @cb. >> @@ -433,7 +434,7 @@ void stream_start(BlockDriverState *bs, BlockDriverState *base, >> * >> */ >> void commit_start(BlockDriverState *bs, BlockDriverState *base, >> - BlockDriverState *top, int64_t speed, >> + BlockDriverState *top, int64_t speed, int64_t granularity, >> BlockdevOnError on_error, BlockDriverCompletionFunc *cb, >> void *opaque, Error **errp); > Worth fixing the indentation while you are touching this? I'm always in favor of code style clean-up. ;-) Max > Reviewed-by: Eric Blake