Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1556686

Re: [PATCH v4] DAX: enable iostat for read/write

From "Kani, Toshimitsu" <toshi.kani@hpe.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4] DAX: enable iostat for read/write
Date 2017-01-11 17:30 +0100
Message-ID <sYtWF-In-7@gated-at.bofh.it> (permalink)
References <sYdRT-7D2-13@gated-at.bofh.it> <sYiRz-29R-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2017-01-10 at 20:36 -0800, Joe Perches wrote:
> > 
On Tue, 2017-01-10 at 17:11 -0700, Toshi Kani wrote:
> > DAX IO path does not support iostat, but its metadata IO path does.
> > Therefore, iostat shows metadata IO statistics only, which has been
> > confusing to users.
> 
> []
> > diff --git a/fs/dax.c b/fs/dax.c
> 
> []
> > @@ -1058,12 +1058,22 @@ dax_iomap_rw(struct kiocb *iocb, struct
> > iov_iter *iter,
> 
> []
> > +	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);
> > +	}
> 
> There is a signed/unsigned conversion of sec
> It may be better to use something like:
> 
> 		size_t sec  = iov_iter_count(iter) >> 9;
> 		[...]
> 		generic_start_io_acct(iov_iter_rw(iter),
> 				      min_t(unsigned long, 1, sec),
> 				      &disk->part0);

Good catch. I will change as you suggested, and use 'sector_t' for
'sec'. 

Thanks,
-Toshi

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v4] DAX: enable iostat for read/write Toshi Kani <toshi.kani@hpe.com> - 2017-01-11 00:20 +0100
  Re: [PATCH v4] DAX: enable iostat for read/write Dan Williams <dan.j.williams@intel.com> - 2017-01-11 00:50 +0100
    Re: [PATCH v4] DAX: enable iostat for read/write "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-01-11 01:00 +0100
  Re: [PATCH v4] DAX: enable iostat for read/write Joe Perches <joe@perches.com> - 2017-01-11 05:40 +0100
    Re: [PATCH v4] DAX: enable iostat for read/write "Kani, Toshimitsu" <toshi.kani@hpe.com> - 2017-01-11 17:30 +0100

csiph-web