提交 8bde37f0 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

[PATCH] io-accounting-read-accounting nfs fix

nfs's ->readpages uses read_cache_pages().  Wire it up there.

[wfg@mail.ustc.edu.cn: account only successful nfs/fuse reads]
Cc: Jay Lan <jlan@sgi.com>
Cc: Shailabh Nagar <nagar@watson.ibm.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Chris Sturtivant <csturtiv@sgi.com>
Cc: Tony Ernst <tee@sgi.com>
Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
Cc: David Wright <daw@sgi.com>
Signed-off-by: NFengguang Wu <wfg@mail.ustc.edu.cn>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 faccbd4b
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/blkdev.h> #include <linux/blkdev.h>
#include <linux/backing-dev.h> #include <linux/backing-dev.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/pagevec.h> #include <linux/pagevec.h>
void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
...@@ -151,6 +152,7 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages, ...@@ -151,6 +152,7 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages,
put_pages_list(pages); put_pages_list(pages);
break; break;
} }
task_io_account_read(PAGE_CACHE_SIZE);
} }
pagevec_lru_add(&lru_pvec); pagevec_lru_add(&lru_pvec);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册