From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Manning Subject: Re: [RFC PATCH] forget block layer request for FTLs Date: Fri, 25 Nov 2005 13:36:41 +1300 Message-ID: <200511251336.41191.manningc2@actrix.gen.nz> References: <20051124132157.GA16439@atlantis.8hz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from blood.actrix.co.nz ([203.96.16.163]:63879 "EHLO blood.actrix.co.nz") by vger.kernel.org with ESMTP id S932673AbVKYAhl convert rfc822-to-8bit (ORCPT ); Thu, 24 Nov 2005 19:37:41 -0500 To: Sean Young In-Reply-To: <20051124132157.GA16439@atlantis.8hz.com> Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Friday 25 November 2005 02:21, Sean Young wrote: > Any flash device which appears as a normal block device to user space > has a flash translation layer (FTL) which from time to time garbage > collects, i.e. moves data around to make room for an erase. Data might > be moved from one erase unit to another, so a full erase unit can be > erased without losing data. > > The FTL is unaware of any "unused" sectors; e.g. if a file is > unlinked the sectors where the data of that (former) file resides will > still be considered for garbage collection, even though those sectors > are no longer relevant. > > The purpose of this patch is to make it possible for file system drivers > to inform the block device of "staleness" of no-longer-used sectors. This > patch introduces another barrier request, REQ_FORGET. The semantics > of this requests are that no read() is expected before the next write(), > i.e. read() may return garbage in the time between forget() and the > next write(). Being a bit of a flash-head, I find this RPC quite interesting. I am struggling though to see exactly where this is going to be used. >>From what I understand, you're going to have file knowledge passed into the block driver and need a special fs to exploit this. This is starting to break down the whole point of a block driver isn't it? Perhaps if you hacked a fs to use this that would show the benefits. -- CHarles