From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adZ2u-0002MW-V6 for qemu-devel@nongnu.org; Wed, 09 Mar 2016 03:00:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adZ2u-0006zL-5P for qemu-devel@nongnu.org; Wed, 09 Mar 2016 03:00:40 -0500 Date: Wed, 9 Mar 2016 16:00:30 +0800 From: Fam Zheng Message-ID: <20160309080030.GA30583@ad.usersys.redhat.com> References: <1455645388-32401-1-git-send-email-pbonzini@redhat.com> <1455645388-32401-7-git-send-email-pbonzini@redhat.com> <20160309033504.GE17947@ad.usersys.redhat.com> <56DFD40D.4040109@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56DFD40D.4040109@redhat.com> Subject: Re: [Qemu-devel] [PATCH 06/16] block: add BDS field to count in-flight requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, stefanha@redhat.com On Wed, 03/09 08:43, Paolo Bonzini wrote: > > > On 09/03/2016 04:35, Fam Zheng wrote: > >> > enum BdrvTrackedRequestType { > >> > BDRV_TRACKED_READ, > >> > BDRV_TRACKED_WRITE, > >> > - BDRV_TRACKED_FLUSH, > >> > - BDRV_TRACKED_IOCTL, > >> > BDRV_TRACKED_DISCARD, > > Okay, so flush and ioctl are not needed, but why is discard different? > > Discard can modify the contents of the device, so I think it's safer to > serialize it against RMW and copy-on-read operations. Okay, that makes sense, but ioctl like SG_IO can also modify content, no? Fam