From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56255) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0mXb-0006PX-E8 for qemu-devel@nongnu.org; Mon, 23 Nov 2015 03:32:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0mXY-0003ro-8C for qemu-devel@nongnu.org; Mon, 23 Nov 2015 03:32:03 -0500 Received: from mx2.parallels.com ([199.115.105.18]:46301) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0mXY-0003rc-2H for qemu-devel@nongnu.org; Mon, 23 Nov 2015 03:32:00 -0500 References: <1447779778-26062-1-git-send-email-den@openvz.org> From: "Denis V. Lunev" Message-ID: <5652CEEB.9010604@openvz.org> Date: Mon, 23 Nov 2015 11:31:39 +0300 MIME-Version: 1.0 In-Reply-To: <1447779778-26062-1-git-send-email-den@openvz.org> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for 2.5 1/1] parallels: dirty BAT properly for continuous allocations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org, Stefan Hajnoczi On 11/17/2015 08:02 PM, Denis V. Lunev wrote: > From: Vladimir Sementsov-Ogievskiy > > This patch marks part of the BAT dirty properly. There is a possibility that > multy-block allocation could have one block allocated on one BAT page and > next block on the next page. The code without the patch could not save > updated position to the file. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > --- > block/parallels.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/parallels.c b/block/parallels.c > index 4f79293..f689fde 100644 > --- a/block/parallels.c > +++ b/block/parallels.c > @@ -220,7 +220,7 @@ static int64_t allocate_clusters(BlockDriverState *bs, int64_t sector_num, > s->bat_bitmap[idx + i] = cpu_to_le32(s->data_end / s->off_multiplier); > s->data_end += s->tracks; > bitmap_set(s->bat_dirty_bmap, > - bat_entry_off(idx) / s->bat_dirty_block, 1); > + bat_entry_off(idx + i) / s->bat_dirty_block, 1); > } > > return bat2sect(s, idx) + sector_num % s->tracks; Stefan, how should we proceed with this? Should I send this as a pull request or you could take this yourself? Den