Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/include/linux/lockd/bind.h |
| 3 | * |
| 4 | * This is the part of lockd visible to nfsd and the nfs client. |
| 5 | * |
| 6 | * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> |
| 7 | */ |
| 8 | |
| 9 | #ifndef LINUX_LOCKD_BIND_H |
| 10 | #define LINUX_LOCKD_BIND_H |
| 11 | |
| 12 | #include <linux/lockd/nlm.h> |
NeilBrown | d343fce | 2006-10-17 00:10:18 -0700 | [diff] [blame] | 13 | /* need xdr-encoded error codes too, so... */ |
| 14 | #include <linux/lockd/xdr.h> |
| 15 | #ifdef CONFIG_LOCKD_V4 |
| 16 | #include <linux/lockd/xdr4.h> |
| 17 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | /* Dummy declarations */ |
| 20 | struct svc_rqst; |
| 21 | |
| 22 | /* |
| 23 | * This is the set of functions for lockd->nfsd communication |
| 24 | */ |
| 25 | struct nlmsvc_binding { |
Al Viro | e8c5c04 | 2006-12-13 00:35:03 -0800 | [diff] [blame] | 26 | __be32 (*fopen)(struct svc_rqst *, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 27 | struct nfs_fh *, |
| 28 | struct file **); |
| 29 | void (*fclose)(struct file *); |
Marc Eshel | 9a8db97 | 2007-07-17 04:04:35 -0700 | [diff] [blame] | 30 | unsigned long (*get_grace_period)(void); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | extern struct nlmsvc_binding * nlmsvc_ops; |
| 34 | |
| 35 | /* |
| 36 | * Functions exported by the lockd module |
| 37 | */ |
| 38 | extern int nlmclnt_proc(struct inode *, int, struct file_lock *); |
NeilBrown | 24e3666 | 2006-10-02 02:17:45 -0700 | [diff] [blame] | 39 | extern int lockd_up(int proto); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | extern void lockd_down(void); |
| 41 | |
Marc Eshel | 9a8db97 | 2007-07-17 04:04:35 -0700 | [diff] [blame] | 42 | unsigned long get_nfs_grace_period(void); |
| 43 | |
| 44 | #ifdef CONFIG_NFSD_V4 |
| 45 | unsigned long get_nfs4_grace_period(void); |
| 46 | #else |
| 47 | static inline unsigned long get_nfs4_grace_period(void) {return 0;} |
| 48 | #endif |
| 49 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | #endif /* LINUX_LOCKD_BIND_H */ |