From: Andrew Morton Date: Sun, 10 Dec 2006 10:19:40 +0000 (-0800) Subject: [PATCH] io-accounting-read-accounting nfs fix X-Git-Tag: v2.6.20-rc1~145^2~59 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8bde37f08fe3340435f4320b5a092eeb55acebfd;p=linux-2.6 [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 --- diff --git a/mm/readahead.c b/mm/readahead.c index c0df5ed05f..0f539e8e82 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;