Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

udf: Add readpages support for udf.

Use mpage_readpages() instead of multiple calls to udf_readpage() to reduce the
CPU utilization and make performance higher.

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>

authored by

Namjae Jeon and committed by
Jan Kara
bc112323 3ee77f20

+9 -1
+9 -1
fs/udf/inode.c
··· 37 37 #include <linux/writeback.h> 38 38 #include <linux/slab.h> 39 39 #include <linux/crc-itu-t.h> 40 + #include <linux/mpage.h> 40 41 41 42 #include "udf_i.h" 42 43 #include "udf_sb.h" ··· 105 104 106 105 static int udf_readpage(struct file *file, struct page *page) 107 106 { 108 - return block_read_full_page(page, udf_get_block); 107 + return mpage_readpage(page, udf_get_block); 108 + } 109 + 110 + static int udf_readpages(struct file *file, struct address_space *mapping, 111 + struct list_head *pages, unsigned nr_pages) 112 + { 113 + return mpage_readpages(mapping, pages, nr_pages, udf_get_block); 109 114 } 110 115 111 116 static int udf_write_begin(struct file *file, struct address_space *mapping, ··· 146 139 147 140 const struct address_space_operations udf_aops = { 148 141 .readpage = udf_readpage, 142 + .readpages = udf_readpages, 149 143 .writepage = udf_writepage, 150 144 .write_begin = udf_write_begin, 151 145 .write_end = generic_write_end,