From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7glo-0004C4-3G for qemu-devel@nongnu.org; Wed, 24 Jun 2015 05:15:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7gln-00014G-6K for qemu-devel@nongnu.org; Wed, 24 Jun 2015 05:15:00 -0400 Message-ID: <558A750A.9070604@redhat.com> Date: Wed, 24 Jun 2015 11:14:50 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1433215322-23529-1-git-send-email-famz@redhat.com> <1433215322-23529-3-git-send-email-famz@redhat.com> <20150616160736.GD4958@stefanha-thinkpad.redhat.com> <20150624024747.GC1264@ad.nay.redhat.com> In-Reply-To: <20150624024747.GC1264@ad.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 02/13] block: Introduce bdrv_lock and bdrv_unlock API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , Stefan Hajnoczi Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi On 24/06/2015 04:47, Fam Zheng wrote: >> > 2. Is this about thread safety? (No, it's about exclusive access to a >> > BDS *within* the AioContext.) > As it has to quiesce iothreads as well (for now it's even more urgent than > exclusive access within the same AioContext), I'd rather take it as yes. For now it's a "no", because there are no races between threads: the main thread has acquired the AioContext and cut away the iothread. However, as we move towards fine-grained AioContext critical sections, it will become a "yes". Paolo