linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Badari Pulavarty <pbadari@us.ibm.com>
To: Alex Tomas <alex@clusterfs.com>
Cc: Nikita Danilov <nikita@clusterfs.com>,
	fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Lazy block allocation and block_prepare_write?
Date: Tue, 19 Apr 2005 09:59:18 -0700	[thread overview]
Message-ID: <426538E6.2050700@us.ibm.com> (raw)
In-Reply-To: <m3k6myda3w.fsf@bzzz.home.net>

Alex Tomas wrote:
>>>>>>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())

Yep. We need one more to indicate the we reserved a block for this page.

Other option I was thinking on how to avoid is, by "reserving" a block
when a mapped page changes from read -> write. Andrew's -mm tree has
patch to give us a notification when it happens.

Thanks,
Badari


  reply	other threads:[~2005-04-19 16:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-18  0:54 Lazy block allocation and block_prepare_write? Martin Jambor
2005-04-19  3:01 ` Badari Pulavarty
2005-04-19 10:10   ` Alex Tomas
2005-04-19 14:48     ` Badari Pulavarty
2005-04-19 15:04       ` Alex Tomas
2005-04-19 15:00         ` Badari Pulavarty
2005-04-19 15:20           ` Alex Tomas
2005-04-19 11:22   ` Nikita Danilov
2005-04-19 14:46     ` Badari Pulavarty
2005-04-19 15:55       ` Nikita Danilov
2005-04-19 16:06         ` Alex Tomas
2005-04-19 16:59           ` Badari Pulavarty [this message]
2005-04-19 17:08         ` Mingming Cao
2005-04-19 18:45           ` Nikita Danilov
2005-04-20  0:00     ` Bryan Henderson
2005-04-19 20:41   ` Martin Jambor
2005-04-20 14:52     ` Badari Pulavarty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=426538E6.2050700@us.ibm.com \
    --to=pbadari@us.ibm.com \
    --cc=alex@clusterfs.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nikita@clusterfs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).