X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Ftsacct.c;h=658f638c402c48fbb307b1a8242c6dfe16d9a1ac;hb=276e26c3160602efea1d0acc9fe7b45bb4c2c8e1;hp=96f77013d3f038ea03b688c448e2ef69a77aee06;hpb=0b0e0b5f1a22c20c0f127fb9b457136d6c3ca8ed;p=linux-2.6 diff --git a/kernel/tsacct.c b/kernel/tsacct.c index 96f77013d3..658f638c40 100644 --- a/kernel/tsacct.c +++ b/kernel/tsacct.c @@ -22,8 +22,6 @@ #include #include - -#define USEC_PER_TICK (USEC_PER_SEC/HZ) /* * fill in basic accounting fields */ @@ -96,6 +94,15 @@ void xacct_add_tsk(struct taskstats *stats, struct task_struct *p) stats->write_char = p->wchar; stats->read_syscalls = p->syscr; stats->write_syscalls = p->syscw; +#ifdef CONFIG_TASK_IO_ACCOUNTING + stats->read_bytes = p->ioac.read_bytes; + stats->write_bytes = p->ioac.write_bytes; + stats->cancelled_write_bytes = p->ioac.cancelled_write_bytes; +#else + stats->read_bytes = 0; + stats->write_bytes = 0; + stats->cancelled_write_bytes = 0; +#endif } #undef KB #undef MB