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

isofs: add readpages support

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

Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Namjae Jeon and committed by
Linus Torvalds
3069083c b6eb48d0

+9 -1
+9 -1
fs/isofs/inode.c
··· 20 20 #include <linux/statfs.h> 21 21 #include <linux/cdrom.h> 22 22 #include <linux/parser.h> 23 + #include <linux/mpage.h> 23 24 24 25 #include "isofs.h" 25 26 #include "zisofs.h" ··· 1149 1148 1150 1149 static int isofs_readpage(struct file *file, struct page *page) 1151 1150 { 1152 - return block_read_full_page(page,isofs_get_block); 1151 + return mpage_readpage(page, isofs_get_block); 1152 + } 1153 + 1154 + static int isofs_readpages(struct file *file, struct address_space *mapping, 1155 + struct list_head *pages, unsigned nr_pages) 1156 + { 1157 + return mpage_readpages(mapping, pages, nr_pages, isofs_get_block); 1153 1158 } 1154 1159 1155 1160 static sector_t _isofs_bmap(struct address_space *mapping, sector_t block) ··· 1165 1158 1166 1159 static const struct address_space_operations isofs_aops = { 1167 1160 .readpage = isofs_readpage, 1161 + .readpages = isofs_readpages, 1168 1162 .bmap = _isofs_bmap 1169 1163 }; 1170 1164