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>
Tue, 13 Jan 2009 01:43:12 +0000 (20:43 -0500)
commit1ba24729d116fe6f4dad609100c89f6e4c036979
tree44fcac55762e07deb720d4b491ad7c8dedfcf815
parent224712c37e1201e6fae26c71635b2da41a1af543
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