From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751565AbdKVDls (ORCPT ); Tue, 21 Nov 2017 22:41:48 -0500 Received: from smtprelay0218.hostedemail.com ([216.40.44.218]:51777 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751415AbdKVDlq (ORCPT ); Tue, 21 Nov 2017 22:41:46 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2898:2911:3138:3139:3140:3141:3142:3352:3622:3871:3876:4321:4425:5007:10004:10400:10848:11026:11473:11658:11914:12043:12114:12296:12438:12740:12760:12895:13069:13161:13229:13255:13311:13357:13439:13972:14659:14721:21080:21627:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: wrist00_f38a6b1f4201 X-Filterd-Recvd-Size: 1820 Message-ID: <1511322103.6989.46.camel@perches.com> Subject: Re: [PATCH 3.16 100/133] bcache: correct cache_dirty_target in __update_writeback_rate() From: Joe Perches To: Ben Hutchings , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: akpm@linux-foundation.org, Coly Li , Tang Junhui , Jens Axboe Date: Tue, 21 Nov 2017 19:41:43 -0800 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > + > + 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) > { >