* [PATCH 2/2] udf : add readpages support for udf. Using mpage_readpages instead of multiple calls to udf_readpage to reduce the CPU utilization and make performance higher.
@ 2011-10-03 4:56 Namjae Jeon
0 siblings, 0 replies; only message in thread
From: Namjae Jeon @ 2011-10-03 4:56 UTC (permalink / raw)
To: jack; +Cc: linux-kernel, Namjae Jeon
Signed-off-by: Namjae Jeon <linkinjeon@gmail.com>
---
fs/udf/inode.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 58665ce..81f9ce1 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -37,6 +37,7 @@
#include <linux/writeback.h>
#include <linux/slab.h>
#include <linux/crc-itu-t.h>
+#include <linux/mpage.h>
#include "udf_i.h"
#include "udf_sb.h"
@@ -104,7 +105,13 @@ static int udf_writepage(struct page *page, struct writeback_control *wbc)
static int udf_readpage(struct file *file, struct page *page)
{
- return block_read_full_page(page, udf_get_block);
+ return mpage_readpage(page, udf_get_block);
+}
+
+static int udf_readpages(struct file *file, struct address_space *mapping,
+ struct list_head *pages, unsigned nr_pages)
+{
+ return mpage_readpages(mapping, pages, nr_pages, udf_get_block);
}
static int udf_write_begin(struct file *file, struct address_space *mapping,
@@ -139,6 +146,7 @@ static sector_t udf_bmap(struct address_space *mapping, sector_t block)
const struct address_space_operations udf_aops = {
.readpage = udf_readpage,
+ .readpages = udf_readpages,
.writepage = udf_writepage,
.write_begin = udf_write_begin,
.write_end = generic_write_end,
--
1.7.4.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-10-03 4:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-03 4:56 [PATCH 2/2] udf : add readpages support for udf. Using mpage_readpages instead of multiple calls to udf_readpage to reduce the CPU utilization and make performance higher Namjae Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®