2 * Task I/O accounting operations
4 #ifndef __TASK_IO_ACCOUNTING_OPS_INCLUDED
5 #define __TASK_IO_ACCOUNTING_OPS_INCLUDED
7 #ifdef CONFIG_TASK_IO_ACCOUNTING
8 static inline void task_io_account_read(size_t bytes)
10 current->ioac.read_bytes += bytes;
13 static inline void task_io_account_write(size_t bytes)
15 current->ioac.write_bytes += bytes;
18 static inline void task_io_account_cancelled_write(size_t bytes)
20 current->ioac.cancelled_write_bytes += bytes;
23 static inline void task_io_accounting_init(struct task_struct *tsk)
25 memset(&tsk->ioac, 0, sizeof(tsk->ioac));
30 static inline void task_io_account_read(size_t bytes)
34 static inline void task_io_account_write(size_t bytes)
38 static inline void task_io_account_cancelled_write(size_t bytes)
42 static inline void task_io_accounting_init(struct task_struct *tsk)
46 #endif /* CONFIG_TASK_IO_ACCOUNTING */
47 #endif /* __TASK_IO_ACCOUNTING_OPS_INCLUDED */