EKC
2006-Jun-30 10:54 UTC
[Lustre-discuss] How To Build A Patchless Client On Lustre 1.6.0 beta4? [solved]
Here''s another solution to this problem. I patched my kernel so that Lustre config could find cpu_relax() when doing the compilation test for bin_spinlock.h: <patch> --- ./include/linux/bit_spinlock.h~ 2006-06-20 09:31:55.000000000 +0000 +++ ./include/linux/bit_spinlock.h 2006-06-30 16:38:19.000000000 +0000 @@ -1,6 +1,8 @@ #ifndef __LINUX_BIT_SPINLOCK_H #define __LINUX_BIT_SPINLOCK_H + #include <asm-x86_64/processor.h> + /* * bit-based spin_lock() * </patch> On 6/30/06, Anselm Strauss <anselm.strauss@id.unibe.ch> wrote:> hi. > > i got exactly the same problem. i tried it with gentoo linux on a > dual opteron system with kernel 2.6.16-gentoo-r9. > > On Jun 30, 2006, at 4:51 PM, EKC wrote: > > > Yes, the development environment is running 2.6.17.1. The lustre > > client server is also running 2.6.17.1 > > > > Modprobe is still reporting: > > <error> > > ptlrpc: Unknown symbol bit_spin_unlock > > ptlrpc: Unknown symbol bit_spin_lock > > </error> > > > > While running configure to build a lustre patchless client, I am > > getting the following output: > > <snip> > > checking for ../linux-2.6.17.1/include/linux/bit_spinlock.h... yes > > checking if bit_spinlock.h can be compiled... no > > </snip> > > i disabled smp support in the kernel, then the last line changes to yes: > <snip> > checking if bit_spinlock.h can be compiled... yes > </snip> > > i was then able to compile the client + kernel modules, load the > modules and mount a lustre filesystem from a patched lustre server > (linux 2.6.12 + lustre 1.6.0 beta4). > i have no idea how smp is related to this issue. i looked at the > configure script, it''s actually easy to find the command for this > check, but i have no idea what it''s doing and why it fails for an smp > kernel. > > > make is reporting the following warnings regarding bit_spin_unlock: > > <snip> > > /lustre-1.5.91/lustre/include/lustre_dlm.h: In function > > `lock_bitlock'': > > /lustre-1.5.91/lustre/include/lustre_dlm.h:682: warning: implicit > > declaration of function `bit_spin_lock'' > > /lustre-1.5.91/lustre/include/lustre_dlm.h: In function > > `unlock_bitlock'': > > /lustre-1.5.91/lustre/include/lustre_dlm.h:691: warning: implicit > > declaration of function `bit_spin_unlock'' > > </snip> > > > > I have tried including bit_spinlock.h directly in lustre_dlm.h: > > <patch> > > --- lustre/include/lustre_dlm.h~ 2006-06-30 > > 14:17:06.000000000 +0000 > > +++ lustre/include/lustre_dlm.h 2006-06-30 14:28:24.000000000 +0000 > > @@ -6,9 +6,6 @@ > > #ifndef _LUSTRE_DLM_H__ > > #define _LUSTRE_DLM_H__ > > > > -#include <linux/spinlock.h> > > -#include <linux/bit_spinlock.h> > > - > > #if defined(__linux__) > > #include <linux/lustre_dlm.h> > > #elif defined(__APPLE__) > > </patch> > > > > However, this results in the following make error: > > <error> > > /usr/include/linux/bit_spinlock.h:59: error: `bitlock'' undeclared > > (first use in this function) > > </error> > > > > Any suggestions? > > > > Thanks > > > > On 6/30/06, Wang Yibin <wangyb@clusterfs.com> wrote: > >> Hi, > >> > >> EKC wrote: > >> > I have built a patchless Lustre client for 1.6.0 beta4 using the > >> > following configuration directive: > >> > > >> > ./configure --with-linux=../linux-2.6.17.1 --disable-server > >> > --disable-liblustre; make; make install > >> > > >> > When built this way "mount -t lustre" fails with a long list of > >> > "unknown symbol" errors, including: > >> > <snip> > >> > ptlrpc: Unknown symbol bit_spin_unlock > >> > ptlrpc: Unknown symbol bit_spin_lock > >> > >> Is the running kernel built from ../linux-2.6.17.1? > >> If not, the running kernel may have different versions of above > >> symbols > >> with 2.6.17.1 > >> So you''d better rebuild and install kernel/lustre using the same > >> kernel > >> sources. > >> > >> -- > >> Cheers, > >> Wang Yibin > > cheers > anselm strauss > >
Andreas Dilger
2006-Jul-01 05:02 UTC
[Lustre-discuss] How To Build A Patchless Client On Lustre 1.6.0 beta4? [solved]
On Jun 30, 2006 10:54 -0600, EKC wrote:> Here''s another solution to this problem. I patched my kernel so that > Lustre config could find cpu_relax() when doing the compilation test > for bin_spinlock.h: > > <patch> > --- ./include/linux/bit_spinlock.h~ 2006-06-20 09:31:55.000000000 +0000 > +++ ./include/linux/bit_spinlock.h 2006-06-30 16:38:19.000000000 +0000 > @@ -1,6 +1,8 @@ > #ifndef __LINUX_BIT_SPINLOCK_H > #define __LINUX_BIT_SPINLOCK_H > > + #include <asm-x86_64/processor.h> > +It should be possible to just include this into the compilation test, and in the lustre code as <asm/processor.h>. The whole desire of the patchless client is to avoid patching the kernel, otherwise we may as well just have the full lustre patch...> On 6/30/06, Anselm Strauss <anselm.strauss@id.unibe.ch> wrote: > >hi. > > > >i got exactly the same problem. i tried it with gentoo linux on a > >dual opteron system with kernel 2.6.16-gentoo-r9. > > > >On Jun 30, 2006, at 4:51 PM, EKC wrote: > > > >> Yes, the development environment is running 2.6.17.1. The lustre > >> client server is also running 2.6.17.1 > >> > >> Modprobe is still reporting: > >> <error> > >> ptlrpc: Unknown symbol bit_spin_unlock > >> ptlrpc: Unknown symbol bit_spin_lock > >> </error> > >> > >> While running configure to build a lustre patchless client, I am > >> getting the following output: > >> <snip> > >> checking for ../linux-2.6.17.1/include/linux/bit_spinlock.h... yes > >> checking if bit_spinlock.h can be compiled... no > >> </snip> > > > >i disabled smp support in the kernel, then the last line changes to yes: > ><snip> > >checking if bit_spinlock.h can be compiled... yes > ></snip> > > > >i was then able to compile the client + kernel modules, load the > >modules and mount a lustre filesystem from a patched lustre server > >(linux 2.6.12 + lustre 1.6.0 beta4). > >i have no idea how smp is related to this issue. i looked at the > >configure script, it''s actually easy to find the command for this > >check, but i have no idea what it''s doing and why it fails for an smp > >kernel. > > > >> make is reporting the following warnings regarding bit_spin_unlock: > >> <snip> > >> /lustre-1.5.91/lustre/include/lustre_dlm.h: In function > >> `lock_bitlock'': > >> /lustre-1.5.91/lustre/include/lustre_dlm.h:682: warning: implicit > >> declaration of function `bit_spin_lock'' > >> /lustre-1.5.91/lustre/include/lustre_dlm.h: In function > >> `unlock_bitlock'': > >> /lustre-1.5.91/lustre/include/lustre_dlm.h:691: warning: implicit > >> declaration of function `bit_spin_unlock'' > >> </snip> > >> > >> I have tried including bit_spinlock.h directly in lustre_dlm.h: > >> <patch> > >> --- lustre/include/lustre_dlm.h~ 2006-06-30 > >> 14:17:06.000000000 +0000 > >> +++ lustre/include/lustre_dlm.h 2006-06-30 14:28:24.000000000 +0000 > >> @@ -6,9 +6,6 @@ > >> #ifndef _LUSTRE_DLM_H__ > >> #define _LUSTRE_DLM_H__ > >> > >> -#include <linux/spinlock.h> > >> -#include <linux/bit_spinlock.h> > >> - > >> #if defined(__linux__) > >> #include <linux/lustre_dlm.h> > >> #elif defined(__APPLE__) > >> </patch> > >> > >> However, this results in the following make error: > >> <error> > >> /usr/include/linux/bit_spinlock.h:59: error: `bitlock'' undeclared > >> (first use in this function) > >> </error> > >> > >> Any suggestions? > >> > >> Thanks > >> > >> On 6/30/06, Wang Yibin <wangyb@clusterfs.com> wrote: > >>> Hi, > >>> > >>> EKC wrote: > >>> > I have built a patchless Lustre client for 1.6.0 beta4 using the > >>> > following configuration directive: > >>> > > >>> > ./configure --with-linux=../linux-2.6.17.1 --disable-server > >>> > --disable-liblustre; make; make install > >>> > > >>> > When built this way "mount -t lustre" fails with a long list of > >>> > "unknown symbol" errors, including: > >>> > <snip> > >>> > ptlrpc: Unknown symbol bit_spin_unlock > >>> > ptlrpc: Unknown symbol bit_spin_lock > >>> > >>> Is the running kernel built from ../linux-2.6.17.1? > >>> If not, the running kernel may have different versions of above > >>> symbols > >>> with 2.6.17.1 > >>> So you''d better rebuild and install kernel/lustre using the same > >>> kernel > >>> sources. > >>> > >>> -- > >>> Cheers, > >>> Wang Yibin > > > >cheers > >anselm strauss > > > > > _______________________________________________ > Lustre-discuss mailing list > Lustre-discuss@clusterfs.com > https://mail.clusterfs.com/mailman/listinfo/lustre-discussCheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc.
Anselm Strauss
2006-Jul-01 18:41 UTC
[Lustre-discuss] How To Build A Patchless Client On Lustre 1.6.0 beta4? [solved]
On Jul 1, 2006, at 1:02 PM, Andreas Dilger wrote:> On Jun 30, 2006 10:54 -0600, EKC wrote: >> Here''s another solution to this problem. I patched my kernel so that >> Lustre config could find cpu_relax() when doing the compilation test >> for bin_spinlock.h: >> >> <patch> >> --- ./include/linux/bit_spinlock.h~ 2006-06-20 >> 09:31:55.000000000 +0000 >> +++ ./include/linux/bit_spinlock.h 2006-06-30 >> 16:38:19.000000000 +0000 >> @@ -1,6 +1,8 @@ >> #ifndef __LINUX_BIT_SPINLOCK_H >> #define __LINUX_BIT_SPINLOCK_H >> >> + #include <asm-x86_64/processor.h> >> + > > It should be possible to just include this into the compilation test, > and in the lustre code as <asm/processor.h>. The whole desire of the > patchless client is to avoid patching the kernel, otherwise we may as > well just have the full lustre patch...confirmed. i used the following: <patch> *** lustre-1.5.91/lustre/include/lustre_dlm.h.bak Sun Jul 2 02:25:39 2006 --- lustre-1.5.91/lustre/include/lustre_dlm.h Sun Jul 2 02:25:57 2006 *************** *** 21,26 **** --- 21,27 ---- #include <lustre_import.h> #include <lustre_handles.h> #include <lustre_export.h> /* for obd_export, for LDLM_DEBUG */ + #include <asm/processor.h> struct obd_ops; struct obd_device; *** lustre-1.5.91/configure.bak Sun Jul 2 02:24:59 2006 --- lustre-1.5.91/configure Sun Jul 2 02:25:29 2006 *************** *** 8068,8073 **** --- 8068,8074 ---- cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ + #include <asm/processor.h> #include <linux/spinlock.h> #include <linux/bit_spinlock.h> </patch> compiling, installing, module loading and mounting worked. more i have not tested yet ...> >> On 6/30/06, Anselm Strauss <anselm.strauss@id.unibe.ch> wrote: >>> hi. >>> >>> i got exactly the same problem. i tried it with gentoo linux on a >>> dual opteron system with kernel 2.6.16-gentoo-r9. >>> >>> On Jun 30, 2006, at 4:51 PM, EKC wrote: >>> >>>> Yes, the development environment is running 2.6.17.1. The lustre >>>> client server is also running 2.6.17.1 >>>> >>>> Modprobe is still reporting: >>>> <error> >>>> ptlrpc: Unknown symbol bit_spin_unlock >>>> ptlrpc: Unknown symbol bit_spin_lock >>>> </error> >>>> >>>> While running configure to build a lustre patchless client, I am >>>> getting the following output: >>>> <snip> >>>> checking for ../linux-2.6.17.1/include/linux/bit_spinlock.h... yes >>>> checking if bit_spinlock.h can be compiled... no >>>> </snip> >>> >>> i disabled smp support in the kernel, then the last line changes >>> to yes: >>> <snip> >>> checking if bit_spinlock.h can be compiled... yes >>> </snip> >>> >>> i was then able to compile the client + kernel modules, load the >>> modules and mount a lustre filesystem from a patched lustre server >>> (linux 2.6.12 + lustre 1.6.0 beta4). >>> i have no idea how smp is related to this issue. i looked at the >>> configure script, it''s actually easy to find the command for this >>> check, but i have no idea what it''s doing and why it fails for an >>> smp >>> kernel. >>> >>>> make is reporting the following warnings regarding bit_spin_unlock: >>>> <snip> >>>> /lustre-1.5.91/lustre/include/lustre_dlm.h: In function >>>> `lock_bitlock'': >>>> /lustre-1.5.91/lustre/include/lustre_dlm.h:682: warning: implicit >>>> declaration of function `bit_spin_lock'' >>>> /lustre-1.5.91/lustre/include/lustre_dlm.h: In function >>>> `unlock_bitlock'': >>>> /lustre-1.5.91/lustre/include/lustre_dlm.h:691: warning: implicit >>>> declaration of function `bit_spin_unlock'' >>>> </snip> >>>> >>>> I have tried including bit_spinlock.h directly in lustre_dlm.h: >>>> <patch> >>>> --- lustre/include/lustre_dlm.h~ 2006-06-30 >>>> 14:17:06.000000000 +0000 >>>> +++ lustre/include/lustre_dlm.h 2006-06-30 14:28:24.000000000 +0000 >>>> @@ -6,9 +6,6 @@ >>>> #ifndef _LUSTRE_DLM_H__ >>>> #define _LUSTRE_DLM_H__ >>>> >>>> -#include <linux/spinlock.h> >>>> -#include <linux/bit_spinlock.h> >>>> - >>>> #if defined(__linux__) >>>> #include <linux/lustre_dlm.h> >>>> #elif defined(__APPLE__) >>>> </patch> >>>> >>>> However, this results in the following make error: >>>> <error> >>>> /usr/include/linux/bit_spinlock.h:59: error: `bitlock'' undeclared >>>> (first use in this function) >>>> </error> >>>> >>>> Any suggestions? >>>> >>>> Thanks >>>> >>>> On 6/30/06, Wang Yibin <wangyb@clusterfs.com> wrote: >>>>> Hi, >>>>> >>>>> EKC wrote: >>>>>> I have built a patchless Lustre client for 1.6.0 beta4 using the >>>>>> following configuration directive: >>>>>> >>>>>> ./configure --with-linux=../linux-2.6.17.1 --disable-server >>>>>> --disable-liblustre; make; make install >>>>>> >>>>>> When built this way "mount -t lustre" fails with a long list of >>>>>> "unknown symbol" errors, including: >>>>>> <snip> >>>>>> ptlrpc: Unknown symbol bit_spin_unlock >>>>>> ptlrpc: Unknown symbol bit_spin_lock >>>>> >>>>> Is the running kernel built from ../linux-2.6.17.1? >>>>> If not, the running kernel may have different versions of above >>>>> symbols >>>>> with 2.6.17.1 >>>>> So you''d better rebuild and install kernel/lustre using the same >>>>> kernel >>>>> sources. >>>>> >>>>> -- >>>>> Cheers, >>>>> Wang Yibin >>> >>> cheers >>> anselm strauss >>> >>> >> _______________________________________________ >> Lustre-discuss mailing list >> Lustre-discuss@clusterfs.com >> https://mail.clusterfs.com/mailman/listinfo/lustre-discuss > > Cheers, Andreas > -- > Andreas Dilger > Principal Software Engineer > Cluster File Systems, Inc.