From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Woodhouse Subject: Re: What's the "prepare_discard_fn" supposed to do? Date: Fri, 03 Oct 2008 07:53:46 +0100 Message-ID: <1223016826.3328.11.camel@macbook.infradead.org> References: <1222955524.3518.400.camel@macbook.infradead.org> <48E5C047.7020004@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: Chris Worley , linux-fsdevel@vger.kernel.org To: Artem Bityutskiy Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:42392 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754400AbYJCGxv (ORCPT ); Fri, 3 Oct 2008 02:53:51 -0400 In-Reply-To: <48E5C047.7020004@yandex.ru> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, 2008-10-03 at 09:48 +0300, Artem Bityutskiy wrote: > Hi David, > > David Woodhouse wrote: > > It's intended to prepare the command which will be sent to the device, > > much like the prepare_flush_fn does. See sd_prepare_flush() in > > drivers/scsi/sd.c for an example (all the devices we've hooked up for > > discard in Linux so far are virtual ones, so they don't make good > > examples). I do have a real ATA drive with TRIM protocol support on its > > way to me though, so I'll be looking at that some time soon. > > Sorry for my ignorance, but why "discard" is used in hard drive? What > may it improve? I've always been thinking it is only useful for SSD and > other FTL-enabled beasts. I said 'real ATA drive'. I didn't say it was magnetic. -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation