[lkml]   [2001]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectQuestion: fs meta data, page cache and locking
It was suggested to repost the below as a new thread and to cc: linux-fsdevel.

Any comments would be appreciated.


So here goes:

At 12:41 08/03/01, Ingo Oeser wrote:
> > On Thu, Mar 08, 2001 at 11:39:27AM +0000, Anton Altaparmakov wrote:
>[snip, attributions lost]
> > > > >+ * During disk I/O, PG_locked is used. This bit is set before I/O
> > > > >+ * and reset when I/O completes. page->wait is a wait queue of all
> > > > >+ * tasks waiting for the I/O on this page to complete.
> > When the NTFS file system driver needs to modify the meta data,
> > which will be in the page cache (meta data is stored in normal files on
> > NTFS, hence the page cache is very well suited to storing it with it's
> > page->mapping and page->index fields), does the NTFS driver need to set
> > PG_locked while writing to the page?
>May be you should raise these issues again under a separate
>subject and CC for this.
>I think it is worth it, because Linus want all fs to use page
>cache for meta data and let buffer cache die slowly.
>Basically the rules go like this:
>The VM will wait for PG_locked pages, before it accesses them or
>ignore them, if it cannot wait.
>It will also try to read in pages, that are not PG_uptodate.
>But user space will never see metadata pages anyway, so you
>should be the only one, who cares about them. Just be prepared to
>writepage() and readpage() and the like.
>Just use lock_page() if you can sleep and TryLockPage() + EFAULT
>(or similar) if you cannot.
>Then just check Page_Uptodate() before you read and do
>ClearUptodate() if you start writing to the metadata.
>Since these operations are atomic bit operations, it should
>suffice for your purpose.
>But as stated above, I'm not very sure that I understand all the
>code and know of all the races.
>Multiple readers are AFAICS not yet possible with the current page
>Ingo Oeser
>10.+11.03.2001 - 3. Chemnitzer LinuxTag <>
> <<<<<<<<<<<< come and join the fun >>>>>>>>>>>>

Anton Altaparmakov <aia21 at> (replace at with @)
Linux NTFS Maintainer / WWW:
ICQ: 8561279 / WWW:

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:29    [W:0.039 / U:5.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site