Unionfs: implement vm_operations->fault
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 15 Apr 2008 23:49:51 +0000 (19:49 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 15 Apr 2008 23:49:51 +0000 (19:49 -0400)
commit0e475afd4f2dc782a134d63c27815763083f42d7
treef1968e6b84451187aa8d48870d8dd98fba47d018
parentff82017c6e4b221bf1bf81d96f83aa2f5a7b80f9
Unionfs: implement vm_operations->fault

As per recommendations made at LSF'08, a stackable file system which does
not change the data across layers, should try to use vm_operations instead
of address_space_operations.  This means we now have to implement out own
->read and ->write methods because we cannot rely on VFS helpers which
require us to have a ->readpage method.  Either way there are two caveats:

(1) It's not possible currently to set inode->i_mapping->a_ops to NULL,
because too many code paths expect i_mapping to be non-NULL.

(2) a small/dummy ->readpage is still needed because generic_file_mmap,
which we used in unionfs_mmap, still check for the existence of the
->readpage method.  These code paths may have to be changed to remove the
need for readpage().

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/file.c
fs/unionfs/mmap.c
fs/unionfs/union.h