Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > ea32411352494358b8d75a78402a4713 > files > 2032

kernel-2.6.18-238.19.1.el5.centos.plus.src.rpm

From: Jerome Marchand <jmarchan@redhat.com>
Date: Tue, 3 Mar 2009 17:27:30 +0100
Subject: [misc] IO accounting: read accounting nfs fix
Message-id: 20090303162958.458474243@dhcp-0-152.brq.redhat.com
O-Subject: [RHEL5.4 Patch 08/12] IO accounting: read accounting nfs fix
Bugzilla: 461636
RH-Acked-by: Jiri Pirko <jpirko@redhat.com>
RH-Acked-by: Jeff Moyer <jmoyer@redhat.com>

bz461636

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

Patch is upstream:
commit 8bde37f08fe3340435f4320b5a092eeb55acebfd

diff --git a/mm/readahead.c b/mm/readahead.c
index 498e050..3ecb2b0 100644
--- a/mm/readahead.c
+++ b/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>
 #include <linux/buffer_head.h>
 
@@ -176,6 +177,7 @@ int read_cache_pages(struct address_space *mapping, struct list_head *pages,
 			}
 			break;
 		}
+		task_io_account_read(PAGE_CACHE_SIZE);
 	}
 	return ret;
 }