Whamcloud - gitweb
Revert "LU-5261 osc: use wait_for_completion_killable() instead"
[fs/lustre-release.git] / lustre / osd-zfs / osd_handler.c
index 66efdc9..a966487 100644 (file)
@@ -336,19 +336,23 @@ static void osd_conf_get(const struct lu_env *env,
                         const struct dt_device *dev,
                         struct dt_device_param *param)
 {
+       struct osd_device *osd = osd_dt_dev(dev);
+
        /*
         * XXX should be taken from not-yet-existing fs abstraction layer.
         */
-       param->ddp_max_name_len  = MAXNAMELEN;
-       param->ddp_max_nlink     = 1 << 31; /* it's 8byte on a disk */
-       param->ddp_block_shift   = 12; /* XXX */
-       param->ddp_mount_type    = LDD_MT_ZFS;
+       param->ddp_max_name_len = MAXNAMELEN;
+       param->ddp_max_nlink    = 1 << 31; /* it's 8byte on a disk */
+       param->ddp_block_shift  = 12; /* XXX */
+       param->ddp_mount_type   = LDD_MT_ZFS;
 
-       param->ddp_mntopts        = MNTOPT_USERXATTR | MNTOPT_ACL;
-       param->ddp_max_ea_size    = DXATTR_MAX_ENTRY_SIZE;
+       param->ddp_mntopts      = MNTOPT_USERXATTR;
+       if (osd->od_posix_acl)
+               param->ddp_mntopts |= MNTOPT_ACL;
+       param->ddp_max_ea_size  = DXATTR_MAX_ENTRY_SIZE;
 
        /* for maxbytes, report same value as ZPL */
-       param->ddp_maxbytes      = MAX_LFS_FILESIZE;
+       param->ddp_maxbytes     = MAX_LFS_FILESIZE;
 
        /* Default reserved fraction of the available space that should be kept
         * for error margin. Unfortunately, there are many factors that can
@@ -520,6 +524,7 @@ static int osd_mount(const struct lu_env *env,
        char                    *svname = lustre_cfg_string(cfg, 4);
        dmu_buf_t               *rootdb;
        dsl_pool_t              *dp;
+       const char              *opts;
        int                      rc;
        ENTRY;
 
@@ -604,6 +609,12 @@ static int osd_mount(const struct lu_env *env,
                o->od_quota_slave = NULL;
                GOTO(err, rc);
        }
+
+       /* parse mount option "noacl", and enable ACL by default */
+       opts = lustre_cfg_string(cfg, 3);
+       if (opts == NULL || strstr(opts, "noacl") == NULL)
+               o->od_posix_acl = 1;
+
 err:
        RETURN(rc);
 }
@@ -768,13 +779,12 @@ static int osd_process_config(const struct lu_env *env,
                break;
        case LCFG_PARAM: {
                LASSERT(&o->od_dt_dev);
-               rc = class_process_proc_seq_param(PARAM_OSD,
-                                                 lprocfs_osd_obd_vars, cfg,
-                                                 &o->od_dt_dev);
+               rc = class_process_proc_param(PARAM_OSD, lprocfs_osd_obd_vars,
+                                             cfg, &o->od_dt_dev);
                if (rc > 0 || rc == -ENOSYS)
-                       rc = class_process_proc_seq_param(PARAM_OST,
-                                                         lprocfs_osd_obd_vars,
-                                                         cfg, &o->od_dt_dev);
+                       rc = class_process_proc_param(PARAM_OST,
+                                                     lprocfs_osd_obd_vars,
+                                                     cfg, &o->od_dt_dev);
                break;
        }
        default:
@@ -930,9 +940,6 @@ int __init osd_init(void)
                return rc;
 
        rc = class_register_type(&osd_obd_device_ops, NULL, true, NULL,
-#ifndef HAVE_ONLY_PROCFS_SEQ
-                                NULL,
-#endif
                                 LUSTRE_OSD_ZFS_NAME, &osd_device_type);
        if (rc)
                lu_kmem_fini(osd_caches);