return next;
}
-static int cmm_device_config(struct lu_device *d, struct lustre_cfg *cfg)
+static int cmm_process_config(struct lu_device *d, struct lustre_cfg *cfg)
{
struct cmm_device *m = lu2cmm_dev(d);
+ struct lu_device *next = md2lu_dev(m->cmm_child);
int err;
switch(cfg->lcfg_command) {
- case LCFG_CMM_ADD_MDC:
+ case LCFG_ADD_MDC:
err = cmm_add_mdc(m, cfg);
break;
default:
- err = -EOPNOTSUPP;
+ err = next->ld_ops->ldo_process_config(next, cfg);
}
out:
RETURN(err);
.ldo_object_init = cmm_object_init,
.ldo_object_free = cmm_object_free,
.ldo_object_release = cmm_object_release,
- .ldo_object_print = cmm_object_print
+ .ldo_object_print = cmm_object_print,
+
+ .ldo_process_config = cmm_process_config
};
struct lu_device *cmm_device_alloc(struct lu_device_type *t,
.ldto_device_free = cmm_device_free,
.ldto_device_init = cmm_device_init,
- .ldto_device_fini = cmm_device_fini,
- .ldto_device_config = cmm_device_config
+ .ldto_device_fini = cmm_device_fini
};
static struct lu_device_type cmm_device_type = {
LCFG_LOG_START = 0x00ce011,
LCFG_LOG_END = 0x00ce012,
LCFG_LOV_ADD_INA = 0x00ce013,
- LCFG_LMV_ADD_MDC = 0x00cf014,
- LCFG_LMV_DEL_MDC = 0x00cf015,
- LCFG_CMM_ADD_MDC = 0x00cf016,
- LCFG_CMM_DEL_MDC = 0x00cf017,
+ LCFG_ADD_MDC = 0x00cf014,
+ LCFG_DEL_MDC = 0x00cf015,
};
struct lustre_cfg_bufs {
char *lmv_name, char *mdt_uuid,
char *index, char *gen)
{
- return record_base(obd,llh,lmv_name,0,LCFG_LMV_ADD_MDC,
+ return record_base(obd,llh,lmv_name,0,LCFG_ADD_MDC,
mdt_uuid,index,gen,0);
}
char *cmm_name, char *mdt_uuid,
char *index, char *gen)
{
- return record_base(obd,llh,cmm_name,0,LCFG_CMM_ADD_MDC,
+ return record_base(obd,llh,cmm_name,0,LCFG_ADD_MDC,
mdt_uuid,index,gen,0);
}
RETURN(rc);
}
- if (lcfg->lcfg_command == LCFG_LMV_ADD_MDC) {
+ if (lcfg->lcfg_command == LCFG_ADD_MDC) {
char *name;
char *uuid;
char *index;
rc = record_setup(obd, llh, mdcname, mti->mti_uuid, nodeuuid, 0, 0);
rc = mgs_write_log_failnids(obd, mti, llh, mdcname);
snprintf(index, sizeof(index), "%d", mti->mti_stripe_index);
- rc = record_base(obd, llh, tgtname, 0, LCFG_CMM_ADD_MDC, mdcuuid,
+ rc = record_base(obd, llh, tgtname, 0, LCFG_ADD_MDC, mdcuuid,
index, "1", 0);
rc = record_marker(obd, llh, fsdb, CM_END, tgtname, "add mdc to cmm");
rc = record_end_log(obd, &llh);
struct mgs_target_info *mti)
{
struct llog_handle *llh = NULL;
- char *cliname, *osdname, *lovname, *mddname;
- char *mdtname, *cmmname;// *lmvname;
+ char *cliname, *lovname, *mdtname;// *lmvname;
char *mdcname, *nodeuuid, *mdcuuid;
int rc, i = 0;//, first_log = 0;
char mdt_index[9];
/* add mdt */
rc = mgs_write_log_mdt0(obd, fsdb, mti->mti_svname, mti->mti_svname, NULL);
name_destroy(lovname);
- name_destroy(osdname);
- name_destroy(mddname);
name_destroy(mdtname);
/* copy client info about lov/lmv */