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)) {
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");
name_destroy(lovuuid);
name_destroy(oscuuid);
name_destroy(oscname);
- name_destroy(svname);
name_destroy(nodeuuid);
RETURN(rc);
}
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)) {
/* 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?
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 ======="
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
}