فهرست منبع

[PATCH] io-accounting: direct-io

Account for direct-io.

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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton 18 سال پیش
والد
کامیت
98c4d57dec
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      fs/direct-io.c

+ 8 - 0
fs/direct-io.c

@@ -27,6 +27,7 @@
 #include <linux/slab.h>
 #include <linux/slab.h>
 #include <linux/highmem.h>
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
 #include <linux/pagemap.h>
+#include <linux/task_io_accounting_ops.h>
 #include <linux/bio.h>
 #include <linux/bio.h>
 #include <linux/wait.h>
 #include <linux/wait.h>
 #include <linux/err.h>
 #include <linux/err.h>
@@ -675,6 +676,13 @@ submit_page_section(struct dio *dio, struct page *page,
 {
 {
 	int ret = 0;
 	int ret = 0;
 
 
+	if (dio->rw & WRITE) {
+		/*
+		 * Read accounting is performed in submit_bio()
+		 */
+		task_io_account_write(len);
+	}
+
 	/*
 	/*
 	 * Can we just grow the current page's presence in the dio?
 	 * Can we just grow the current page's presence in the dio?
 	 */
 	 */