* What's nlmsvc_proc_share() for? @ 2011-04-06 14:30 Rob Landley 2011-04-07 3:04 ` Mi Jinlong 0 siblings, 1 reply; 3+ messages in thread From: Rob Landley @ 2011-04-06 14:30 UTC (permalink / raw) To: linux-nfs I'm reading through the fs/lockd code, and I read grace.c and svcshare.c and code such as nlmsvc_share_file() only seems to get called from nlmsvc_proc_share() (and its cut-and-paste twin nlm4svc_proc_share())... And as far as I can grep, those last two functions are never called from anywhere in the kernel source. The comments say this is for "DOS shares", which presumably doesn't mean what I think it means because DOS used netbios, not NFS... What's this code for, and where does it get used? Is it something out of tree, or some header #define that's glued##together that I'm not picking up via grep...? Rob ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What's nlmsvc_proc_share() for? 2011-04-06 14:30 What's nlmsvc_proc_share() for? Rob Landley @ 2011-04-07 3:04 ` Mi Jinlong 2011-04-08 1:09 ` Rob Landley 0 siblings, 1 reply; 3+ messages in thread From: Mi Jinlong @ 2011-04-07 3:04 UTC (permalink / raw) To: Rob Landley; +Cc: linux-nfs Rob Landley: > I'm reading through the fs/lockd code, and I read grace.c and svcshare.c > and code such as nlmsvc_share_file() only seems to get called from > nlmsvc_proc_share() (and its cut-and-paste twin nlm4svc_proc_share())... > > And as far as I can grep, those last two functions are never called from > anywhere in the kernel source. > > The comments say this is for "DOS shares", which presumably doesn't mean > what I think it means because DOS used netbios, not NFS... > > What's this code for, and where does it get used? Is it something out > of tree, or some header #define that's glued##together that I'm not > picking up via grep...? Maybe you can get some info from the following code at fs/lockd/svc4proc.c: 462 463 #define PROC(name, xargt, xrest, argt, rest, respsize) \ 464 { .pc_func = (svc_procfunc) nlm4svc_proc_##name, \ 465 .pc_decode = (kxdrproc_t) nlm4svc_decode_##xargt, \ 466 .pc_encode = (kxdrproc_t) nlm4svc_encode_##xrest, \ 467 .pc_release = NULL, \ 468 .pc_argsize = sizeof(struct nlm_##argt), \ 469 .pc_ressize = sizeof(struct nlm_##rest), \ 470 .pc_xdrressize = respsize, \ 471 } 472 #define Ck (1+XDR_QUADLEN(NLM_MAXCOOKIELEN)) /* cookie */ 473 #define No (1+1024/4) /* netobj */ 474 #define St 1 /* status */ 475 #define Rg 4 /* range (offset + length) */ 476 struct svc_procedure nlmsvc_procedures4[] = { 477 PROC(null, void, void, void, void, 1), .. ... 497 PROC(none, void, void, void, void, 0), 498 PROC(share, shareargs, shareres, args, res, Ck+St+1), 499 PROC(unshare, shareargs, shareres, args, res, Ck+St+1), 500 PROC(nm_lock, lockargs, res, args, res, Ck+St), 501 PROC(free_all, notify, void, args, void, 1), 502 503 }; -- ---- thanks Mi Jinlong ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: What's nlmsvc_proc_share() for? 2011-04-07 3:04 ` Mi Jinlong @ 2011-04-08 1:09 ` Rob Landley 0 siblings, 0 replies; 3+ messages in thread From: Rob Landley @ 2011-04-08 1:09 UTC (permalink / raw) To: Mi Jinlong; +Cc: linux-nfs On 04/06/2011 10:04 PM, Mi Jinlong wrote: > Rob Landley: >> What's this code for, and where does it get used? Is it something out >> of tree, or some header #define that's glued##together that I'm not >> picking up via grep...? > > Maybe you can get some info from the following code at fs/lockd/svc4proc.c: > > 462 > 463 #define PROC(name, xargt, xrest, argt, rest, respsize) \ > 464 { .pc_func = (svc_procfunc) nlm4svc_proc_##name, \ ... > 498 PROC(share, shareargs, shareres, args, res, Ck+St+1), So it's glued##together in a macro. Got it. Thanks, Rob ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-08 1:10 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-06 14:30 What's nlmsvc_proc_share() for? Rob Landley 2011-04-07 3:04 ` Mi Jinlong 2011-04-08 1:09 ` Rob Landley
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).