lkml.org 
[lkml]   [2017]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3.16 100/133] bcache: correct cache_dirty_target in __update_writeback_rate()
From
Date
On Tue, 2017-11-21 at 19:41 -0800, Joe Perches wrote:
> On Wed, 2017-11-22 at 01:58 +0000, Ben Hutchings wrote:
> > 3.16.51-rc1 review patch. If anyone has any objections, please let me know.
>
> []
> > --- a/drivers/md/bcache/writeback.h
> > +++ b/drivers/md/bcache/writeback.h
> > @@ -14,6 +14,25 @@ static inline uint64_t bcache_dev_sector
> > return ret;
> > }
> >
> > +static inline uint64_t bcache_flash_devs_sectors_dirty(struct cache_set *c)
> > +{
> > + uint64_t i, ret = 0;
>
> There's no reason i should be uint64_t
> as nr_uuids is unsigned int.

But this still works, right? That's a minor issue to deal with
upstream, not in the backport.

Ben.

> > +
> > + mutex_lock(&bch_register_lock);
> > +
> > + for (i = 0; i < c->nr_uuids; i++) {
> > + struct bcache_device *d = c->devices[i];
> > +
> > + if (!d || !UUID_FLASH_ONLY(&c->uuids[i]))
> > + continue;
> > + ret += bcache_dev_sectors_dirty(d);
> > + }
> > +
> > + mutex_unlock(&bch_register_lock);
> > +
> > + return ret;
> > +}
> > +
> > static inline unsigned offset_to_stripe(struct bcache_device *d,
> > uint64_t offset)
> > {
> >
--
Ben Hutchings
When in doubt, use brute force. - Ken Thompson

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-11-23 14:09    [W:0.065 / U:1.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site