From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlEqa-0001xj-NR for qemu-devel@nongnu.org; Tue, 26 Nov 2013 04:22:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VlEqU-000834-OY for qemu-devel@nongnu.org; Tue, 26 Nov 2013 04:22:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VlEqU-00082x-7B for qemu-devel@nongnu.org; Tue, 26 Nov 2013 04:22:14 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAQ9MDqI014377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 26 Nov 2013 04:22:13 -0500 Message-ID: <5294683F.8090004@redhat.com> Date: Tue, 26 Nov 2013 10:22:07 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1385097894-1380-1-git-send-email-famz@redhat.com> <1385097894-1380-3-git-send-email-famz@redhat.com> <52938532.1080803@redhat.com> <52940262.2090406@redhat.com> In-Reply-To: <52940262.2090406@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 2/7] block: Introduce op_blockers to BlockDriverState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: kwolf@redhat.com, hbrock@redhat.com, qemu-devel@nongnu.org, rjones@redhat.com, imain@redhat.com, stefanha@redhat.com Il 26/11/2013 03:07, Fam Zheng ha scritto: >>> >>> +void bdrv_op_unblock(BlockDriverState *bs, BlockOpType op, Error >>> *reason) >> >> What about making BlockOpType a bitmask, and having bdrv_op_{,un}block >> take multiple ORed BlockOpTypes? >> >> bdrv_op_{,un}block_all then are not necessary, you only need a >> BLOCK_OPERATION_ALL value. >> > > Bitmap is not enough, at least it should be an array. For example when > we enable multiple block jobs, there're two stoppers for drive_del, right? I said bitmask, not bitmap. :) So that you can add the same Error to multiple items of the array with a single bdrv_op_block call (by ORing them into the second parameter). Paolo