* GPL HEADER END
*/
/*
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2012, Intel Corporation.
* Use is subject to license terms.
*
* Author: Johann Lombardi <johann@whamcloud.com>
}
static int set_quota_index_version(const struct lu_env *env,
- struct dt_object *dt)
+ struct dt_object *dt,
+ dt_obj_version_t version)
{
struct osd_device *osd = osd_obj2dev(osd_dt_obj(dt));
struct thandle *th;
GOTO(out, rc);
th->th_sync = 1;
- dt_version_set(env, dt, 1, th);
+ dt_version_set(env, dt, version, th);
out:
dt_trans_stop(env, &osd->od_dt_dev, th);
RETURN(rc);
PFID(lu_object_fid(&dt->do_lu)), rc);
}
- /* bump index version to 1, so the migration will be skipped
- * next time. */
+ /* bump index version to 1 (or 2 if migration happened), so the
+ * migration will be skipped next time. */
if (rc == 0) {
- rc = set_quota_index_version(env , dt);
+ rc = set_quota_index_version(env , dt, converted ? 2 : 1);
if (rc)
CERROR("%s: Failed to set quota index("DFID") "
"version, rc:%d\n", osd->od_svname,