diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-04-27 03:33:28 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-06-25 04:49:28 -0400 |
commit | 10183a69551f76702ac68bc74a437b25419c6de0 (patch) | |
tree | 06e48d196c31f31eef6f039bce518ff3973b2760 /fs/ceph/super.c | |
parent | 144cba1493fdd6e3e1980e439a31df877831ebcd (diff) |
ceph: check OSD caps before read/write
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r-- | fs/ceph/super.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 4e9905374078..9a5350030af8 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c | |||
@@ -134,10 +134,12 @@ enum { | |||
134 | Opt_noino32, | 134 | Opt_noino32, |
135 | Opt_fscache, | 135 | Opt_fscache, |
136 | Opt_nofscache, | 136 | Opt_nofscache, |
137 | Opt_poolperm, | ||
138 | Opt_nopoolperm, | ||
137 | #ifdef CONFIG_CEPH_FS_POSIX_ACL | 139 | #ifdef CONFIG_CEPH_FS_POSIX_ACL |
138 | Opt_acl, | 140 | Opt_acl, |
139 | #endif | 141 | #endif |
140 | Opt_noacl | 142 | Opt_noacl, |
141 | }; | 143 | }; |
142 | 144 | ||
143 | static match_table_t fsopt_tokens = { | 145 | static match_table_t fsopt_tokens = { |
@@ -165,6 +167,8 @@ static match_table_t fsopt_tokens = { | |||
165 | {Opt_noino32, "noino32"}, | 167 | {Opt_noino32, "noino32"}, |
166 | {Opt_fscache, "fsc"}, | 168 | {Opt_fscache, "fsc"}, |
167 | {Opt_nofscache, "nofsc"}, | 169 | {Opt_nofscache, "nofsc"}, |
170 | {Opt_poolperm, "poolperm"}, | ||
171 | {Opt_nopoolperm, "nopoolperm"}, | ||
168 | #ifdef CONFIG_CEPH_FS_POSIX_ACL | 172 | #ifdef CONFIG_CEPH_FS_POSIX_ACL |
169 | {Opt_acl, "acl"}, | 173 | {Opt_acl, "acl"}, |
170 | #endif | 174 | #endif |
@@ -268,6 +272,13 @@ static int parse_fsopt_token(char *c, void *private) | |||
268 | case Opt_nofscache: | 272 | case Opt_nofscache: |
269 | fsopt->flags &= ~CEPH_MOUNT_OPT_FSCACHE; | 273 | fsopt->flags &= ~CEPH_MOUNT_OPT_FSCACHE; |
270 | break; | 274 | break; |
275 | case Opt_poolperm: | ||
276 | fsopt->flags &= ~CEPH_MOUNT_OPT_NOPOOLPERM; | ||
277 | printk ("pool perm"); | ||
278 | break; | ||
279 | case Opt_nopoolperm: | ||
280 | fsopt->flags |= CEPH_MOUNT_OPT_NOPOOLPERM; | ||
281 | break; | ||
271 | #ifdef CONFIG_CEPH_FS_POSIX_ACL | 282 | #ifdef CONFIG_CEPH_FS_POSIX_ACL |
272 | case Opt_acl: | 283 | case Opt_acl: |
273 | fsopt->sb_flags |= MS_POSIXACL; | 284 | fsopt->sb_flags |= MS_POSIXACL; |
@@ -436,6 +447,8 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) | |||
436 | seq_puts(m, ",nodcache"); | 447 | seq_puts(m, ",nodcache"); |
437 | if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) | 448 | if (fsopt->flags & CEPH_MOUNT_OPT_FSCACHE) |
438 | seq_puts(m, ",fsc"); | 449 | seq_puts(m, ",fsc"); |
450 | if (fsopt->flags & CEPH_MOUNT_OPT_NOPOOLPERM) | ||
451 | seq_puts(m, ",nopoolperm"); | ||
439 | 452 | ||
440 | #ifdef CONFIG_CEPH_FS_POSIX_ACL | 453 | #ifdef CONFIG_CEPH_FS_POSIX_ACL |
441 | if (fsopt->sb_flags & MS_POSIXACL) | 454 | if (fsopt->sb_flags & MS_POSIXACL) |