From 98c4d57decf97bf8ddfe948a3266aa56b38b1a51 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 10 Dec 2006 02:19:47 -0800 Subject: [PATCH] [PATCH] io-accounting: direct-io Account for direct-io. Cc: Jay Lan Cc: Shailabh Nagar Cc: Balbir Singh Cc: Chris Sturtivant Cc: Tony Ernst Cc: Guillaume Thouvenin Cc: David Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/direct-io.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fs/direct-io.c b/fs/direct-io.c index 5981e17f46f0..45d34d807391 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -675,6 +676,13 @@ submit_page_section(struct dio *dio, struct page *page, { 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? */ -- 2.30.2