From: Andrew Morton <[EMAIL PROTECTED]>

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

[EMAIL PROTECTED]: account only successful nfs/fuse reads]
Cc: Jay Lan <[EMAIL PROTECTED]>
Cc: Shailabh Nagar <[EMAIL PROTECTED]>
Cc: Balbir Singh <[EMAIL PROTECTED]>
Cc: Chris Sturtivant <[EMAIL PROTECTED]>
Cc: Tony Ernst <[EMAIL PROTECTED]>
Cc: Guillaume Thouvenin <[EMAIL PROTECTED]>
Cc: David Wright <[EMAIL PROTECTED]>
Signed-off-by: Fengguang Wu <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to