From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: What's the "prepare_discard_fn" supposed to do? Date: Fri, 03 Oct 2008 09:48:39 +0300 Message-ID: <48E5C047.7020004@yandex.ru> References: <1222955524.3518.400.camel@macbook.infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Chris Worley , linux-fsdevel@vger.kernel.org To: David Woodhouse Return-path: Received: from smtp.nokia.com ([192.100.105.134]:26979 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753708AbYJCGuP (ORCPT ); Fri, 3 Oct 2008 02:50:15 -0400 In-Reply-To: <1222955524.3518.400.camel@macbook.infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 i= ts > 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. --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html