From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3sHk-0003Gs-Pi for qemu-devel@nongnu.org; Wed, 14 Sep 2011 12:26:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3sHj-0003xY-OI for qemu-devel@nongnu.org; Wed, 14 Sep 2011 12:26:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26397) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3sHj-0003xU-DC for qemu-devel@nongnu.org; Wed, 14 Sep 2011 12:26:03 -0400 Message-ID: <4E70D597.2040405@redhat.com> Date: Wed, 14 Sep 2011 18:25:59 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1315495505-28906-1-git-send-email-pbonzini@redhat.com> <1315495505-28906-7-git-send-email-pbonzini@redhat.com> <20110914154422.GA13438@lst.de> In-Reply-To: <20110914154422.GA13438@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 06/12] nbd: support NBD_CMD_TRIM in the server List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel@nongnu.org On 09/14/2011 05:44 PM, Christoph Hellwig wrote: >> Map it to bdrv_discard. The server can now expose NBD_FLAG_SEND_TRIM. > > Note that discard support without a way to communicate the alignment/size > requirements, Yep, especially because alignment can be as small as 512 for sparse raw, and as high as 65536 for qcow2... > and without the discard_zeroes_data flag is pretty much > useless. ... but right now in QEMU it is most useful with qcow2, so !discard_zeroes_data is pretty much the best you can do. In general, QEMU's block layer does not really do much to pass information on discard features, which is why I didn't think much about these bits. I'm interested in making NBD as featureful as the QEMU block layer, but beyond that not much. :) Still you're obviously right, I'll talk to upstream. Paolo