From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ric Wheeler Subject: Re: [PATCH 2/2] sd: WRITE SAME(16) / UNMAP support Date: Fri, 30 Oct 2009 12:02:41 -0400 Message-ID: <4AEB0E21.4060401@redhat.com> References: <1256873409-12668-1-git-send-email-martin.petersen@oracle.com> <1256873409-12668-3-git-send-email-martin.petersen@oracle.com> <4AEA6B76.2010303@interlog.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: dgilbert@interlog.com, hch@infradead.org, axboe@kernel.dk, matthew@wil.cx, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org To: "Martin K. Petersen" Return-path: In-Reply-To: Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 10/30/2009 12:53 AM, Martin K. Petersen wrote: >>>>>> "Doug" == Douglas Gilbert writes: >>>>>> > Doug> And if both are supported by the logical unit, the patch prefers > Doug> UNMAP? > > Yes. > > SBC states that if the device reports MAXIMUM UNMAP LBA COUNT> 1 and > MAXIMUM UNMAP DESCRIPTOR COUNT> 1 then the device supports UNMAP. And > in that case that's what I'll issue. In all other cases I'll send out > WRITE SAME(16). I believe that approach is what's currently considered > best practice. > This sounds like the correct thing to do. We should at the same time try to unify the file system mount options so we roll out the testing in a careful way. Specifically, I would suggest that we default to "not" issuing discards by default and that we try to use the same mount option for any file system that supports barrier discards. My worry is that we will fry SSD's (like the reported issues with the Intel SSD's and Windows 7) or have horrific performance on arrays that are not tuned for fine grained discards :-) Ric