From: Joe Perches <joe@perches.com>
To: "Simmons, James A." <simmonsja@ornl.gov>,
'Greg Kroah-Hartman' <gregkh@linuxfoundation.org>,
"Dilger, Andreas" <andreas.dilger@intel.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"Drokin, Oleg" <oleg.drokin@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>
Subject: [lustre-devel] [PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type."
Date: Wed, 23 Mar 2016 11:47:44 -0700 [thread overview]
Message-ID: <1458758864.18165.4.camel@perches.com> (raw)
In-Reply-To: <bb9ab572a3944b38814b0533323e0299@EXCHCS32.ornl.gov>
On Wed, 2016-03-23 at 18:31 +0000, Simmons, James A. wrote:
> > 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"
> > > <lustre-devel-bounces@lists.lustre.org on behalf of
> > > gregkh at 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.
[]
> > > > > diff --git a/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.
[]
> > > 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?
I fail to see why it's a mess. It's just **
and someone making a mistake.
Removing the "typedef struct" uses from lustre
would probably make a lot of this clearer though.
$ git grep -En "typedef\s+struct" drivers/staging/lustre/
drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h:76:typedef struct cfs_workitem {
drivers/staging/lustre/include/linux/lnet/lib-types.h:56:typedef struct lnet_msg {
drivers/staging/lustre/include/linux/lnet/lib-types.h:110:typedef struct lnet_libhandle {
drivers/staging/lustre/include/linux/lnet/lib-types.h:118:typedef struct lnet_eq {
drivers/staging/lustre/include/linux/lnet/lib-types.h:129:typedef struct lnet_me {
drivers/staging/lustre/include/linux/lnet/lib-types.h:141:typedef struct lnet_libmd {
drivers/staging/lustre/include/linux/lnet/lib-types.h:166:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:181:typedef struct lnet_lnd {
drivers/staging/lustre/include/linux/lnet/lib-types.h:256:typedef struct lnet_ni {
drivers/staging/lustre/include/linux/lnet/lib-types.h:297:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:305:typedef struct lnet_peer {
drivers/staging/lustre/include/linux/lnet/lib-types.h:369:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:384:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:396:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:410:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:497:typedef struct lnet_portal {
drivers/staging/lustre/include/linux/lnet/lib-types.h:545:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:71:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:78:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:88:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:93:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:101:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:108:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:115:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:127:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:140:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:242:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:254:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:265:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:275:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:296:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:302:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:313:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:325:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:337:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:344:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:357:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:363:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:369:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:379:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:389:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:402:typedef struct {
WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: "Simmons, James A." <simmonsja@ornl.gov>,
"'Greg Kroah-Hartman'" <gregkh@linuxfoundation.org>,
"Dilger, Andreas" <andreas.dilger@intel.com>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"Drokin, Oleg" <oleg.drokin@intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Lustre Development List <lustre-devel@lists.lustre.org>
Subject: Re: [lustre-devel] [PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type."
Date: Wed, 23 Mar 2016 11:47:44 -0700 [thread overview]
Message-ID: <1458758864.18165.4.camel@perches.com> (raw)
In-Reply-To: <bb9ab572a3944b38814b0533323e0299@EXCHCS32.ornl.gov>
On Wed, 2016-03-23 at 18:31 +0000, Simmons, James A. wrote:
> > 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"
> > > <lustre-devel-bounces@lists.lustre.org on behalf of
> > > 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.
[]
> > > > > diff --git a/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.
[]
> > > 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?
I fail to see why it's a mess. It's just **
and someone making a mistake.
Removing the "typedef struct" uses from lustre
would probably make a lot of this clearer though.
$ git grep -En "typedef\s+struct" drivers/staging/lustre/
drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h:76:typedef struct cfs_workitem {
drivers/staging/lustre/include/linux/lnet/lib-types.h:56:typedef struct lnet_msg {
drivers/staging/lustre/include/linux/lnet/lib-types.h:110:typedef struct lnet_libhandle {
drivers/staging/lustre/include/linux/lnet/lib-types.h:118:typedef struct lnet_eq {
drivers/staging/lustre/include/linux/lnet/lib-types.h:129:typedef struct lnet_me {
drivers/staging/lustre/include/linux/lnet/lib-types.h:141:typedef struct lnet_libmd {
drivers/staging/lustre/include/linux/lnet/lib-types.h:166:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:181:typedef struct lnet_lnd {
drivers/staging/lustre/include/linux/lnet/lib-types.h:256:typedef struct lnet_ni {
drivers/staging/lustre/include/linux/lnet/lib-types.h:297:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:305:typedef struct lnet_peer {
drivers/staging/lustre/include/linux/lnet/lib-types.h:369:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:384:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:396:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:410:typedef struct {
drivers/staging/lustre/include/linux/lnet/lib-types.h:497:typedef struct lnet_portal {
drivers/staging/lustre/include/linux/lnet/lib-types.h:545:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:71:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:78:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:88:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:93:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:101:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:108:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:115:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:127:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:140:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:242:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:254:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:265:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:275:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:296:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:302:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:313:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:325:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:337:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:344:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:357:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:363:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:369:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:379:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:389:typedef struct {
drivers/staging/lustre/include/linux/lnet/lnetst.h:402:typedef struct {
next prev parent reply other threads:[~2016-03-23 18:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 22:21 [lustre-devel] [PATCH] Revert "Staging: lustre: o2iblnd: Use sizeof type *pointer instead of sizeof type." James Simmons
2016-03-22 22:21 ` James Simmons
2016-03-23 1:49 ` [lustre-devel] " Greg Kroah-Hartman
2016-03-23 1:49 ` Greg Kroah-Hartman
2016-03-23 5:39 ` [lustre-devel] " Dilger, Andreas
2016-03-23 5:39 ` Dilger, Andreas
2016-03-23 6:29 ` Oucharek, Doug S
2016-03-23 6:29 ` Oucharek, Doug S
2016-03-23 13:41 ` Greg Kroah-Hartman
2016-03-23 13:41 ` Greg Kroah-Hartman
2016-03-23 18:31 ` Simmons, James A.
2016-03-23 18:31 ` Simmons, James A.
2016-03-23 18:47 ` Joe Perches [this message]
2016-03-23 18:47 ` Joe Perches
2016-03-23 20:29 ` Simmons, James A.
2016-03-23 20:29 ` Simmons, James A.
2016-03-23 20:43 ` 'Greg Kroah-Hartman'
2016-03-23 20:43 ` 'Greg Kroah-Hartman'
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458758864.18165.4.camel@perches.com \
--to=joe@perches.com \
--cc=andreas.dilger@intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=oleg.drokin@intel.com \
--cc=simmonsja@ornl.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.