From: Andrew Morton Date: Sun, 10 Dec 2006 10:19:47 +0000 (-0800) Subject: [PATCH] io-accounting: direct-io X-Git-Tag: v2.6.20-rc1~145^2~57 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98c4d57decf97bf8ddfe948a3266aa56b38b1a51;p=linux-2.6 [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 --- diff --git a/fs/direct-io.c b/fs/direct-io.c index 5981e17f46..45d34d8073 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? */