Messages in this thread | | | From | Rusty Russell <> | Subject | Re: RFC: mincore: add a bit to indicate a page is dirty. | Date | Tue, 12 Feb 2013 16:19:29 +1030 |
| |
Johannes Weiner <hannes@cmpxchg.org> writes:
> On Mon, Feb 11, 2013 at 01:43:03PM +1030, Rusty Russell wrote: >> I am writing an app which really wants to know if a file is on the >> disk or not (ie. do I need to sync?). > > When the page is under writeback, it's not necessarily on disk yet, > but you also don't need to sync. Which semantics make more sense? > > I'm leaning toward checking both PG_dirty and PG_writeback.
If it's already under PG_writeback, you probably still need to wait for it to finish if you're trying to ensure write ordering. ie. sync.
I've updated my patch by stealing your code.
Thanks! Rusty.
| |