From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwBaD-0008HJ-CM for qemu-devel@nongnu.org; Mon, 17 Oct 2016 13:20:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwBa9-0002yo-Ms for qemu-devel@nongnu.org; Mon, 17 Oct 2016 13:20:17 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:39074 helo=relay.sw.ru) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwBa9-0002xu-Bs for qemu-devel@nongnu.org; Mon, 17 Oct 2016 13:20:13 -0400 References: <1475232808-4852-1-git-send-email-vsementsov@virtuozzo.com> <1475232808-4852-12-git-send-email-vsementsov@virtuozzo.com> <8092a3b9-1290-5566-f29e-8f894559f927@redhat.com> From: Vladimir Sementsov-Ogievskiy Message-ID: <58050837.4050907@virtuozzo.com> Date: Mon, 17 Oct 2016 20:19:51 +0300 MIME-Version: 1.0 In-Reply-To: <8092a3b9-1290-5566-f29e-8f894559f927@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_bitmaps() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: kwolf@redhat.com, armbru@redhat.com, eblake@redhat.com, jsnow@redhat.com, famz@redhat.com, den@openvz.org, stefanha@redhat.com, pbonzini@redhat.com On 07.10.2016 22:24, Max Reitz wrote: > On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: >> Realize block bitmap stroing interface, to allow qcow2 images store >> persistent bitmaps. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >> block/qcow2-bitmap.c | 241 +++++++++++++++++++++++++++++++++++++++++++++++++++ [...] >> >> + ret = bdrv_pwrite(bs->file, off, buf, cl_size); >> + if (ret < 0) { >> + goto finish; >> + } >> + >> + if (end >= bm_size) { >> + break; >> + } >> + >> + bdrv_set_dirty_iter(dbi, end); >> + } >> + ret = 0; /* writes */ > What is that comment supposed to mean? > > Now I think I can drop this assignment, as bdrv_aligned_preadv have 'return ret < 0 ? ret : 0;' in the end... Am I right? Can bdrv_pwrite and friends return positive value on success? -- Best regards, Vladimir