Unionfs: support direct-IO (DIO) operations
authorErez Zadok <ezk@cs.sunysb.edu>
Sun, 10 Aug 2014 06:34:17 +0000 (02:34 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 11 Nov 2014 16:07:49 +0000 (11:07 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Mengyang Li <li.mengyang@stonybrook.edu>
fs/unionfs/mmap.c

index 488a582d80e68e8b0f236b58e20654d54204c4ad..b6014a3aa91a1da9fcb8c945a3811aaca064e089 100644 (file)
@@ -101,12 +101,17 @@ out:
 }
 
 /*
- * XXX: the default address_space_ops for unionfs is empty.  We cannot set
- * our inode->i_mapping->a_ops to NULL because too many code paths expect
- * the a_ops vector to be non-NULL.
+ * This function should never be called directly.
+ * It's here only for the check a_ops->direct_IO during vfs_open.
  */
+static ssize_t unionfs_direct_IO(int rw, struct kiocb *iocb,
+               struct iov_iter *iov, loff_t offset)
+{
+       return -EINVAL;
+}
+
 struct address_space_operations unionfs_aops = {
-       /* empty on purpose */
+       .direct_IO      = unionfs_direct_IO,
 };
 
 /*