[patch 06/13] io-accounting-read-accounting nfs fix

From: akpm
Date: Fri Dec 08 2006 - 06:57:36 EST


From: Andrew Morton <akpm@xxxxxxxx>

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

[wfg@xxxxxxxxxxxxxxxx: account only successful nfs/fuse reads]
Cc: Jay Lan <jlan@xxxxxxx>
Cc: Shailabh Nagar <nagar@xxxxxxxxxxxxxx>
Cc: Balbir Singh <balbir@xxxxxxxxxx>
Cc: Chris Sturtivant <csturtiv@xxxxxxx>
Cc: Tony Ernst <tee@xxxxxxx>
Cc: Guillaume Thouvenin <guillaume.thouvenin@xxxxxxxx>
Cc: David Wright <daw@xxxxxxx>
Signed-off-by: Fengguang Wu <wfg@xxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

mm/readahead.c | 2 ++
1 file changed, 2 insertions(+)

diff -puN mm/readahead.c~io-accounting-read-accounting-nfs-fix mm/readahead.c
--- a/mm/readahead.c~io-accounting-read-accounting-nfs-fix
+++ a/mm/readahead.c
@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/blkdev.h>
#include <linux/backing-dev.h>
+#include <linux/task_io_accounting_ops.h>
#include <linux/pagevec.h>

void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page)
@@ -151,6 +152,7 @@ int read_cache_pages(struct address_spac
put_pages_list(pages);
break;
}
+ task_io_account_read(PAGE_CACHE_SIZE);
}
pagevec_lru_add(&lru_pvec);
return ret;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/