Whamcloud - gitweb
LU-15283 quota: deadlock between reint & lquota_wb
[fs/lustre-release.git] / lustre / osd-zfs / osd_handler.c
index 92146d6..f4f3ea8 100644 (file)
@@ -1094,6 +1094,7 @@ static int osd_mount(const struct lu_env *env,
        char *mntdev = lustre_cfg_string(cfg, 1);
        char *str = lustre_cfg_string(cfg, 2);
        char *svname = lustre_cfg_string(cfg, 4);
+       time64_t interval = AS_DEFAULT;
        dnode_t *rootdn;
        const char *opts;
        bool resetoi = false;
@@ -1135,7 +1136,7 @@ static int osd_mount(const struct lu_env *env,
                }
 
                if (flags & LMD_FLG_NOSCRUB)
-                       o->od_auto_scrub_interval = AS_NEVER;
+                       interval = AS_NEVER;
        }
 
        if (server_name_is_ost(o->od_svname))
@@ -1190,8 +1191,12 @@ static int osd_mount(const struct lu_env *env,
        if (opts && strstr(opts, "resetoi"))
                resetoi = true;
 
+       rc = lprocfs_init_brw_stats(&o->od_brw_stats);
+       if (rc)
+               GOTO(err, rc);
+
        o->od_in_init = 1;
-       rc = osd_scrub_setup(env, o, resetoi);
+       rc = osd_scrub_setup(env, o, interval, resetoi);
        o->od_in_init = 0;
        if (rc)
                GOTO(err, rc);
@@ -1203,8 +1208,8 @@ static int osd_mount(const struct lu_env *env,
        /* currently it's no need to prepare qsd_instance_md for OST */
        if (!o->od_is_ost) {
                o->od_quota_slave_md = qsd_init(env, o->od_svname,
-                                               &o->od_dt_dev,
-                                               o->od_proc_entry, true);
+                                               &o->od_dt_dev, o->od_proc_entry,
+                                               true, false);
                if (IS_ERR(o->od_quota_slave_md)) {
                        rc = PTR_ERR(o->od_quota_slave_md);
                        o->od_quota_slave_md = NULL;
@@ -1213,7 +1218,7 @@ static int osd_mount(const struct lu_env *env,
        }
 
        o->od_quota_slave_dt = qsd_init(env, o->od_svname, &o->od_dt_dev,
-                                    o->od_proc_entry, false);
+                                       o->od_proc_entry, false, false);
 
        if (IS_ERR(o->od_quota_slave_dt)) {
                if (o->od_quota_slave_md != NULL) {
@@ -1310,7 +1315,6 @@ static int osd_device_init0(const struct lu_env *env,
        o->od_dt_dev.dd_ops = &osd_dt_ops;
        sema_init(&o->od_otable_sem, 1);
        INIT_LIST_HEAD(&o->od_ios_list);
-       o->od_auto_scrub_interval = AS_DEFAULT;
        o->od_sync_on_lseek = B_TRUE;
 
        /* ZFS does not support reporting nonrotional status yet, so this flag