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>
Sun, 23 Mar 2008 03:48:12 +0000 (23:48 -0400)
commit5d82e46a4463d514944e3405b8eb05e05bc2dafb
tree16c4f648fbe6ed319667132b25fb723247b9f506
parentffe782ab65c2793b04b5ed084d441621d44d1711
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