- spin_lock(&mds->mds_lov_lock);
- for (i = 0; i < mds->mds_lov_desc.ld_tgt_count; i++)
- if (ids[i] > (mds->mds_lov_objids)[i])
- (mds->mds_lov_objids)[i] = ids[i];
- spin_unlock(&mds->mds_lov_lock);
+ spin_lock(&mds->mds_dt_lock);
+ for (i = 0; i < mds->mds_dt_desc.ld_tgt_count; i++)
+ if (ids[i] > (mds->mds_dt_objids)[i])
+ (mds->mds_dt_objids)[i] = ids[i];
+ spin_unlock(&mds->mds_dt_lock);
- rc = fsfilt_read_record(obd, mds->mds_lov_objid_filp, ids, size, &off);
+ rc = fsfilt_read_record(obd, mds->mds_dt_objid_filp, ids, size, &off);
- rc = fsfilt_write_record(obd, mds->mds_lov_objid_filp,
- mds->mds_lov_objids, size, &off, 0);
+ rc = fsfilt_write_record(obd, mds->mds_dt_objid_filp,
+ mds->mds_dt_objids, size, &off, 0);
memcpy(&oa->o_inline, ost_uuid, sizeof(*ost_uuid));
oa->o_valid |= OBD_MD_FLINLINE;
}
memcpy(&oa->o_inline, ost_uuid, sizeof(*ost_uuid));
oa->o_valid |= OBD_MD_FLINLINE;
}
- rc = obd_create(mds->mds_lov_exp, oa, &empty_ea, &oti);
+ rc = obd_create(mds->mds_dt_exp, oa, &empty_ea, &oti);
- rc = obd_set_info(mds->mds_lov_exp, strlen("next_id"), "next_id",
- mds->mds_lov_desc.ld_tgt_count, mds->mds_lov_objids);
+ rc = obd_set_info(mds->mds_dt_exp, strlen("next_id"), "next_id",
+ mds->mds_dt_desc.ld_tgt_count, mds->mds_dt_objids);
- int valsize = sizeof(mds->mds_lov_desc), rc, i;
- int old_count = mds->mds_lov_desc.ld_tgt_count;
+ int valsize = sizeof(mds->mds_dt_desc), rc, i;
+ int old_count = mds->mds_dt_desc.ld_tgt_count;
ENTRY;
rc = obd_get_info(lov, strlen("lovdesc") + 1, "lovdesc", &valsize,
ENTRY;
rc = obd_get_info(lov, strlen("lovdesc") + 1, "lovdesc", &valsize,
- memcpy(ids, mds->mds_lov_objids, oldsize);
- OBD_FREE(mds->mds_lov_objids, oldsize);
+ memcpy(ids, mds->mds_dt_objids, oldsize);
+ OBD_FREE(mds->mds_dt_objids, oldsize);
{
struct mds_obd *mds = &obd->u.mds;
struct lustre_handle conn = {0,};
int rc, i;
ENTRY;
{
struct mds_obd *mds = &obd->u.mds;
struct lustre_handle conn = {0,};
int rc, i;
ENTRY;
- spin_lock_init(&mds->mds_lov_lock);
- mds->mds_lov_obd = class_name2obd(lov_name);
- if (!mds->mds_lov_obd) {
+ spin_lock_init(&mds->mds_dt_lock);
+ mds->mds_dt_obd = class_name2obd(lov_name);
+ if (!mds->mds_dt_obd) {
- rc = obd_connect(&conn, mds->mds_lov_obd, &obd->obd_uuid,
+ rc = obd_connect(&conn, mds->mds_dt_obd, &obd->obd_uuid,
mds->mds_num + FILTER_GROUP_FIRST_MDS);
if (rc) {
CERROR("MDS cannot connect to LOV %s (%d)\n", lov_name, rc);
mds->mds_num + FILTER_GROUP_FIRST_MDS);
if (rc) {
CERROR("MDS cannot connect to LOV %s (%d)\n", lov_name, rc);
if (rc) {
CERROR("cannot read %s: rc = %d\n", "lov_objids", rc);
GOTO(err_reg, rc);
}
rc = obd_llog_cat_initialize(obd, &obd->obd_llogs,
if (rc) {
CERROR("cannot read %s: rc = %d\n", "lov_objids", rc);
GOTO(err_reg, rc);
}
rc = obd_llog_cat_initialize(obd, &obd->obd_llogs,
/* If we're mounting this code for the first time on an existing FS,
* we need to populate the objids array from the real OST values */
/* If we're mounting this code for the first time on an existing FS,
* we need to populate the objids array from the real OST values */
- if (!mds->mds_lov_objids_valid) {
- int size = sizeof(obd_id) * mds->mds_lov_desc.ld_tgt_count;
- rc = obd_get_info(mds->mds_lov_exp, strlen("last_id"),
- "last_id", &size, mds->mds_lov_objids);
+ if (!mds->mds_dt_objids_valid) {
+ int size = sizeof(obd_id) * mds->mds_dt_desc.ld_tgt_count;
+ rc = obd_get_info(mds->mds_dt_exp, strlen("last_id"),
+ "last_id", &size, mds->mds_dt_objids);
- mds->mds_lov_objids[i], i);
- mds->mds_lov_objids_valid = 1;
- rc = mds_lov_write_objids(obd);
+ mds->mds_dt_objids[i], i);
+ mds->mds_dt_objids_valid = 1;
+ rc = mds_dt_write_objids(obd);
if (rc)
CERROR("got last objids from OSTs, but error "
"writing objids file: %d\n", rc);
if (rc)
CERROR("got last objids from OSTs, but error "
"writing objids file: %d\n", rc);
- obd_disconnect(mds->mds_lov_exp, 0);
- mds->mds_lov_exp = NULL;
- mds->mds_lov_obd = ERR_PTR(rc);
+ obd_disconnect(mds->mds_dt_exp, 0);
+ mds->mds_dt_exp = NULL;
+ mds->mds_dt_obd = ERR_PTR(rc);
/* cleanup all llogging subsystems */
rc = obd_llog_finish(obd, &obd->obd_llogs,
/* cleanup all llogging subsystems */
rc = obd_llog_finish(obd, &obd->obd_llogs,
/* if obd_disconnect fails (probably because the
* export was disconnected by class_disconnect_exports)
* then we just need to drop our ref. */
if (rc != 0)
/* if obd_disconnect fails (probably because the
* export was disconnected by class_disconnect_exports)
* then we just need to drop our ref. */
if (rc != 0)
- class_export_put(mds->mds_lov_exp);
- mds->mds_lov_exp = NULL;
- mds->mds_lov_obd = NULL;
+ class_export_put(mds->mds_dt_exp);
+ mds->mds_dt_exp = NULL;
+ mds->mds_dt_obd = NULL;
push_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL);
rc = llog_ioctl(ctxt, cmd, data);
pop_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL);
obd_llog_cat_initialize(obd, &obd->obd_llogs,
push_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL);
rc = llog_ioctl(ctxt, cmd, data);
pop_ctxt(&saved, ctxt->loc_lvfs_ctxt, NULL);
obd_llog_cat_initialize(obd, &obd->obd_llogs,
struct obd_device *mlsi_obd; /* the mds to sync */
struct obd_device *mlsi_watched; /* new lov target */
struct obd_device *mlsi_obd; /* the mds to sync */
struct obd_device *mlsi_watched; /* new lov target */
CWARN("MDS %s: %s now active, resetting orphans\n",
obd->obd_name, uuid->uuid);
CWARN("MDS %s: %s now active, resetting orphans\n",
obd->obd_name, uuid->uuid);
-int mds_lov_start_synchronize(struct obd_device *obd,
- struct obd_device *watched, void *data)
+int mds_dt_start_synchronize(struct obd_device *obd,
+ struct obd_device *watched,
+ void *data)
CWARN("MDS %s: in recovery, not resetting orphans on %s\n",
obd->obd_name, uuid->uuid);
} else {
CWARN("MDS %s: in recovery, not resetting orphans on %s\n",
obd->obd_name, uuid->uuid);
} else {
-int mds_lov_set_info(struct obd_export *exp, obd_count keylen,
- void *key, obd_count vallen, void *val)
+int mds_dt_set_info(struct obd_export *exp, obd_count keylen,
+ void *key, obd_count vallen, void *val)
RETURN(-EINVAL);
CDEBUG(D_CONFIG, "idx: %d id: %llu\n", idx, *(id + 1));
RETURN(-EINVAL);
CDEBUG(D_CONFIG, "idx: %d id: %llu\n", idx, *(id + 1));
CDEBUG(D_CONFIG, "objid: %d: %lld\n", idx, *id);
/* XXX - should we be writing this out here ? */
CDEBUG(D_CONFIG, "objid: %d: %lld\n", idx, *id);
/* XXX - should we be writing this out here ? */
namelen = strlen(profile) + 20; /* -clean-######### */
OBD_ALLOC(name, namelen);
namelen = strlen(profile) + 20; /* -clean-######### */
OBD_ALLOC(name, namelen);
CDEBUG(D_INODE, "converting LOV EA on %lu/%u from V0 to V1\n",
inode->i_ino, inode->i_generation);
CDEBUG(D_INODE, "converting LOV EA on %lu/%u from V0 to V1\n",
inode->i_ino, inode->i_generation);
- rc = obd_unpackmd(obd->u.mds.mds_lov_exp, &lsm, lmm, lmm_size);
+ rc = obd_unpackmd(obd->u.mds.mds_dt_exp, &lsm, lmm, lmm_size);
struct lustre_msg *msg, int offset)
{
struct mds_obd *mds = &obd->u.mds;
struct lustre_msg *msg, int offset)
{
struct mds_obd *mds = &obd->u.mds;
- rc = obd_unpackmd(lov_exp, &lsm, lmm, lmm_size);
+ rc = obd_unpackmd(dt_exp, &lsm, lmm, lmm_size);
- rc = obd_revalidate_md(lov_exp, oa, lsm, &oti);
+ rc = obd_revalidate_md(dt_exp, oa, lsm, &oti);