X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fosd-zfs%2Fosd_handler.c;h=cde52fff5f38744b7129fdec9f910defc876b981;hp=30ec13e44784c051d39186780c6e8dc55555bad5;hb=f37bce8a573dfc5aac1b9f51f4d5c8314ba05d30;hpb=99d00b97ef5f209a002f250e7772055ff1a6d6d6 diff --git a/lustre/osd-zfs/osd_handler.c b/lustre/osd-zfs/osd_handler.c index 30ec13e..cde52ff 100644 --- a/lustre/osd-zfs/osd_handler.c +++ b/lustre/osd-zfs/osd_handler.c @@ -1070,12 +1070,14 @@ osd_unlinked_drain(const struct lu_env *env, struct osd_device *osd) static int osd_mount(const struct lu_env *env, struct osd_device *o, struct lustre_cfg *cfg) { - char *mntdev = lustre_cfg_string(cfg, 1); - char *str = lustre_cfg_string(cfg, 2); - char *svname = lustre_cfg_string(cfg, 4); + char *mntdev = lustre_cfg_string(cfg, 1); + char *str = lustre_cfg_string(cfg, 2); + char *svname = lustre_cfg_string(cfg, 4); dnode_t *rootdn; - const char *opts; - int rc; + const char *opts; + bool resetoi = false; + int rc; + ENTRY; if (o->od_os != NULL) @@ -1092,6 +1094,8 @@ static int osd_mount(const struct lu_env *env, if (rc >= sizeof(o->od_svname)) RETURN(-E2BIG); + opts = lustre_cfg_string(cfg, 3); + o->od_index_backup_stop = 0; o->od_index = -1; /* -1 means index is invalid */ rc = server_name2index(o->od_svname, &o->od_index, NULL); @@ -1162,8 +1166,11 @@ static int osd_mount(const struct lu_env *env, if (rc) GOTO(err, rc); + if (opts && strstr(opts, "resetoi")) + resetoi = true; + o->od_in_init = 1; - rc = osd_scrub_setup(env, o); + rc = osd_scrub_setup(env, o, resetoi); o->od_in_init = 0; if (rc) GOTO(err, rc); @@ -1206,7 +1213,6 @@ static int osd_mount(const struct lu_env *env, #endif /* 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;