From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Tomas Subject: Re: Lazy block allocation and block_prepare_write? Date: Tue, 19 Apr 2005 20:06:43 +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: Badari Pulavarty , fsdevel Return-path: Received: from [83.102.214.158] ([83.102.214.158]:49338 "EHLO gw.home.net") by vger.kernel.org with ESMTP id S261619AbVDSQIR (ORCPT ); Tue, 19 Apr 2005 12:08:17 -0400 To: Nikita Danilov In-Reply-To: (Nikita Danilov's message of "Tue, 19 Apr 2005 19:55:03 +0400") Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org >>>>> Nikita Danilov (ND) writes: >>> > 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. ND> Clarification: PG_mappedtodisk is already here, it seems you can reuse ND> this already existing bit to implement delayed allocation support. I think we need another one, because mappedtodisk != reserved. we could use mappedtodisk, but this means in ->commit_write() we'd need to check that one more time (first time in ->prepare_write()) thanks, Alex