Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756247AbcCWSb7 (ORCPT ); Wed, 23 Mar 2016 14:31:59 -0400 Received: from mta01.ornl.gov ([128.219.177.14]:48853 "EHLO mta01.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751430AbcCWSb5 convert rfc822-to-8bit (ORCPT ); Wed, 23 Mar 2016 14:31:57 -0400 X-SG: RELAYLIST X-IronPort-AV: E=Sophos;i="5.24,383,1454994000"; d="scan'208";a="124349813" From: "Simmons, James A." To: "'Greg Kroah-Hartman'" , "Dilger, Andreas" CC: "devel@driverdev.osuosl.org" , "Drokin, Oleg" , Linux Kernel Mailing List , Lustre Development List Subject: RE: [lustre-devel] [PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type." Thread-Topic: [lustre-devel] [PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type." Thread-Index: AQHRhKY7a2KAxvaNm0mbV55dcivlIJ9mxoYAgACGiYCAAA1oEA== Date: Wed, 23 Mar 2016 18:31:49 +0000 Message-ID: References: <1458685264-22755-1-git-send-email-jsimmons@infradead.org> <20160323014916.GF3190@kroah.com> <20160323134107.GA4356@kroah.com> In-Reply-To: <20160323134107.GA4356@kroah.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [128.219.12.132] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2362 Lines: 64 >On Wed, Mar 23, 2016 at 05:39:36AM +0000, Dilger, Andreas wrote: >> On 2016/03/22, 19:49, "lustre-devel on behalf of Greg Kroah-Hartman" >> > gregkh@linuxfoundation.org> wrote: >> >> >On Tue, Mar 22, 2016 at 06:21:04PM -0400, James Simmons wrote: >> >> Latest testing fails when using ko2iblnd. It was tracked down >> >> to commit 4671a026616df26000f7d8ad2f2ea4b6de79263c. >> >> >> >> This reverts commit 4671a026616df26000f7d8ad2f2ea4b6de79263c. >> >> --- >> >> .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 ++-- >> >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> >> >> diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >> >>b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >> >> index 89f9390..0d32e65 100644 >> >> --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >> >> +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c >> >> @@ -1968,7 +1968,7 @@ static int kiblnd_net_init_pools(kib_net_t *net, >> >>__u32 *cpts, int ncpts) >> >> */ >> >> >> >> net->ibn_fmr_ps = cfs_percpt_alloc(lnet_cpt_table(), >> >> - sizeof(*net->ibn_fmr_ps)); >> >> + sizeof(kib_fmr_poolset_t)); >> > >> >Ok, why is this revert needed? Please give me a big huge comment about >> >why this is not the same size of the variable being assigned to it, >> >otherwise someone else is going to come along and make the exact same >> >change again. >> > >> >> if (!net->ibn_fmr_ps) { >> >> CERROR("Failed to allocate FMR pool array\n"); >> >> rc = -ENOMEM; >> >> @@ -1992,7 +1992,7 @@ static int kiblnd_net_init_pools(kib_net_t *net, >> >>__u32 *cpts, int ncpts) >> >> >> >> create_tx_pool: >> >> net->ibn_tx_ps = cfs_percpt_alloc(lnet_cpt_table(), >> >> - sizeof(*net->ibn_tx_ps)); >> >> + sizeof(kib_tx_poolset_t)); >> > >> >Same here, why is this code wrong? >> >> Looks like the declarations are: >> >> kib_tx_poolset_t **ibn_tx_ps; /* tx pool-set */ >> kib_fmr_poolset_t **ibn_fmr_ps; /* fmr pool-set */ >> >> >> >> so the right code should be: >> >> sizeof(**net->ibn_tx_ps); >> >> >> and the same for sizeof(**net->ibn_fmr_ps) > >That's a mess, isn't there some other way to fix this up to be more >"obvious"? This must have been encountered in the past. How was it handle in those other cases?