From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xye0T-0000eL-2f for qemu-devel@nongnu.org; Wed, 10 Dec 2014 04:56:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xye0H-0000oS-Ea for qemu-devel@nongnu.org; Wed, 10 Dec 2014 04:56:29 -0500 Sender: Paolo Bonzini Message-ID: <548818BC.4050905@redhat.com> Date: Wed, 10 Dec 2014 10:56:12 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1417796112-15141-1-git-send-email-ming.lei@canonical.com> <5481DE62.4000206@redhat.com> <5487351C.9020706@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] block: fix big write List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ming Lei Cc: Kevin Wolf , qemu-stable@nongnu.org, Stefan Hajnoczi , qemu-devel On 10/12/2014 02:41, Ming Lei wrote: > On Wed, Dec 10, 2014 at 1:45 AM, Paolo Bonzini wrote: >> >> >> On 08/12/2014 08:19, Ming Lei wrote: >>>>> >>>>> Alternatively, I'd accept a SCSI patch setting max_ws_blocks and friends >>>>> to 2GB - 1 block. >>> It should be better to not introduce the limit and split the writes >>> into size of 2GB - 1 block since there is only the limit for write zero. >> >> Why? That's exactly what the max_ws_blocks is for, and there's code in >> the guest already to do the split. We're talking about 2GB, not 1MB. > > The split in write same does not cover write zero, and that is the problem. > Otherwise write same just works fine. That said write same of QEMU SCSI > can work well without max write same sectors limit. > > If we introduce the limit of max write same sectors, this limit will be put > on both write zero and write non-zero path. Yeah, but the 2GB limit happens also for the regular I/O path. The quirk is that it doesn't happen for non-zero WRITE SAME, not the other way round. > Also "MAXIMUM WRITE SAME LENGTH" is just introduced on sbc3r35 > in Jan, 2013, and some old host drivers may not support it, and not using > the limit should have better compatibility. Again, we're talking of 2GB and this is something that should never happen in practice. I'll write the patch myself. Paolo > Thanks, > Ming Lei > >