lkml.org 
[lkml]   [2013]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: RFC: mincore: add a bit to indicate a page is dirty.
Date
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.


\
 
 \ /
  Last update: 2013-02-12 07:41    [W:1.316 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site