From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtfMi-0007pG-Fc for qemu-devel@nongnu.org; Tue, 03 Nov 2015 12:27:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtfMh-0007Iv-K2 for qemu-devel@nongnu.org; Tue, 03 Nov 2015 12:27:24 -0500 References: <1445644612-12702-1-git-send-email-jsnow@redhat.com> <1445644612-12702-13-git-send-email-jsnow@redhat.com> <20151103151741.GE15414@stefanha-x1.localdomain> From: John Snow Message-ID: <5638EE77.9080505@redhat.com> Date: Tue, 3 Nov 2015 12:27:19 -0500 MIME-Version: 1.0 In-Reply-To: <20151103151741.GE15414@stefanha-x1.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v10 12/14] block: add transactional properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: vsementsov@virtuozzo.com, famz@redhat.com, armbru@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote: > On Fri, Oct 23, 2015 at 07:56:50PM -0400, John Snow wrote: >> @@ -1732,6 +1757,10 @@ static void block_dirty_bitmap_add_prepare(BlkActionState *common, >> BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState, >> common, common); >> >> + if (action_check_cancel_mode(common, errp) < 0) { >> + return; >> + } >> + >> action = common->action->block_dirty_bitmap_add; >> /* AIO context taken and released within qmp_block_dirty_bitmap_add */ >> qmp_block_dirty_bitmap_add(action->node, action->name, >> @@ -1767,6 +1796,10 @@ static void block_dirty_bitmap_clear_prepare(BlkActionState *common, >> common, common); >> BlockDirtyBitmap *action; >> >> + if (action_check_cancel_mode(common, errp) < 0) { >> + return; >> + } >> + >> action = common->action->block_dirty_bitmap_clear; >> state->bitmap = block_dirty_bitmap_lookup(action->node, >> action->name, > > Why do the bitmap add/clear actions not support err-cancel=all? > > I understand why other block jobs don't support it, but it's not clear > why these non-block job actions cannot. > Because they don't have a callback to invoke if the rest of the job fails. I could create a BlockJob for them complete with a callback to invoke, but basically it's just because there's no interface to unwind them, or an interface to join them with the transaction. They're small, synchronous non-job actions. Which makes them weird.