From 8bde37f08fe3340435f4320b5a092eeb55acebfd Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 10 Dec 2006 02:19:40 -0800 Subject: [PATCH] [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 Cc: Shailabh Nagar Cc: Balbir Singh Cc: Chris Sturtivant Cc: Tony Ernst Cc: Guillaume Thouvenin Cc: David Wright Signed-off-by: Fengguang Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/readahead.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/readahead.c b/mm/readahead.c index c0df5ed05f62..0f539e8e827a 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -13,6 +13,7 @@ #include #include #include +#include #include 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, put_pages_list(pages); break; } + task_io_account_read(PAGE_CACHE_SIZE); } pagevec_lru_add(&lru_pvec); return ret; -- GitLab