Re: statfs() / statvfs() syscall ballsup...

From: Trond Myklebust
Date: Fri Oct 10 2003 - 15:41:14 EST



> If you had a "this region is stale" thing, you'd just use
> it. And if it was local disk, it wouldn't do anything.

Note that in order to be race-free, such a command would also have to
wait on any outstanding operations (i.e. both pending reads and
writes) on the region in question in order to make sure that none have
crossed the synchronization point. It is not a question of just
calling invalidate_inode_pages() and thinking that all is well...

In fact, I recently noticed that we still have this race in the NFS
file locking code: readahead may have been scheduled before we
actually set the file lock on the server, and may thus fill the page
cache with stale data.

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/