[lkml]   [1999]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Q: generic_file_write sets PG_locked???
In article <>,
Stephen C. Tweedie <> wrote:
>Yes and no. PageLocked may just indicate a background writeback in
>progress. That definitely happens in the swap cache right now, but the
>vfs code doesn't use it for the page cache (yet). It will do.

In fact, it already does for NFS, which uses PageLocked for exactly that
reason (to serialize read and write requests to the same page).

> However,
>if a given filesystem provides its own write-page strategy functions
>which have their own locking semantics, there's no real reason to
>prevent it from doing so as long as the page mapping functions continue
>to block on a non-uptodate page.

For "valid to read", you only check Uptodate. For any actual IO
(whether it's because you're going to actually _do_ the read or set up
some write), PageLocked should be used to synchronize. NFS already does
this, and generic_file_read() already understands about it.


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

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