Re: [PATCH 1/2] blk-stat: convert blk-stat bucket callback to signed

2017-03-27 Thread Omar Sandoval
On Mon, Mar 27, 2017 at 04:00:08PM +, Stephen Bates wrote: > Thanks for the review Omar! > > >> > >> -unsigned int blk_stat_rq_ddir(const struct request *rq) > >> +int blk_stat_rq_ddir(const struct request *rq) > >> { > >> - return rq_data_dir(rq); > >> + return (int)rq_data_dir(rq); >

Re: [PATCH 1/2] blk-stat: convert blk-stat bucket callback to signed

2017-03-27 Thread Stephen Bates
Thanks for the review Omar! >> >> -unsigned int blk_stat_rq_ddir(const struct request *rq) >> +int blk_stat_rq_ddir(const struct request *rq) >> { >> -return rq_data_dir(rq); >> +return (int)rq_data_dir(rq); > >The cast here here isn't necessary, let's leave it off. > OK, I will add

Re: [PATCH 1/2] blk-stat: convert blk-stat bucket callback to signed

2017-03-25 Thread Omar Sandoval
Hey, Stephen, On Sat, Mar 25, 2017 at 08:18:11PM -0600, sba...@raithlin.com wrote: > From: Stephen Bates > > In order to allow for filtering of IO based on some other properties > of the request than direction we allow the bucket function to return > an int. > > If the

[PATCH 1/2] blk-stat: convert blk-stat bucket callback to signed

2017-03-25 Thread sbates
From: Stephen Bates In order to allow for filtering of IO based on some other properties of the request than direction we allow the bucket function to return an int. If the bucket callback returns a negative do no count it in the stats accumulation. Signed-off-by: Stephen