diff options
Diffstat (limited to 'include/linux/lockd')
-rw-r--r-- | include/linux/lockd/bind.h | 3 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 3 | ||||
-rw-r--r-- | include/linux/lockd/xdr.h | 13 | ||||
-rw-r--r-- | include/linux/lockd/xdr4.h | 7 |
4 files changed, 20 insertions, 6 deletions
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h index 4e0aebedb..40dd93194 100644 --- a/include/linux/lockd/bind.h +++ b/include/linux/lockd/bind.h @@ -13,7 +13,6 @@ /* Dummy declarations */ struct svc_rqst; -struct knfs_fh; struct svc_client; /* opaque type */ /* @@ -24,7 +23,7 @@ struct nlmsvc_binding { void (*exp_unlock)(void); struct svc_client * (*exp_getclient)(struct sockaddr_in *); u32 (*fopen)(struct svc_rqst *, - struct knfs_fh *, + struct nfs_fh *, struct file *); void (*fclose)(struct file *); void (*detach)(void); diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index cb2c148f1..d949bd649 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h @@ -75,13 +75,14 @@ struct nlm_rqst { */ struct nlm_file { struct nlm_file * f_next; /* linked list */ - struct knfs_fh f_handle; /* NFS file handle */ + struct nfs_fh f_handle; /* NFS file handle */ struct file f_file; /* VFS file pointer */ struct nlm_share * f_shares; /* DOS shares */ struct nlm_block * f_blocks; /* blocked locks */ unsigned int f_locks; /* guesstimate # of locks */ unsigned int f_count; /* reference count */ struct semaphore f_sema; /* avoid concurrent access */ + int f_hash; /* hash of f_handle */ }; /* diff --git a/include/linux/lockd/xdr.h b/include/linux/lockd/xdr.h index f397306c4..72752441e 100644 --- a/include/linux/lockd/xdr.h +++ b/include/linux/lockd/xdr.h @@ -13,8 +13,15 @@ #include <linux/nfs.h> #include <linux/sunrpc/xdr.h> -extern u32 nlm_granted, nlm_lck_denied, nlm_lck_denied_nolocks, - nlm_lck_blocked, nlm_lck_denied_grace_period; +#define NLM_MAXSTRLEN 1024 + +#define QUADLEN(len) (((len) + 3) >> 2) + +#define nlm_granted __constant_htonl(NLM_LCK_GRANTED) +#define nlm_lck_denied __constant_htonl(NLM_LCK_DENIED) +#define nlm_lck_denied_nolocks __constant_htonl(NLM_LCK_DENIED_NOLOCKS) +#define nlm_lck_blocked __constant_htonl(NLM_LCK_BLOCKED) +#define nlm_lck_denied_grace_period __constant_htonl(NLM_LCK_DENIED_GRACE_PERIOD) /* Lock info passed via NLM */ struct nlm_lock { @@ -49,6 +56,8 @@ struct nlm_args { u32 fsm_mode; }; +typedef struct nlm_args nlm_args; + /* * Generic lockd result */ diff --git a/include/linux/lockd/xdr4.h b/include/linux/lockd/xdr4.h index d9d7e3f75..cee36e7c0 100644 --- a/include/linux/lockd/xdr4.h +++ b/include/linux/lockd/xdr4.h @@ -15,7 +15,12 @@ #include <linux/lockd/xdr.h> /* error codes new to NLMv4 */ -extern u32 nlm4_deadlock, nlm4_rofs, nlm4_stale_fh, nlm4_fbig, nlm4_failed; +#define nlm4_deadlock __constant_htonl(NLM_DEADLCK) +#define nlm4_rofs __constant_htonl(NLM_ROFS) +#define nlm4_stale_fh __constant_htonl(NLM_STALE_FH) +#define nlm4_fbig __constant_htonl(NLM_FBIG) +#define nlm4_failed __constant_htonl(NLM_FAILED) + int nlm4svc_decode_testargs(struct svc_rqst *, u32 *, struct nlm_args *); |