task IO accounting: improve code readability
[cascardo/linux.git] / include / linux / task_io_accounting.h
index 44d00e9..165390f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * task_io_accounting: a structure which is used for recording a single task's
+ * proc_io_accounting: a structure which is used for recording a single task's
  * IO statistics.
  *
  * Don't include this header file directly - it is designed to be dragged in via
@@ -8,6 +8,22 @@
  * Blame akpm@osdl.org for all this.
  */
 
+#ifdef CONFIG_TASK_XACCT
+struct task_chr_io_accounting {
+       /* bytes read */
+       u64 rchar;
+       /*  bytes written */
+       u64 wchar;
+       /* # of read syscalls */
+       u64 syscr;
+       /* # of write syscalls */
+       u64 syscw;
+};
+#else /* CONFIG_TASK_XACCT */
+struct task_chr_io_accounting {
+};
+#endif /* CONFIG_TASK_XACCT */
+
 #ifdef CONFIG_TASK_IO_ACCOUNTING
 struct task_io_accounting {
        /*
@@ -31,7 +47,12 @@ struct task_io_accounting {
         */
        u64 cancelled_write_bytes;
 };
-#else
+#else /* CONFIG_TASK_IO_ACCOUNTING */
 struct task_io_accounting {
 };
-#endif
+#endif /* CONFIG_TASK_IO_ACCOUNTING */
+
+struct proc_io_accounting {
+       struct task_chr_io_accounting chr;
+       struct task_io_accounting blk;
+};