X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmgs%2Fmgs_llog.c;h=4c649112e97f0849d872c0868d55a2ccdcde9cd5;hp=a8bb398ca19efe805e12af7138f986869fd2e33b;hb=3227436e11b4bc77ffd261e8f13adf905fae2353;hpb=37eeb0ffd0325c5a3c426d6ab0e72ef6da84db99 diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c index a8bb398..4c64911 100644 --- a/lustre/mgs/mgs_llog.c +++ b/lustre/mgs/mgs_llog.c @@ -1125,6 +1125,8 @@ static int mgs_steal_llog_handler(struct llog_handle *llh, if (!strncmp(marker->cm_comment,"add osc",7) && (marker->cm_flags & CM_START)){ got_an_osc_or_mdc = 1; + strncpy(tmti->mti_svname, marker->cm_tgtname, + sizeof(tmti->mti_svname)); rc = record_start_log(obd, &mdt_llh, mti->mti_svname); rc = record_marker(obd, mdt_llh, fsdb, CM_START, mti->mti_svname,"add osc(copied)"); @@ -1202,12 +1204,21 @@ static int mgs_steal_llog_handler(struct llog_handle *llh, } if (lcfg->lcfg_command == LCFG_LOV_ADD_OBD) { + int index; char mdt_index[9]; char *logname, *lovname; - name_create_mdt_and_lov(&logname, &lovname, fsdb, mti->mti_stripe_index); + name_create_mdt_and_lov(&logname, &lovname, fsdb, + mti->mti_stripe_index); sprintf(mdt_index, "-MDT%04x", mti->mti_stripe_index); + if (sscanf(lustre_cfg_buf(lcfg, 2), "%d", &index) != 1) { + name_destroy(&logname); + name_destroy(&lovname); + RETURN(-EINVAL); + } + + tmti->mti_stripe_index = index; mgs_write_log_osc_to_lov(obd, fsdb, tmti, logname, mdt_index, lovname, LUSTRE_SP_MDT, 0);