* [PATCH] staging/lustre: fix build errors
@ 2013-06-04 8:45 Peng, Tao
2013-06-04 13:59 ` Greg Kroah-Hartman
2013-06-05 0:42 ` Stephen Rothwell
0 siblings, 2 replies; 6+ messages in thread
From: Peng, Tao @ 2013-06-04 8:45 UTC (permalink / raw)
To: Greg Kroah-Hartman, Stephen Rothwell
Cc: Andreas Dilger, linux-next@vger.kernel.org,
devel@driverdev.osuosl.org
From 369398c782c914e5f0548d5bbad22c00c6b58b6a Mon Sep 17 00:00:00 2001
From: Peng Tao <bergwolf@gmail.com>
Date: Tue, 4 Jun 2013 15:48:17 +0800
Subject: [PATCH] staging/lustre: fix build errors
There are several issues:
1. set_cpus_allowed() is not available with CONFIG_CPUMASK_OFFSTACK on
2. CONFIG_MODULES may not be defined
3. CONFIG_MODULE_UNLOAD may not be defined
Signed-off-by: Peng Tao <tao.peng@emc.com>
---
Stephen, please see if this fixes your build failure. I have tested it locally but only on X86 architecture, with CONFIG_CPUMASK_OFFSTACK on and CONFIG_MODULES/CONFIG_MODULE_UNLOAD off.
.../lustre/include/linux/libcfs/linux/linux-prim.h | 2 --
.../include/linux/libcfs/linux/portals_compat25.h | 2 --
.../staging/lustre/lustre/libcfs/linux/linux-cpu.c | 2 +-
drivers/staging/lustre/lustre/obdclass/lu_object.c | 6 ++++++
drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 ++--
5 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
index c346bcd..a4963a8 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
@@ -79,8 +79,6 @@
#define NR_CPUS 1
#endif
-#define cfs_set_cpus_allowed(t, mask) set_cpus_allowed(t, mask)
-
/*
* cache
*/
diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h b/drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h
index 2b94872..132a4be 100644
--- a/drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h
+++ b/drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h
@@ -109,8 +109,6 @@ int proc_call_handler(void *data, int write,
#define NR_CPUS 1
#endif
-#define cfs_set_cpus_allowed(t, mask) set_cpus_allowed(t, mask)
-
#define cfs_register_sysctl_table(t, a) register_sysctl_table(t)
#endif /* _PORTALS_COMPAT_H */
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
index 6e255ff..95142d1 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
@@ -627,7 +627,7 @@ cfs_cpt_bind(struct cfs_cpt_table *cptab, int cpt)
if (cpu_isset(i, *cpumask))
continue;
- rc = set_cpus_allowed(current, *cpumask);
+ rc = set_cpus_allowed_ptr(current, cpumask);
set_mems_allowed(*nodemask);
if (rc == 0)
schedule(); /* switch to allowed CPU */
diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
index 1cbbb6f..da459e1 100644
--- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
+++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
@@ -1351,7 +1351,9 @@ static void key_fini(struct lu_context *ctx, int index)
LASSERT(key->lct_owner != NULL);
if ((ctx->lc_tags & LCT_NOREF) == 0) {
+#ifdef CONFIG_MODULE_UNLOAD
LINVRNT(module_refcount(key->lct_owner) > 0);
+#endif
module_put(key->lct_owner);
}
ctx->lc_value[index] = NULL;
@@ -1933,7 +1935,11 @@ void lu_context_keys_dump(void)
i, key, key->lct_tags,
key->lct_init, key->lct_fini, key->lct_exit,
key->lct_index, atomic_read(&key->lct_used),
+#ifdef CONFIG_MODULES
key->lct_owner ? key->lct_owner->name : "",
+#else
+ "",
+#endif
key->lct_owner);
lu_ref_print(&key->lct_reference);
}
diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c
index 185841f..5a66a1b 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c
@@ -395,8 +395,8 @@ static int ptlrpcd(void *arg)
if (++index >= num_possible_cpus())
index = 0;
}
- cfs_set_cpus_allowed(current,
- *cpumask_of_node(cpu_to_node(index)));
+ set_cpus_allowed_ptr(current,
+ cpumask_of_node(cpu_to_node(index)));
}
}
#endif
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] staging/lustre: fix build errors
2013-06-04 8:45 [PATCH] staging/lustre: fix build errors Peng, Tao
@ 2013-06-04 13:59 ` Greg Kroah-Hartman
2013-06-05 10:33 ` Peng, Tao
2013-06-05 0:42 ` Stephen Rothwell
1 sibling, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2013-06-04 13:59 UTC (permalink / raw)
To: Peng, Tao
Cc: Stephen Rothwell, devel@driverdev.osuosl.org,
linux-next@vger.kernel.org, Andreas Dilger
On Tue, Jun 04, 2013 at 08:45:41AM +0000, Peng, Tao wrote:
> >From 369398c782c914e5f0548d5bbad22c00c6b58b6a Mon Sep 17 00:00:00 2001
> From: Peng Tao <bergwolf@gmail.com>
> Date: Tue, 4 Jun 2013 15:48:17 +0800
> Subject: [PATCH] staging/lustre: fix build errors
Why send me the whole patch header? If I want to apply this, I need to
hand edit it.
> There are several issues:
> 1. set_cpus_allowed() is not available with CONFIG_CPUMASK_OFFSTACK on
> 2. CONFIG_MODULES may not be defined
> 3. CONFIG_MODULE_UNLOAD may not be defined
You did three different things, please send 3 different patches, I can't
take this as is.
> diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> index 1cbbb6f..da459e1 100644
> --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
> +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> @@ -1351,7 +1351,9 @@ static void key_fini(struct lu_context *ctx, int index)
>
> LASSERT(key->lct_owner != NULL);
> if ((ctx->lc_tags & LCT_NOREF) == 0) {
> +#ifdef CONFIG_MODULE_UNLOAD
> LINVRNT(module_refcount(key->lct_owner) > 0);
> +#endif
What is that? What is LINVRNT?
> module_put(key->lct_owner);
Are you sure this isn't racy?
> }
> ctx->lc_value[index] = NULL;
> @@ -1933,7 +1935,11 @@ void lu_context_keys_dump(void)
> i, key, key->lct_tags,
> key->lct_init, key->lct_fini, key->lct_exit,
> key->lct_index, atomic_read(&key->lct_used),
> +#ifdef CONFIG_MODULES
> key->lct_owner ? key->lct_owner->name : "",
> +#else
> + "",
> +#endif
That's a mess, why care about a module name at all?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging/lustre: fix build errors
2013-06-04 8:45 [PATCH] staging/lustre: fix build errors Peng, Tao
2013-06-04 13:59 ` Greg Kroah-Hartman
@ 2013-06-05 0:42 ` Stephen Rothwell
2013-06-05 10:36 ` Peng, Tao
1 sibling, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2013-06-05 0:42 UTC (permalink / raw)
To: Peng, Tao
Cc: Greg Kroah-Hartman, Andreas Dilger, linux-next@vger.kernel.org,
devel@driverdev.osuosl.org
[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]
Hi,
On Tue, 4 Jun 2013 08:45:41 +0000 "Peng, Tao" <tao.peng@emc.com> wrote:
>
> From 369398c782c914e5f0548d5bbad22c00c6b58b6a Mon Sep 17 00:00:00 2001
> From: Peng Tao <bergwolf@gmail.com>
> Date: Tue, 4 Jun 2013 15:48:17 +0800
> Subject: [PATCH] staging/lustre: fix build errors
>
> There are several issues:
> 1. set_cpus_allowed() is not available with CONFIG_CPUMASK_OFFSTACK on
> 2. CONFIG_MODULES may not be defined
> 3. CONFIG_MODULE_UNLOAD may not be defined
>
> Signed-off-by: Peng Tao <tao.peng@emc.com>
> ---
> Stephen, please see if this fixes your build failure. I have tested it locally but only on X86 architecture, with CONFIG_CPUMASK_OFFSTACK on and CONFIG_MODULES/CONFIG_MODULE_UNLOAD off.
I have tried this with an x86_64 allmodconfig build and now I get just
this build problem:
drivers/built-in.o: In function `crc32_pclmul_le_16':
(.text+0x28b9310): multiple definition of `crc32_pclmul_le_16'
arch/x86/built-in.o:(.text+0xe70d0): first defined here
BTW all the build problems I reported yesterday were with the x86_64
allmodconfig build, my PowerPC build was fine (since it doesn't even try
to build the lustre code).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] staging/lustre: fix build errors
2013-06-04 13:59 ` Greg Kroah-Hartman
@ 2013-06-05 10:33 ` Peng, Tao
0 siblings, 0 replies; 6+ messages in thread
From: Peng, Tao @ 2013-06-05 10:33 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Stephen Rothwell, devel@driverdev.osuosl.org,
linux-next@vger.kernel.org, Andreas Dilger
> -----Original Message-----
> From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org]
> Sent: Tuesday, June 04, 2013 10:00 PM
> To: Peng, Tao
> Cc: Stephen Rothwell; devel@driverdev.osuosl.org; linux-next@vger.kernel.org; Andreas Dilger
> Subject: Re: [PATCH] staging/lustre: fix build errors
>
> On Tue, Jun 04, 2013 at 08:45:41AM +0000, Peng, Tao wrote:
> > >From 369398c782c914e5f0548d5bbad22c00c6b58b6a Mon Sep 17 00:00:00 2001
> > From: Peng Tao <bergwolf@gmail.com>
> > Date: Tue, 4 Jun 2013 15:48:17 +0800
> > Subject: [PATCH] staging/lustre: fix build errors
>
> Why send me the whole patch header? If I want to apply this, I need to
> hand edit it.
>
Sorry... won't do it again.
> > There are several issues:
> > 1. set_cpus_allowed() is not available with CONFIG_CPUMASK_OFFSTACK on
> > 2. CONFIG_MODULES may not be defined
> > 3. CONFIG_MODULE_UNLOAD may not be defined
>
> You did three different things, please send 3 different patches, I can't
> take this as is.
>
OK. Will split, fix up and resend.
> > diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c
> b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> > index 1cbbb6f..da459e1 100644
> > --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c
> > +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c
> > @@ -1351,7 +1351,9 @@ static void key_fini(struct lu_context *ctx, int index)
> >
> > LASSERT(key->lct_owner != NULL);
> > if ((ctx->lc_tags & LCT_NOREF) == 0) {
> > +#ifdef CONFIG_MODULE_UNLOAD
> > LINVRNT(module_refcount(key->lct_owner) > 0);
> > +#endif
>
> What is that? What is LINVRNT?
>
It is like ASSERT/BUG_ON, but needs extra config, which seems to be mistakenly removed by coan (which I used to cleanup Lustre code from the first place). I will add it back.
> > module_put(key->lct_owner);
>
> Are you sure this isn't racy?
>
Which race do you refer to, please? module is pined by each key in keys_fill(), so we drop the reference here.
> > }
> > ctx->lc_value[index] = NULL;
> > @@ -1933,7 +1935,11 @@ void lu_context_keys_dump(void)
> > i, key, key->lct_tags,
> > key->lct_init, key->lct_fini, key->lct_exit,
> > key->lct_index, atomic_read(&key->lct_used),
> > +#ifdef CONFIG_MODULES
> > key->lct_owner ? key->lct_owner->name : "",
> > +#else
> > + "",
> > +#endif
>
> That's a mess, why care about a module name at all?
>
Will remove it. Thanks.
Cheers,
Tao
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] staging/lustre: fix build errors
2013-06-05 0:42 ` Stephen Rothwell
@ 2013-06-05 10:36 ` Peng, Tao
2013-06-05 11:07 ` Dan Carpenter
0 siblings, 1 reply; 6+ messages in thread
From: Peng, Tao @ 2013-06-05 10:36 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Greg Kroah-Hartman, Andreas Dilger, linux-next@vger.kernel.org,
devel@driverdev.osuosl.org
> -----Original Message-----
> From: Stephen Rothwell [mailto:sfr@canb.auug.org.au]
> Sent: Wednesday, June 05, 2013 8:43 AM
> To: Peng, Tao
> Cc: Greg Kroah-Hartman; Andreas Dilger; linux-next@vger.kernel.org; devel@driverdev.osuosl.org
> Subject: Re: [PATCH] staging/lustre: fix build errors
>
> Hi,
>
> On Tue, 4 Jun 2013 08:45:41 +0000 "Peng, Tao" <tao.peng@emc.com> wrote:
> >
> > From 369398c782c914e5f0548d5bbad22c00c6b58b6a Mon Sep 17 00:00:00 2001
> > From: Peng Tao <bergwolf@gmail.com>
> > Date: Tue, 4 Jun 2013 15:48:17 +0800
> > Subject: [PATCH] staging/lustre: fix build errors
> >
> > There are several issues:
> > 1. set_cpus_allowed() is not available with CONFIG_CPUMASK_OFFSTACK on
> > 2. CONFIG_MODULES may not be defined
> > 3. CONFIG_MODULE_UNLOAD may not be defined
> >
> > Signed-off-by: Peng Tao <tao.peng@emc.com>
> > ---
> > Stephen, please see if this fixes your build failure. I have tested it locally but only on X86
> architecture, with CONFIG_CPUMASK_OFFSTACK on and CONFIG_MODULES/CONFIG_MODULE_UNLOAD off.
>
> I have tried this with an x86_64 allmodconfig build and now I get just
> this build problem:
>
> drivers/built-in.o: In function `crc32_pclmul_le_16':
> (.text+0x28b9310): multiple definition of `crc32_pclmul_le_16'
> arch/x86/built-in.o:(.text+0xe70d0): first defined here
>
We should really remove the crypto implementations inside Lustre code. I have a patch to do that and Andreas is helping review it. Once done, I will send it out.
> BTW all the build problems I reported yesterday were with the x86_64
> allmodconfig build, my PowerPC build was fine (since it doesn't even try
> to build the lustre code).
>
Thanks. With the crypto-removal patch, I can pass x86_64 allmodeconfig build. Will send out patches later.
Best,
Tao
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] staging/lustre: fix build errors
2013-06-05 10:36 ` Peng, Tao
@ 2013-06-05 11:07 ` Dan Carpenter
0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2013-06-05 11:07 UTC (permalink / raw)
To: Peng, Tao
Cc: Stephen Rothwell, devel@driverdev.osuosl.org, Greg Kroah-Hartman,
linux-next@vger.kernel.org, Andreas Dilger
On Wed, Jun 05, 2013 at 10:36:20AM +0000, Peng, Tao wrote:
> > > Stephen, please see if this fixes your build failure. I have tested it locally but only on X86
> > architecture, with CONFIG_CPUMASK_OFFSTACK on and CONFIG_MODULES/CONFIG_MODULE_UNLOAD off.
> >
> > I have tried this with an x86_64 allmodconfig build and now I get just
> > this build problem:
> >
> > drivers/built-in.o: In function `crc32_pclmul_le_16':
> > (.text+0x28b9310): multiple definition of `crc32_pclmul_le_16'
> > arch/x86/built-in.o:(.text+0xe70d0): first defined here
> >
> We should really remove the crypto implementations inside Lustre
> code. I have a patch to do that and Andreas is helping review it.
> Once done, I will send it out.
Hopefully, it will be ready for tomorrow's linux-next? x86_64
allmodconfig is one of the most common ways to build a kernel.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-06-05 11:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04 8:45 [PATCH] staging/lustre: fix build errors Peng, Tao
2013-06-04 13:59 ` Greg Kroah-Hartman
2013-06-05 10:33 ` Peng, Tao
2013-06-05 0:42 ` Stephen Rothwell
2013-06-05 10:36 ` Peng, Tao
2013-06-05 11:07 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).