On Tue, 2017-01-10 at 15:41 -0800, Dan Williams wrote: > On Tue, Jan 10, 2017 at 4:11 PM, Toshi Kani <toshi.kani@xxxxxxx> > wrote: : > > > > + if (blk_queue_io_stat(disk->queue)) { > > + int sec = iov_iter_count(iter) >> 9; > > + > > + start = jiffies; > > + generic_start_io_acct(iov_iter_rw(iter), > > + (!sec) ? 1 : sec, &disk- > > >part0); > > + } > > + > > while (iov_iter_count(iter)) { > > ret = iomap_apply(inode, pos, iov_iter_count(iter), > > flags, ops, > > iter, dax_iomap_actor); > > @@ -1073,6 +1083,9 @@ dax_iomap_rw(struct kiocb *iocb, struct > > iov_iter *iter, > > done += ret; > > } > > > > + if (start) > > + generic_end_io_acct(iov_iter_rw(iter), &disk- > > >part0, start); > > + > > I think we can afford to add a separate flag that indicates whether > we called generic_start_io_acct(). Just in case 'start' is '0' after > 'jiffies' rolls over. Good point. I will add a flag to account such a case. Thanks, -Toshi ��.n��������+%������w��{.n�����{���)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥