lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 08 Dec 2006 03:52:30 -0800
From:	akpm@...l.org
To:	linux-kernel@...r.kernel.org
Cc:	akpm@...l.org, balbir@...ibm.com, csturtiv@....com, daw@....com,
	guillaume.thouvenin@...l.net, jlan@....com, nagar@...son.ibm.com,
	tee@....com
Subject: [patch 08/13] io-accounting: direct-io

From: Andrew Morton <akpm@...l.org>

Account for direct-io.

Cc: Jay Lan <jlan@....com>
Cc: Shailabh Nagar <nagar@...son.ibm.com>
Cc: Balbir Singh <balbir@...ibm.com>
Cc: Chris Sturtivant <csturtiv@....com>
Cc: Tony Ernst <tee@....com>
Cc: Guillaume Thouvenin <guillaume.thouvenin@...l.net>
Cc: David Wright <daw@....com>
Signed-off-by: Andrew Morton <akpm@...l.org>
---

 fs/direct-io.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff -puN fs/direct-io.c~io-accounting-direct-io fs/direct-io.c
--- a/fs/direct-io.c~io-accounting-direct-io
+++ a/fs/direct-io.c
@@ -27,6 +27,7 @@
 #include <linux/slab.h>
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
+#include <linux/task_io_accounting_ops.h>
 #include <linux/bio.h>
 #include <linux/wait.h>
 #include <linux/err.h>
@@ -675,6 +676,13 @@ submit_page_section(struct dio *dio, str
 {
 	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?
 	 */
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ