Print this page
7127  remove -Wno-missing-braces from Makefile.uts


  20  * This file contains all the external entry points of klmmod.
  21  * Basically, this is the "glue" to the BSD nlm code.
  22  */
  23 
  24 #include <sys/types.h>
  25 #include <sys/errno.h>
  26 #include <sys/modctl.h>
  27 #include <sys/flock.h>
  28 
  29 #include <nfs/nfs.h>
  30 #include <nfs/nfssys.h>
  31 #include <nfs/lm.h>
  32 #include <rpcsvc/nlm_prot.h>
  33 #include "nlm_impl.h"
  34 
  35 static struct modlmisc modlmisc = {
  36         &mod_miscops, "lock mgr common module"
  37 };
  38 
  39 static struct modlinkage modlinkage = {
  40         MODREV_1, &modlmisc, NULL
  41 };
  42 
  43 /*
  44  * Cluster node ID.  Zero unless we're part of a cluster.
  45  * Set by lm_set_nlmid_flk.  Pass to lm_set_nlm_status.
  46  * We're not yet doing "clustered" NLM stuff.
  47  */
  48 int lm_global_nlmid = 0;
  49 
  50 /*
  51  * Call-back hook for clusters: Set lock manager status.
  52  * If this hook is set, call this instead of the ususal
  53  * flk_set_lockmgr_status(FLK_LOCKMGR_UP / DOWN);
  54  */
  55 void (*lm_set_nlm_status)(int nlm_id, flk_nlm_status_t) = NULL;
  56 
  57 /*
  58  * Call-back hook for clusters: Delete all locks held by sysid.
  59  * Call from code that drops all client locks (for which we're
  60  * the server) i.e. after the SM tells us a client has crashed.




  20  * This file contains all the external entry points of klmmod.
  21  * Basically, this is the "glue" to the BSD nlm code.
  22  */
  23 
  24 #include <sys/types.h>
  25 #include <sys/errno.h>
  26 #include <sys/modctl.h>
  27 #include <sys/flock.h>
  28 
  29 #include <nfs/nfs.h>
  30 #include <nfs/nfssys.h>
  31 #include <nfs/lm.h>
  32 #include <rpcsvc/nlm_prot.h>
  33 #include "nlm_impl.h"
  34 
  35 static struct modlmisc modlmisc = {
  36         &mod_miscops, "lock mgr common module"
  37 };
  38 
  39 static struct modlinkage modlinkage = {
  40         MODREV_1, { &modlmisc, NULL }
  41 };
  42 
  43 /*
  44  * Cluster node ID.  Zero unless we're part of a cluster.
  45  * Set by lm_set_nlmid_flk.  Pass to lm_set_nlm_status.
  46  * We're not yet doing "clustered" NLM stuff.
  47  */
  48 int lm_global_nlmid = 0;
  49 
  50 /*
  51  * Call-back hook for clusters: Set lock manager status.
  52  * If this hook is set, call this instead of the ususal
  53  * flk_set_lockmgr_status(FLK_LOCKMGR_UP / DOWN);
  54  */
  55 void (*lm_set_nlm_status)(int nlm_id, flk_nlm_status_t) = NULL;
  56 
  57 /*
  58  * Call-back hook for clusters: Delete all locks held by sysid.
  59  * Call from code that drops all client locks (for which we're
  60  * the server) i.e. after the SM tells us a client has crashed.