Johannes Weiner <han...@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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/