diff options
| -rw-r--r-- | fs/nfsd/nfsctl.c | 21 | ||||
| -rw-r--r-- | include/linux/nfsd/export.h | 3 |
2 files changed, 23 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 0415680d3f58..e7051ac4dc73 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
| @@ -31,6 +31,7 @@ enum { | |||
| 31 | NFSD_Getfd, | 31 | NFSD_Getfd, |
| 32 | NFSD_Getfs, | 32 | NFSD_Getfs, |
| 33 | NFSD_List, | 33 | NFSD_List, |
| 34 | NFSD_Export_features, | ||
| 34 | NFSD_Fh, | 35 | NFSD_Fh, |
| 35 | NFSD_FO_UnlockIP, | 36 | NFSD_FO_UnlockIP, |
| 36 | NFSD_FO_UnlockFS, | 37 | NFSD_FO_UnlockFS, |
| @@ -149,6 +150,24 @@ static const struct file_operations exports_operations = { | |||
| 149 | .owner = THIS_MODULE, | 150 | .owner = THIS_MODULE, |
| 150 | }; | 151 | }; |
| 151 | 152 | ||
| 153 | static int export_features_show(struct seq_file *m, void *v) | ||
| 154 | { | ||
| 155 | seq_printf(m, "0x%x 0x%x\n", NFSEXP_ALLFLAGS, NFSEXP_SECINFO_FLAGS); | ||
| 156 | return 0; | ||
| 157 | } | ||
| 158 | |||
| 159 | static int export_features_open(struct inode *inode, struct file *file) | ||
| 160 | { | ||
| 161 | return single_open(file, export_features_show, NULL); | ||
| 162 | } | ||
| 163 | |||
| 164 | static struct file_operations export_features_operations = { | ||
| 165 | .open = export_features_open, | ||
| 166 | .read = seq_read, | ||
| 167 | .llseek = seq_lseek, | ||
| 168 | .release = single_release, | ||
| 169 | }; | ||
| 170 | |||
| 152 | extern int nfsd_pool_stats_open(struct inode *inode, struct file *file); | 171 | extern int nfsd_pool_stats_open(struct inode *inode, struct file *file); |
| 153 | extern int nfsd_pool_stats_release(struct inode *inode, struct file *file); | 172 | extern int nfsd_pool_stats_release(struct inode *inode, struct file *file); |
| 154 | 173 | ||
| @@ -1306,6 +1325,8 @@ static int nfsd_fill_super(struct super_block * sb, void * data, int silent) | |||
| 1306 | [NFSD_Getfd] = {".getfd", &transaction_ops, S_IWUSR|S_IRUSR}, | 1325 | [NFSD_Getfd] = {".getfd", &transaction_ops, S_IWUSR|S_IRUSR}, |
| 1307 | [NFSD_Getfs] = {".getfs", &transaction_ops, S_IWUSR|S_IRUSR}, | 1326 | [NFSD_Getfs] = {".getfs", &transaction_ops, S_IWUSR|S_IRUSR}, |
| 1308 | [NFSD_List] = {"exports", &exports_operations, S_IRUGO}, | 1327 | [NFSD_List] = {"exports", &exports_operations, S_IRUGO}, |
| 1328 | [NFSD_Export_features] = {"export_features", | ||
| 1329 | &export_features_operations, S_IRUGO}, | ||
| 1309 | [NFSD_FO_UnlockIP] = {"unlock_ip", | 1330 | [NFSD_FO_UnlockIP] = {"unlock_ip", |
| 1310 | &transaction_ops, S_IWUSR|S_IRUSR}, | 1331 | &transaction_ops, S_IWUSR|S_IRUSR}, |
| 1311 | [NFSD_FO_UnlockFS] = {"unlock_filesystem", | 1332 | [NFSD_FO_UnlockFS] = {"unlock_filesystem", |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index ef3d416fcf67..4f1df1d7312c 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
| @@ -39,7 +39,8 @@ | |||
| 39 | #define NFSEXP_FSID 0x2000 | 39 | #define NFSEXP_FSID 0x2000 |
| 40 | #define NFSEXP_CROSSMOUNT 0x4000 | 40 | #define NFSEXP_CROSSMOUNT 0x4000 |
| 41 | #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ | 41 | #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ |
| 42 | #define NFSEXP_ALLFLAGS 0xFE3F | 42 | /* All flags that we claim to support. (Note we don't support NOACL.) */ |
| 43 | #define NFSEXP_ALLFLAGS 0x7E3F | ||
| 43 | 44 | ||
| 44 | /* The flags that may vary depending on security flavor: */ | 45 | /* The flags that may vary depending on security flavor: */ |
| 45 | #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \ | 46 | #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \ |
