Unionfs: cache-coherency calls to maintain the time invariants
authorErez_Zadok <ezk@cs.sunysb.edu>
Mon, 18 Jun 2007 02:39:05 +0000 (22:39 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 29 Apr 2011 02:24:10 +0000 (22:24 -0400)
commit948980bd35d25e6253e90b6a523307017319016f
tree27c03c86a28f857cf033ee2ab5c41d9c93c7325e
parent7d350a9ffa1e6bd8e960181bd34b1caafbbffcc2
Unionfs: cache-coherency calls to maintain the time invariants

This patch represents several types of related changes.  First, we invoke
functions to synchronize the upper and lower times as and when needed.  Many
of these were bug fixes which were discovered during the development of the
cache-coherency code.  That is, Unionfs itself wasn't maintaining
appropriate
times in some places, which if not fixed would have been detected by the
invariant-checking code as a false positive (incorrectly considered as if a
user modified the lower objects directly).

Second, we do not call invariant-validation functions (unionfs_check_file,
unionfs_check_dentry, etc.) until *after* we've revalidated them.  Otherwise
we produced false positives.

Third, we pass a flag "willwrite" to __unionfs_d_revalidate_chain to tell it
to purge data pages if the inode lower times appear to be newer.

See Documentation/filesystems/unionfs/concepts.txt under the "Cache
Coherency" section for more details of this design and implementation.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/commonfops.c
fs/unionfs/copyup.c
fs/unionfs/dentry.c
fs/unionfs/file.c
fs/unionfs/inode.c
fs/unionfs/main.c
fs/unionfs/mmap.c
fs/unionfs/rename.c
fs/unionfs/super.c
fs/unionfs/unlink.c
fs/unionfs/xattr.c