ext4 crypto: add ext4_mpage_readpages()
authorTheodore Ts'o <tytso@mit.edu>
Wed, 8 Apr 2015 04:00:32 +0000 (00:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 8 Apr 2015 04:00:32 +0000 (00:00 -0400)
This takes code from fs/mpage.c and optimizes it for ext4.  Its
primary reason is to allow us to more easily add encryption to ext4's
read path in an efficient manner.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/Makefile
fs/ext4/ext4.h
fs/ext4/inode.c
fs/ext4/readpage.c [new file with mode: 0644]

index 0310fec..cd6f50f 100644 (file)
@@ -8,7 +8,7 @@ ext4-y  := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o page-io.o \
                ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
                ext4_jbd2.o migrate.o mballoc.o block_validity.o move_extent.o \
                mmp.o indirect.o extents_status.o xattr.o xattr_user.o \
-               xattr_trusted.o inline.o
+               xattr_trusted.o inline.o readpage.o
 
 ext4-$(CONFIG_EXT4_FS_POSIX_ACL)       += acl.o
 ext4-$(CONFIG_EXT4_FS_SECURITY)                += xattr_security.o
index f63c3d5..f7f3f58 100644 (file)
@@ -2699,6 +2699,10 @@ static inline void ext4_set_de_type(struct super_block *sb,
                de->file_type = ext4_type_by_mode[(mode & S_IFMT)>>S_SHIFT];
 }
 
+/* readpages.c */
+extern int ext4_mpage_readpages(struct address_space *mapping,
+                               struct list_head *pages, struct page *page,
+                               unsigned nr_pages);
 
 /* symlink.c */
 extern const struct inode_operations ext4_symlink_inode_operations;
diff --cc fs/ext4/inode.c
Simple merge
Simple merge