aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-12-05 19:03:16 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-01-06 11:53:53 -0500
commit7e44d3bea21fbb9494930d1cd35ca92a9a4a3279 (patch)
tree377fe5801ab1108aee2bc7f72d1b32618aa35e7f /include
parent05f3a9af58180d24a9decedd71d4587935782d70 (diff)
NSM: Generate NSMPROC_MON's "priv" argument when nsm_handle is created
Introduce a new data type, used by both the in-kernel NLM and NSM implementations, that is used to manage the opaque "priv" argument for the NSMPROC_MON and NLMPROC_SM_NOTIFY calls. Construct the "priv" cookie when the nsm_handle is created. The nsm_init_private() function may look a little strange, but it is roughly equivalent to how the XDR encoder formed the "priv" argument. It's going to go away soon. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/lockd/lockd.h1
-rw-r--r--include/linux/lockd/sm_inter.h1
-rw-r--r--include/linux/lockd/xdr.h6
3 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 8d715363c6ac..194fa8a66398 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -85,6 +85,7 @@ struct nsm_handle {
85 size_t sm_addrlen; 85 size_t sm_addrlen;
86 unsigned int sm_monitored : 1, 86 unsigned int sm_monitored : 1,
87 sm_sticky : 1; /* don't unmonitor */ 87 sm_sticky : 1; /* don't unmonitor */
88 struct nsm_private sm_priv;
88 char sm_addrbuf[NSM_ADDRBUF]; 89 char sm_addrbuf[NSM_ADDRBUF];
89}; 90};
90 91
diff --git a/include/linux/lockd/sm_inter.h b/include/linux/lockd/sm_inter.h
index 116bf38535a0..5cef5a79dd94 100644
--- a/include/linux/lockd/sm_inter.h
+++ b/include/linux/lockd/sm_inter.h
@@ -10,7 +10,6 @@
10#define LINUX_LOCKD_SM_INTER_H 10#define LINUX_LOCKD_SM_INTER_H
11 11
12#define SM_MAXSTRLEN 1024 12#define SM_MAXSTRLEN 1024
13#define SM_PRIV_SIZE 16
14 13
15extern int nsm_local_state; 14extern int nsm_local_state;
16 15
diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h
index d6b3a802c046..6b5199263858 100644
--- a/include/linux/lockd/xdr.h
+++ b/include/linux/lockd/xdr.h
@@ -13,6 +13,12 @@
13#include <linux/nfs.h> 13#include <linux/nfs.h>
14#include <linux/sunrpc/xdr.h> 14#include <linux/sunrpc/xdr.h>
15 15
16#define SM_PRIV_SIZE 16
17
18struct nsm_private {
19 unsigned char data[SM_PRIV_SIZE];
20};
21
16struct svc_rqst; 22struct svc_rqst;
17 23
18#define NLM_MAXCOOKIELEN 32 24#define NLM_MAXCOOKIELEN 32