From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ysj5C-0002ed-Lj for qemu-devel@nongnu.org; Wed, 13 May 2015 22:41:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ysj5B-0008GL-Rr for qemu-devel@nongnu.org; Wed, 13 May 2015 22:41:10 -0400 Date: Thu, 14 May 2015 10:40:59 +0800 From: Fam Zheng Message-ID: <20150514024059.GE862@ad.nay.redhat.com> References: <1431538099-3286-1-git-send-email-famz@redhat.com> <1431538099-3286-2-git-send-email-famz@redhat.com> <55533DB3.20402@redhat.com> <20150513150219.GF30644@ad.nay.redhat.com> <55536940.9030301@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55536940.9030301@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 01/11] block: Add op blocker type "device IO" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , qemu-block@nongnu.org, qemu-devel@nongnu.org, jcody@redhat.com, armbru@redhat.com, mreitz@redhat.com, Stefan Hajnoczi On Wed, 05/13 17:09, Paolo Bonzini wrote: > > > On 13/05/2015 17:02, Fam Zheng wrote: > >> > For example, SCSI requests can result in many consecutive I/Os: > >> > > >> > (1) FUA requests are split in write+flush > >> > > >> > (2) adapters that do not use QEMUSGList-based I/O only read 128K at a time > >> > > >> > (3) WRITE SAME operations are also split in chunks > >> > > >> > (4) UNMAP operations process one descriptor at a time > > I don't understand the point of these examples. If we don't return -EBUSY here, > > the request will sneak into block/io.c and perhaps break qmp transaction > > semantics, if it lands between two backups. > > It won't, because after blocking DEVICE_IO you will always drain I/O and > the bdrv_drain will loop until the above are all satisfied. That's right, I'll drop this patch. Fam