From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vujy6-0000q8-2P for qemu-devel@nongnu.org; Sun, 22 Dec 2013 09:25:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vujxw-0003AL-W6 for qemu-devel@nongnu.org; Sun, 22 Dec 2013 09:25:22 -0500 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:45138) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vujxw-00039D-7b for qemu-devel@nongnu.org; Sun, 22 Dec 2013 09:25:12 -0500 Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 23 Dec 2013 00:25:08 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 9CA772BB002D for ; Mon, 23 Dec 2013 01:25:06 +1100 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rBMEOrLF61538476 for ; Mon, 23 Dec 2013 01:24:53 +1100 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rBMEP53b022949 for ; Mon, 23 Dec 2013 01:25:05 +1100 Date: Sun, 22 Dec 2013 19:56:40 +0530 From: Bharata B Rao Message-ID: <20131222142639.GB3374@in.ibm.com> References: <1387720647-10284-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1387720647-10284-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] scsi-disk: add UNMAP limits to block limits VPD page Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Sun, Dec 22, 2013 at 02:57:27PM +0100, Paolo Bonzini wrote: > Linux prefers WRITE SAME to UNMAP if the limits are zero, and WRITE > SAME does not discard anything unless the device can guarantee that > the resulting block is zero. > > Setting the maximum unmap block and descriptor counts to non-zero > makes Linux choose UNMAP and fixes thin provisioning on glusterfs. > > While the maximum unmap block count can have some effect on performance, > the (suggested) maximum number of descriptors is not particularly > important so I didn't add a customization option. SCSI drivers are > used to online firmware updates so I'm not yet adding versioning support > for SCSI, but we're probably getting close to the point when it's worth > thinking about it. > > Reported-by: Bharata B Rao > Signed-off-by: Paolo Bonzini This patch fixes thin provisioning on gluster. Tested-by: Bharata B Rao Regards, Bharata.