-static void fsoptions_to_mdt_flags(struct mdt_device *m, char *options)
-{
- char *p = options;
-
- m->mdt_opts.mo_mds_capa = 1;
- m->mdt_opts.mo_oss_capa = 1;
-#ifdef CONFIG_FS_POSIX_ACL
- /* ACLs should be enabled by default (b=13829) */
- m->mdt_opts.mo_acl = 1;
- LCONSOLE_INFO("Enabling ACL\n");
-#else
- m->mdt_opts.mo_acl = 0;
- LCONSOLE_INFO("Disabling ACL\n");
-#endif
-
- if (!options)
- return;
-
- while (*options) {
- int len;
-
- while (*p && *p != ',')
- p++;
-
- len = p - options;
- if ((len == sizeof("user_xattr") - 1) &&
- (memcmp(options, "user_xattr", len) == 0)) {
- m->mdt_opts.mo_user_xattr = 1;
- LCONSOLE_INFO("Enabling user_xattr\n");
- } else if ((len == sizeof("nouser_xattr") - 1) &&
- (memcmp(options, "nouser_xattr", len) == 0)) {
- m->mdt_opts.mo_user_xattr = 0;
- LCONSOLE_INFO("Disabling user_xattr\n");
- } else if ((len == sizeof("noacl") - 1) &&
- (memcmp(options, "noacl", len) == 0)) {
- m->mdt_opts.mo_acl = 0;
- LCONSOLE_INFO("Disabling ACL\n");
- }
-
- if (!*p)
- break;
-
- options = ++p;
- }
-}
-