From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Danilov Subject: Re: Lazy block allocation and block_prepare_write? Date: Tue, 19 Apr 2005 19:55:03 +0400 Message-ID: References: <8e70aacf05041717546fdff3f@mail.gmail.com> <42647484.5040208@us.ibm.com> <16996.59873.671294.982899@gargle.gargle.HOWL> <1113921972.26913.417.camel@dyn318077bld.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: fsdevel Return-path: Received: from [80.71.243.242] ([80.71.243.242]:25291 "EHLO tau.rusteko.ru") by vger.kernel.org with ESMTP id S261248AbVDSPzL (ORCPT ); Tue, 19 Apr 2005 11:55:11 -0400 To: Badari Pulavarty In-Reply-To: <1113921972.26913.417.camel@dyn318077bld.beaverton.ibm.com> (Badari Pulavarty's message of "19 Apr 2005 07:46:12 -0700") Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Badari Pulavarty writes: > On Tue, 2005-04-19 at 04:22, Nikita Danilov wrote: >> Badari Pulavarty writes: >> >> [...] >> >> > >> > Yes. Its possible to do what you want to. I am currently working on >> > adding "delayed allocation" support to ext3. As part of that, We >> >> As you most likely already know, Alex Thomas already implemented delayed >> block allocation for ext3. > > Yep. I reviewed Alex Thomas patches for delayed allocation. He handled > all the cases in his code and did NOT use any mpage* routines to do > the work. I was hoping to change the mpage infrastructure to handle > these, so that every filesystem doesn't have to do their thing. > Just keep in mind that filesystem != ext3. :-) Generic support makes sense only when it is usable by multiple file systems. This is not always possible, e.g., there is no "generic block allocator" for precisely the same reason: disk space allocation policies are tightly intertwined with the rest of file system internals. > >> >> > >> > In order to do the correct accounting, we need to mark a page >> > to indicate if we reserved a block or not. One way to do this, >> > to use page->private to indicate this. But then, all the generic >> >> I believe one can use PG_mappedtodisk bit in page->flags for this >> purpose. There was old Andrew Morton's patch that introduced new bit >> (PG_delalloc?) for this purpose. > > That would be good. But I don't feel like asking for a bit in page > if there is a way to get around it. Clarification: PG_mappedtodisk is already here, it seems you can reuse this already existing bit to implement delayed allocation support. > [...] >> > > Need to think some more. I guess you thought about this more than you > do :) > > Thanks, > Badari > Nikita.