From: tappro Date: Mon, 25 Sep 2006 22:18:53 +0000 (+0000) Subject: - fix osc nameing. Now it consists of corresponding lov name and suffix -oscXXXX X-Git-Tag: v1_8_0_110~486^2~832 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=965f07aad13a8e45dedb06f680a4fd3d60ccdb33;p=fs%2Flustre-release.git - fix osc nameing. Now it consists of corresponding lov name and suffix -oscXXXX with OST index. - fix functions for test27 based on osc names --- diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c index d87da4c..291b35a 100644 --- a/lustre/mgs/mgs_llog.c +++ b/lustre/mgs/mgs_llog.c @@ -1501,12 +1501,12 @@ static int mgs_write_log_osc_to_lov(struct obd_device *obd, struct fs_db *fsdb, int flags) { struct llog_handle *llh = NULL; - char *nodeuuid, *svname, *oscname, *oscuuid, *lovuuid; - char index[5]; + char *nodeuuid, *oscname, *oscuuid, *lovuuid; + char index[9]; int i, rc; ENTRY; - CDEBUG(D_MGS, "adding osc for %s to log %s\n", + CERROR("adding osc for %s to log %s\n", mti->mti_svname, logname); if (mgs_log_is_empty(obd, logname)) { @@ -1515,10 +1515,9 @@ static int mgs_write_log_osc_to_lov(struct obd_device *obd, struct fs_db *fsdb, rc = mgs_write_log_lov(obd, fsdb, mti, logname, lovname); } - + sprintf(index,"-osc%04x", mti->mti_stripe_index); name_create(&nodeuuid, libcfs_nid2str(mti->mti_nids[0]), ""); - name_create(&svname, mti->mti_svname, lovname); - name_create(&oscname, svname, "-osc"); + name_create(&oscname, lovname, index); name_create(&oscuuid, oscname, "_UUID"); name_create(&lovuuid, lovname, "_UUID"); @@ -1557,7 +1556,6 @@ out: name_destroy(lovuuid); name_destroy(oscuuid); name_destroy(oscname); - name_destroy(svname); name_destroy(nodeuuid); RETURN(rc); } @@ -1800,6 +1798,7 @@ static int mgs_write_log_params(struct obd_device *obd, struct fs_db *fsdb, if (class_match_param(ptr, PARAM_LOV, NULL) == 0) { char mdt_index[16]; char *mdtlovname; + /* Change lov default stripe params */ CDEBUG(D_MGS, "lov param %s\n", ptr); if (!(mti->mti_flags & LDD_F_SV_TYPE_MDT)) { @@ -1813,7 +1812,6 @@ static int mgs_write_log_params(struct obd_device *obd, struct fs_db *fsdb, /* Modify mdtlov */ if (mgs_log_is_empty(obd, mti->mti_svname)) GOTO(end_while, rc = -ENODEV); - /* FIXME: The stripesize and stripecount is for * specific mdt lov? * Shall we update all the mdt lov? diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index af4b01a..ab8c5d2 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -721,8 +721,8 @@ test_24k() { mkdir $DIR/R11a $DIR/R11a/d touch $DIR/R11a/f mv $DIR/R11a/f $DIR/R11a/d - $CHECKSTAT -a $DIR/R11a/f || error - $CHECKSTAT -t file $DIR/R11a/d/f || error + $CHECKSTAT -a $DIR/R11a/f || error + $CHECKSTAT -t file $DIR/R11a/d/f || error } run_test 24k "touch .../R11a/f; mv .../R11a/f .../R11a/d =======" @@ -1009,16 +1009,17 @@ exhaust_precreations() { OST=$(grep ${OSTIDX}": " $LPROC/lov/${LOVNAME}/target_obd | \ awk '{print $2}' | sed -e 's/_UUID$//') # on the mdt's osc - last_id=$(cat $LPROC/osc/${OST}-osc/prealloc_last_id) - next_id=$(cat $LPROC/osc/${OST}-osc/prealloc_next_id) - - mkdir -p $DIR/d27/${OST} + OSC=$(ls $LPROC/osc | grep "mdtlov-osc000${OSTIDX}") + last_id=$(cat $LPROC/osc/${OSC}/prealloc_last_id) + next_id=$(cat $LPROC/osc/${OSC}/prealloc_next_id) + + mkdir -p $DIR/d27/${OST} $SETSTRIPE $DIR/d27/${OST} 0 $OSTIDX 1 #define OBD_FAIL_OST_ENOSPC 0x215 sysctl -w lustre.fail_loc=0x215 echo "Creating to objid $last_id on ost $OST..." createmany -o $DIR/d27/${OST}/f $next_id $((last_id - next_id + 2)) - grep '[0-9]' $LPROC/osc/${OST}-osc/prealloc* + grep '[0-9]' $LPROC/osc/${OSC}/prealloc* reset_enospc $2 }