FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 08-22-2012, 11:47 AM
"J. Bruce Fields"
 
Default lockd: use new hashtable implementation

On Wed, Aug 22, 2012 at 04:27:08AM +0200, Sasha Levin wrote:
> +static int __init nlm_init(void)
> +{
> + hash_init(nlm_files);
> + return 0;
> +}
> +
> +module_init(nlm_init);

That's giving me:

fs/lockd/svcsubs.o: In function `nlm_init':
/home/bfields/linux-2.6/fs/lockd/svcsubs.c:454: multiple definition of `init_module'
fs/lockd/svc.o:/home/bfields/linux-2.6/fs/lockd/svc.c:606: first defined here
make[2]: *** [fs/lockd/lockd.o] Error 1
make[1]: *** [fs/lockd] Error 2
make[1]: *** Waiting for unfinished jobs....

--b.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-22-2012, 12:13 PM
Sasha Levin
 
Default lockd: use new hashtable implementation

On 08/22/2012 01:47 PM, J. Bruce Fields wrote:
> On Wed, Aug 22, 2012 at 04:27:08AM +0200, Sasha Levin wrote:
>> +static int __init nlm_init(void)
>> +{
>> + hash_init(nlm_files);
>> + return 0;
>> +}
>> +
>> +module_init(nlm_init);
>
> That's giving me:
>
> fs/lockd/svcsubs.o: In function `nlm_init':
> /home/bfields/linux-2.6/fs/lockd/svcsubs.c:454: multiple definition of `init_module'
> fs/lockd/svc.o:/home/bfields/linux-2.6/fs/lockd/svc.c:606: first defined here
> make[2]: *** [fs/lockd/lockd.o] Error 1
> make[1]: *** [fs/lockd] Error 2
> make[1]: *** Waiting for unfinished jobs....

I tested this entire patch set both with linux-next and Linus' latest master,
and it worked fine in both places.

Is it possible that lockd has a -next tree which isn't pulled into linux-next?
(there's nothing listed in MAINTAINERS that I could see).

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-22-2012, 01:12 PM
"J. Bruce Fields"
 
Default lockd: use new hashtable implementation

On Wed, Aug 22, 2012 at 02:13:54PM +0200, Sasha Levin wrote:
> On 08/22/2012 01:47 PM, J. Bruce Fields wrote:
> > On Wed, Aug 22, 2012 at 04:27:08AM +0200, Sasha Levin wrote:
> >> +static int __init nlm_init(void)
> >> +{
> >> + hash_init(nlm_files);
> >> + return 0;
> >> +}
> >> +
> >> +module_init(nlm_init);
> >
> > That's giving me:
> >
> > fs/lockd/svcsubs.o: In function `nlm_init':
> > /home/bfields/linux-2.6/fs/lockd/svcsubs.c:454: multiple definition of `init_module'
> > fs/lockd/svc.o:/home/bfields/linux-2.6/fs/lockd/svc.c:606: first defined here
> > make[2]: *** [fs/lockd/lockd.o] Error 1
> > make[1]: *** [fs/lockd] Error 2
> > make[1]: *** Waiting for unfinished jobs....
>
> I tested this entire patch set both with linux-next and Linus' latest master,
> and it worked fine in both places.
>
> Is it possible that lockd has a -next tree which isn't pulled into linux-next?
> (there's nothing listed in MAINTAINERS that I could see).

No, there's the same problem with Linus's latest.

I'm applying just patches 1 and 13--but doesn't look like your earlier
patches touch lockd.

Are you actually building lockd? (CONFIG_LOCKD).

--b.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-22-2012, 01:22 PM
Mathieu Desnoyers
 
Default lockd: use new hashtable implementation

* Sasha Levin (levinsasha928@gmail.com) wrote:
> On 08/22/2012 01:47 PM, J. Bruce Fields wrote:
> > On Wed, Aug 22, 2012 at 04:27:08AM +0200, Sasha Levin wrote:
> >> +static int __init nlm_init(void)
> >> +{
> >> + hash_init(nlm_files);
> >> + return 0;
> >> +}
> >> +
> >> +module_init(nlm_init);
> >
> > That's giving me:
> >
> > fs/lockd/svcsubs.o: In function `nlm_init':
> > /home/bfields/linux-2.6/fs/lockd/svcsubs.c:454: multiple definition of `init_module'
> > fs/lockd/svc.o:/home/bfields/linux-2.6/fs/lockd/svc.c:606: first defined here
> > make[2]: *** [fs/lockd/lockd.o] Error 1
> > make[1]: *** [fs/lockd] Error 2
> > make[1]: *** Waiting for unfinished jobs....
>
> I tested this entire patch set both with linux-next and Linus' latest master,
> and it worked fine in both places.
>
> Is it possible that lockd has a -next tree which isn't pulled into linux-next?
> (there's nothing listed in MAINTAINERS that I could see).

fs/lockd/Makefile:

obj-$(CONFIG_LOCKD) += lockd.o

lockd-objs-y := clntlock.o clntproc.o clntxdr.o host.o svc.o svclock.o
svcshare.o svcproc.o svcsubs.o mon.o xdr.o grace.o

your patch adds a module_init to svcsubs.c.
However, there is already one in svc.c, pulled into the same module.

in your test build, is CONFIG_LOCKD defined as "m" or "y" ? You should
always test both.

One solution here is to create a "local" init function in svcsubs.c and
expose it to svc.c, so the latter can call it from its module init
function.

Thanks,

Mathieu

--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 08-22-2012, 05:32 PM
Sasha Levin
 
Default lockd: use new hashtable implementation

On 08/22/2012 03:22 PM, Mathieu Desnoyers wrote:
> * Sasha Levin (levinsasha928@gmail.com) wrote:
>> On 08/22/2012 01:47 PM, J. Bruce Fields wrote:
>>> On Wed, Aug 22, 2012 at 04:27:08AM +0200, Sasha Levin wrote:
>>>> +static int __init nlm_init(void)
>>>> +{
>>>> + hash_init(nlm_files);
>>>> + return 0;
>>>> +}
>>>> +
>>>> +module_init(nlm_init);
>>>
>>> That's giving me:
>>>
>>> fs/lockd/svcsubs.o: In function `nlm_init':
>>> /home/bfields/linux-2.6/fs/lockd/svcsubs.c:454: multiple definition of `init_module'
>>> fs/lockd/svc.o:/home/bfields/linux-2.6/fs/lockd/svc.c:606: first defined here
>>> make[2]: *** [fs/lockd/lockd.o] Error 1
>>> make[1]: *** [fs/lockd] Error 2
>>> make[1]: *** Waiting for unfinished jobs....
>>
>> I tested this entire patch set both with linux-next and Linus' latest master,
>> and it worked fine in both places.
>>
>> Is it possible that lockd has a -next tree which isn't pulled into linux-next?
>> (there's nothing listed in MAINTAINERS that I could see).
>
> fs/lockd/Makefile:
>
> obj-$(CONFIG_LOCKD) += lockd.o
>
> lockd-objs-y := clntlock.o clntproc.o clntxdr.o host.o svc.o svclock.o
> svcshare.o svcproc.o svcsubs.o mon.o xdr.o grace.o
>
> your patch adds a module_init to svcsubs.c.
> However, there is already one in svc.c, pulled into the same module.
>
> in your test build, is CONFIG_LOCKD defined as "m" or "y" ? You should
> always test both.
>
> One solution here is to create a "local" init function in svcsubs.c and
> expose it to svc.c, so the latter can call it from its module init
> function.

Ah yes, it was on =y and I didn't notice :/

I'll fix that.

> Thanks,
>
> Mathieu
>

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 09:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org