From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWJUE-0001xh-0c for qemu-devel@nongnu.org; Tue, 23 Sep 2014 02:22:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWJU4-0002vS-VR for qemu-devel@nongnu.org; Tue, 23 Sep 2014 02:22:05 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:59939 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWJU4-0002uN-Lw for qemu-devel@nongnu.org; Tue, 23 Sep 2014 02:21:56 -0400 Message-ID: <54210FEB.50900@kamp.de> Date: Tue, 23 Sep 2014 08:15:07 +0200 From: Peter Lieven MIME-Version: 1.0 References: <1409935888-18552-1-git-send-email-pl@kamp.de> <1409935888-18552-5-git-send-email-pl@kamp.de> <541AE887.9050607@redhat.com> <541C3095.4040405@redhat.com> <541FEF3A.30909@kamp.de> <54207349.2000107@redhat.com> In-Reply-To: <54207349.2000107@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] block: avoid creating oversized writes in multiwrite_merge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com On 22.09.2014 21:06, Paolo Bonzini wrote: > Il 22/09/2014 11:43, Peter Lieven ha scritto: >> This series aims not at touching default behaviour. The default for max_transfer_length >> is 0 (no limit). max_transfer_length is a limit that MUST be satisfied otherwise the request >> will fail. And Patch 2 aims at catching this fail earlier in the stack. > Understood. But the right fix is to avoid that backend limits transpire > into guest ABI, not to catch the limits earlier. So the right fix would > be to implement request splitting. Since you proposed to add traces for this would you leave those in? And since iSCSI is the only user of this at the moment would you go for implementing this check in the iSCSI block layer? As for the split logic would you think it is enough to build new qiov's out of the too big iov without copying the contents? This would work as long as a single iov inside the qiov is not bigger the max_transfer_length. Otherwise I would need to allocate temporary buffers and copy around. Peter > > Since we never had a bug report about this, I'm not pushing to implement > splitting. However, patch 2 is still wrong. > > Patch 4 instead is fixing a real bug, so it's very much welcome. > > Paolo > >> Currently, we only >> have a limit for iSCSI. Without Patch 2 it would fail after we have send >> the command to >> the target. And without Patch 4 it may happen that multiwrite_merge >> traps the into the limit. >> >> Maybe I should adjust the description of max_transfer_length?