lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1484155504.2029.3.camel@hpe.com>
Date:   Wed, 11 Jan 2017 16:29:21 +0000
From:   "Kani, Toshimitsu" <toshi.kani@....com>
To:     "joe@...ches.com" <joe@...ches.com>,
        "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC:     "viro@...ihttp.domain.invalid" <viro@...ihttp.domain.invalid>,
        "ross.zwisler@...ux.intel.com" <ross.zwisler@...ux.intel.com>,
        "david@...morbit.com" <david@...morbit.com>,
        "linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH v4] DAX: enable iostat for read/write

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ