Unionfs: implement vm_operations->fault
authorErez Zadok <ezk@cs.sunysb.edu>
Sat, 22 Mar 2008 03:37:44 +0000 (23:37 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Mon, 12 Jan 2009 23:20:53 +0000 (18:20 -0500)
commit51efa3b8713b89d2e8a280b9191c946b5ae5744f
tree6fc4a48d93127e2333f3c9090fa2e16b5ab942c0
parentc05eae3eb11f6fc9f58c33ee13a9caccf3cd128a
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