From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgZcK-0003tv-GQ for qemu-devel@nongnu.org; Mon, 28 Sep 2015 10:41:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgZcG-000096-P4 for qemu-devel@nongnu.org; Mon, 28 Sep 2015 10:41:24 -0400 Date: Mon, 28 Sep 2015 16:41:12 +0200 From: Kevin Wolf Message-ID: <20150928144112.GA18068@noname.str.redhat.com> References: <9ae0ce111c95c6f76e872b12b2a6af895f5cfab6.1443410673.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9ae0ce111c95c6f76e872b12b2a6af895f5cfab6.1443410673.git.jcody@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/3] block: allow creation of detached dirty bitmaps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: stefanha@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org Am 28.09.2015 um 05:29 hat Jeff Cody geschrieben: > This allows the creation of detached dirty bitmaps, so that the > block driver dirty bitmaps can be used without inserting the > bitmap into the dirty bitmap list for a BDS. > > To free a bitmap that was created "detached = true", call > bdrv_release_dirty_bitmap() with the BlockDriverState argument > as NULL. > > Signed-off-by: Jeff Cody It this really still a proper dirty bitmap? After all, bdrv_set_dirty() doesn't affect the bitmap any more, query-block doesn't mention them etc. What is the advantage of using the dirty bitmap infrastructure instead of just using a plain bitmap without the "dirty" part? Also, the bitmap is still made for a specific BDS, especially with regards to its size. For dirty bitmaps, bdrv_truncate() calls bdrv_dirty_bitmap_truncate() in order to resize the bitmaps as well. This mechanism doesn't work any more if the bitmap isn't in the dirty bitmaps list. Do we need something like an op blocker? Though I'm not sure if an operation as basic as bdrv_truncate() can be reasonably blocked at all. Maybe we can only block the QMP resize command. Kevin