aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/task_io_accounting.h
diff options
context:
space:
mode:
authorAndrea Righi <righi.andrea@gmail.com>2008-07-27 18:48:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-27 19:12:28 -0400
commit940389b8afad6495211614c13eb91ef7001773ec (patch)
tree92c581cc9dc7a067899a6a28e382e4099dfe8ead /include/linux/task_io_accounting.h
parent837b41b5de356aa67abb2cadb5eef3efc7776f91 (diff)
task IO accounting: move all IO statistics in struct task_io_accounting
Simplify the code of include/linux/task_io_accounting.h. It is also more reasonable to have all the task i/o-related statistics in a single struct (task_io_accounting). Signed-off-by: Andrea Righi <righi.andrea@gmail.com> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/task_io_accounting.h')
-rw-r--r--include/linux/task_io_accounting.h17
1 files changed, 2 insertions, 15 deletions
diff --git a/include/linux/task_io_accounting.h b/include/linux/task_io_accounting.h
index 165390f8b936..5e88afc9a2fb 100644
--- a/include/linux/task_io_accounting.h
+++ b/include/linux/task_io_accounting.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * proc_io_accounting: a structure which is used for recording a single task's 2 * task_io_accounting: a structure which is used for recording a single task's
3 * IO statistics. 3 * IO statistics.
4 * 4 *
5 * Don't include this header file directly - it is designed to be dragged in via 5 * Don't include this header file directly - it is designed to be dragged in via
@@ -8,8 +8,8 @@
8 * Blame akpm@osdl.org for all this. 8 * Blame akpm@osdl.org for all this.
9 */ 9 */
10 10
11struct task_io_accounting {
11#ifdef CONFIG_TASK_XACCT 12#ifdef CONFIG_TASK_XACCT
12struct task_chr_io_accounting {
13 /* bytes read */ 13 /* bytes read */
14 u64 rchar; 14 u64 rchar;
15 /* bytes written */ 15 /* bytes written */
@@ -18,14 +18,9 @@ struct task_chr_io_accounting {
18 u64 syscr; 18 u64 syscr;
19 /* # of write syscalls */ 19 /* # of write syscalls */
20 u64 syscw; 20 u64 syscw;
21};
22#else /* CONFIG_TASK_XACCT */
23struct task_chr_io_accounting {
24};
25#endif /* CONFIG_TASK_XACCT */ 21#endif /* CONFIG_TASK_XACCT */
26 22
27#ifdef CONFIG_TASK_IO_ACCOUNTING 23#ifdef CONFIG_TASK_IO_ACCOUNTING
28struct task_io_accounting {
29 /* 24 /*
30 * The number of bytes which this task has caused to be read from 25 * The number of bytes which this task has caused to be read from
31 * storage. 26 * storage.
@@ -46,13 +41,5 @@ struct task_io_accounting {
46 * information loss in doing that. 41 * information loss in doing that.
47 */ 42 */
48 u64 cancelled_write_bytes; 43 u64 cancelled_write_bytes;
49};
50#else /* CONFIG_TASK_IO_ACCOUNTING */
51struct task_io_accounting {
52};
53#endif /* CONFIG_TASK_IO_ACCOUNTING */ 44#endif /* CONFIG_TASK_IO_ACCOUNTING */
54
55struct proc_io_accounting {
56 struct task_chr_io_accounting chr;
57 struct task_io_accounting blk;
58}; 45};