From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752741AbdKWNI4 (ORCPT ); Thu, 23 Nov 2017 08:08:56 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40658 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbdKWNIz (ORCPT ); Thu, 23 Nov 2017 08:08:55 -0500 Message-ID: <1511442522.14687.60.camel@decadent.org.uk> Subject: Re: [PATCH 3.16 100/133] bcache: correct cache_dirty_target in __update_writeback_rate() From: Ben Hutchings To: Joe Perches , linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: akpm@linux-foundation.org, Coly Li , Tang Junhui , Jens Axboe Date: Thu, 23 Nov 2017 13:08:42 +0000 In-Reply-To: <1511322103.6989.46.camel@perches.com> References: <1511322103.6989.46.camel@perches.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-G+RoV3d4QUOgvclpK1R0" X-Mailer: Evolution 3.26.2-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 82.29.14.3 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-G+RoV3d4QUOgvclpK1R0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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. >=20 > [] > > --- 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; > > } > > =20 > > +static inline uint64_t bcache_flash_devs_sectors_dirty(struct cache_s= et *c) > > +{ > > + uint64_t i, ret =3D 0; >=20 > 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 =3D 0; i < c->nr_uuids; i++) { > > + struct bcache_device *d =3D c->devices[i]; > > + > > + if (!d || !UUID_FLASH_ONLY(&c->uuids[i])) > > + continue; > > + ret +=3D 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) > > { > >=20 --=20 Ben Hutchings When in doubt, use brute force. - Ken Thompson --=-G+RoV3d4QUOgvclpK1R0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAloWyFoACgkQ57/I7JWG EQmXYA//RiWELmAruO/bp/WW0x2WzGwMlR8pVUcbAn/sgJdwEX0vvmKr4mYlShJU V7LFcxyZCfkwfAnO/y3AJcvX7t2T2MI4eFWfi//LVXbRGTC7N02tWzB1g/mPeXoh 4OKl8sdUVhmg2wl2MwSOmMhLlKOztRxnfFaGuXzTQiWmde+lelpU1VDxGQe/uqSd BJnAuUr125jqizYw4ruxiO4FE1n4VxsyiYRozjyZRLnesXLx35QokWOJjwEdGGOp 5x+EJL/ilsBadD+3+tc1B/+6UJjlYkf7gT7D9lKoYUp5qFKp6xJ4A5mCjvs7lX7K BOfHDJW1+s8qjzDHskw6okzzVArOUutTfdNiuZbCADHzrGjStpil2k6yi0iL95xn M1SHOdxPOWIWeiUi5nsBVCMxJRigjpYxITQVyTnKRoDNCh+OT+nl1tAtObOO9PGu JwwvPhyUvsUX2DDMItiwCroL5Ko2ulpAmjrTJ4RfysSXmzb9WnQi9Z2yu51Vl2cI PUofylH/HUawO1KDN5JVWAeV7OqhVA0Vuidbt9De8lpjx5O90RVEB9DQ/fWLyXkN mnk4p8RyStkLgTqsE9SNkG2iWHxuaHPNalOt+h3JF0YefjRGhwslcQfqcE0LH+gY PHBJYRVronwrXD+heSK3Meiii6cUI4TGxMAOXMnyIc1LNoEDMcc= =IK2q -----END PGP SIGNATURE----- --=-G+RoV3d4QUOgvclpK1R0--