All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mi Jinlong <mijinlong@cn.fujitsu.com>
To: Rob Landley <rlandley@parallels.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: What's nlmsvc_proc_share() for?
Date: Thu, 07 Apr 2011 11:04:05 +0800	[thread overview]
Message-ID: <4D9D29A5.7000507@cn.fujitsu.com> (raw)
In-Reply-To: <4D9C7916.5030907@parallels.com>



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


  reply	other threads:[~2011-04-07  3:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 14:30 What's nlmsvc_proc_share() for? Rob Landley
2011-04-07  3:04 ` Mi Jinlong [this message]
2011-04-08  1:09   ` Rob Landley

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=4D9D29A5.7000507@cn.fujitsu.com \
    --to=mijinlong@cn.fujitsu.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=rlandley@parallels.com \
    /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.