RETURN(0);
}
-static struct dt_device_operations osd_dt_ops = {
+static const struct dt_device_operations osd_dt_ops = {
.dt_root_get = osd_root_get,
.dt_statfs = osd_statfs,
.dt_trans_create = osd_trans_create,
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)
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);
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);
#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;
return seq_client_alloc_fid(env, osd->od_cl_seq, fid);
}
-struct lu_device_operations osd_lu_ops = {
+const struct lu_device_operations osd_lu_ops = {
.ldo_object_alloc = osd_object_alloc,
.ldo_process_config = osd_process_config,
.ldo_recovery_complete = osd_recovery_complete,
{
}
-static struct lu_device_type_operations osd_device_type_ops = {
+static const struct lu_device_type_operations osd_device_type_ops = {
.ldto_init = osd_type_init,
.ldto_fini = osd_type_fini,