From patchwork Mon Nov 10 11:07:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 408722 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B86AE1400E2 for ; Mon, 10 Nov 2014 22:07:51 +1100 (AEDT) Received: from localhost ([::1]:41954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnmp2-0003fG-Iq for incoming@patchwork.ozlabs.org; Mon, 10 Nov 2014 06:07:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnmoa-00033k-2h for qemu-devel@nongnu.org; Mon, 10 Nov 2014 06:07:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XnmoT-0005b4-Ta for qemu-devel@nongnu.org; Mon, 10 Nov 2014 06:07:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40033) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XnmoT-0005aU-LQ; Mon, 10 Nov 2014 06:07:13 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAAB7C2J021997 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Nov 2014 06:07:13 -0500 Received: from blackfin.pond.sub.org (ovpn-116-42.ams2.redhat.com [10.36.116.42]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sAAB7Adk025927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 10 Nov 2014 06:07:11 -0500 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8094730403AF; Mon, 10 Nov 2014 12:07:09 +0100 (CET) From: Markus Armbruster To: Max Reitz References: <1415610638-3918-1-git-send-email-famz@redhat.com> <5460924C.7040308@redhat.com> Date: Mon, 10 Nov 2014 12:07:09 +0100 In-Reply-To: <5460924C.7040308@redhat.com> (Max Reitz's message of "Mon, 10 Nov 2014 11:24:12 +0100") Message-ID: <87wq73s49u.fsf@blackfin.pond.sub.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-trivial@nongnu.org, mjt@tls.msk.ru, Fam Zheng , qemu-devel@nongnu.org Subject: Re: [Qemu-devel] [PATCH] block: Fix comment for bdrv_co_get_block_status X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Max Reitz writes: > On 2014-11-10 at 10:10, Fam Zheng wrote: >> It returns more information than binary, fix the comment. >> >> Signed-off-by: Fam Zheng >> --- >> block.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/block.c b/block.c >> index dacd881..42c914e 100644 >> --- a/block.c >> +++ b/block.c >> @@ -3903,9 +3903,9 @@ typedef struct BdrvCoGetBlockStatusData { >> } BdrvCoGetBlockStatusData; >> /* >> - * Returns true iff the specified sector is present in the disk image. Drivers >> - * not implementing the functionality are assumed to not support backing files, >> - * hence all their sectors are reported as allocated. >> + * Returns the status of the specified sectors. Drivers not implementing the >> + * functionality are assumed to not support backing files, hence all their >> + * sectors are reported as allocated. >> * >> * If 'sector_num' is beyond the end of the disk image the return value is 0 >> * and 'pnum' is set to 0. > > "status" is a bit broad, but pointing to "line 86 in > include/block/block.h" for a further explanation will probably not be > very stable. > > Reviewed-by: Max Reitz Could perhaps call it "allocation status", and squash in something like Anyway, it's an improvement already, so Reviewed-by: Markus Armbruster diff --git a/include/block/block.h b/include/block/block.h index 13e4537..5450610 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -83,7 +83,9 @@ typedef enum { #define BDRV_SECTOR_SIZE (1ULL << BDRV_SECTOR_BITS) #define BDRV_SECTOR_MASK ~(BDRV_SECTOR_SIZE - 1) -/* BDRV_BLOCK_DATA: data is read from bs->file or another file +/* + * Allocation status flags + * BDRV_BLOCK_DATA: data is read from bs->file or another file * BDRV_BLOCK_ZERO: sectors read as zero * BDRV_BLOCK_OFFSET_VALID: sector stored in bs->file as raw data * BDRV_BLOCK_ALLOCATED: the content of the block is determined by this