Received: from eggs.gnu.org ([2001:4830:134:3::10]:47873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bz2aP-0005YE-1X for qemu-devel@nongnu.org; Tue, 25 Oct 2016 10:20:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bz2aL-0001Wm-Tq for qemu-devel@nongnu.org; Tue, 25 Oct 2016 10:20:17 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:47960 helo=mx01.kamp.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bz2aL-0001W2-Jf for qemu-devel@nongnu.org; Tue, 25 Oct 2016 10:20:13 -0400 References: <1469129688-22848-1-git-send-email-eblake@redhat.com> <1469129688-22848-5-git-send-email-eblake@redhat.com> <20160727072543.GF23258@ad.usersys.redhat.com> <5799704D.9060408@redhat.com> <18c31752-8399-1763-a42e-c2b924920b55@redhat.com> <12c8e895-f8ab-825f-82e7-4a2c8cc22de5@kamp.de> <9078195b-160a-e18f-b8ef-c9f2ba712416@redhat.com> <4cd56bb4-fa0d-493c-18b1-4cec0467a6bf@kamp.de> <567caf97-24bd-b5e6-a999-405ef01b2c21@redhat.com> <78e7e5d9-4f43-c50d-4531-de5c1a0e1a83@kamp.de> <25f42457-369e-152e-edce-44a4835c6c68@redhat.com> From: Peter Lieven Message-ID: Date: Tue, 25 Oct 2016 16:20:08 +0200 MIME-Version: 1.0 In-Reply-To: <25f42457-369e-152e-edce-44a4835c6c68@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Paolo Bonzini , Fam Zheng Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Stefan Hajnoczi , Kevin Wolf , Max Reitz Am 25.10.2016 um 15:59 schrieb Eric Blake: > On 10/25/2016 07:42 AM, Peter Lieven wrote: >>> But hey, that firmware is seriously weird. :) >> Yes, so you would not change the new implementation? >> >> Even if the discard is e.g. 1MB it could theretically be that internally >> the device has a finer granularity. Its an optimal discard alignment >> not the minimum required discard size. I think thats a difference. >> It does not say I can't handle smaller discards. > The firmware is probably technically buggy for advertising too large of > a minimum granularity, if it can piece together smaller requests into a > larger discard. If discards need to happen at a smaller granularity, > the firmware (or kernel quirk system) should fix the advertisement to > the actual granularity that it will honor. I don't see a reason to > change qemu's current behavior. > The issue is that the optimal unmap granularity is only a hint. There is no evidence what happens with unaligned requests or requests that are smaller. They could still lead to a discard operation in the storage device. It just says if you can send me discards of that size thats optimal for me. Thats not said that smaller or unaligned requests have no effect. Peter