diff options
author | Andrew Morton <akpm@osdl.org> | 2006-12-10 05:19:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 12:55:41 -0500 |
commit | 8bde37f08fe3340435f4320b5a092eeb55acebfd (patch) | |
tree | 8afd0179f4fe46d806cb40cfadb1843a480c154d /mm | |
parent | faccbd4b26df7bd977cee33d4145155d0ef95c87 (diff) |
[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: Fengguang Wu <wfg@mail.ustc.edu.cn>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/readahead.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/blkdev.h> | 14 | #include <linux/blkdev.h> |
15 | #include <linux/backing-dev.h> | 15 | #include <linux/backing-dev.h> |
16 | #include <linux/task_io_accounting_ops.h> | ||
16 | #include <linux/pagevec.h> | 17 | #include <linux/pagevec.h> |
17 | 18 | ||
18 | void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page) | 19 | 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 | put_pages_list(pages); | 152 | put_pages_list(pages); |
152 | break; | 153 | break; |
153 | } | 154 | } |
155 | task_io_account_read(PAGE_CACHE_SIZE); | ||
154 | } | 156 | } |
155 | pagevec_lru_add(&lru_pvec); | 157 | pagevec_lru_add(&lru_pvec); |
156 | return ret; | 158 | return ret; |