mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] knfsd: Allow run-time selection of NFS versions to export
Provide a file in the NFSD filesystem that allows setting and querying of which version of NFS are being exported. Changes are only allowed while no server is running. Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
7390022d69
commit
70c3b76c28
4 changed files with 151 additions and 29 deletions
|
@ -39,6 +39,21 @@
|
|||
#define NFSCTL_GETFD 7 /* get an fh by path (used by mountd) */
|
||||
#define NFSCTL_GETFS 8 /* get an fh by path with max FH len */
|
||||
|
||||
/*
|
||||
* Macros used to set version
|
||||
*/
|
||||
#define NFSCTL_VERSET(_cltbits, _v) ((_cltbits) |= (1 << (_v)))
|
||||
#define NFSCTL_VERUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << (_v)))
|
||||
#define NFSCTL_VERISSET(_cltbits, _v) ((_cltbits) & (1 << (_v)))
|
||||
|
||||
#if defined(CONFIG_NFSD_V4)
|
||||
#define NFSCTL_VERALL (0x1c /* 0b011100 */)
|
||||
#elif defined(CONFIG_NFSD_V3)
|
||||
#define NFSCTL_VERALL (0x0c /* 0b001100 */)
|
||||
#else
|
||||
#define NFSCTL_VERALL (0x04 /* 0b000100 */)
|
||||
#endif
|
||||
|
||||
/* SVC */
|
||||
struct nfsctl_svc {
|
||||
unsigned short svc_port;
|
||||
|
@ -120,6 +135,8 @@ extern int exp_delclient(struct nfsctl_client *ncp);
|
|||
extern int exp_export(struct nfsctl_export *nxp);
|
||||
extern int exp_unexport(struct nfsctl_export *nxp);
|
||||
|
||||
extern unsigned int nfsd_versbits;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* NFSD_SYSCALL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue