Whamcloud - gitweb
-revert back changes in osc nameing. The old pattern should be preserved for
authortappro <tappro>
Mon, 25 Sep 2006 23:19:54 +0000 (23:19 +0000)
committertappro <tappro>
Mon, 25 Sep 2006 23:19:54 +0000 (23:19 +0000)
tests. Name of MDT is added at the end of name.
- fix changes in sanity.sh

lustre/mgs/mgs_llog.c
lustre/tests/sanity.sh

index 291b35a..eb70c2a 100644 (file)
@@ -1496,13 +1496,13 @@ out:
 /* Add the ost info to the client/mdt lov */
 static int mgs_write_log_osc_to_lov(struct obd_device *obd, struct fs_db *fsdb,
                                     struct mgs_target_info *mti,
-                                    char *logname, char *lovname,
+                                    char *logname, char *suffix, char *lovname,
                                     struct sec_flavor_config *sec_conf,
                                     int flags)
 {
         struct llog_handle *llh = NULL;
-        char *nodeuuid, *oscname, *oscuuid, *lovuuid;
-        char index[9];
+        char *nodeuuid, *oscname, *oscuuid, *lovuuid, *svname;
+        char index[5];
         int i, rc;
 
         ENTRY;
@@ -1515,9 +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(&oscname, lovname, index);
+        name_create(&svname, mti->mti_svname, "-osc");
+        name_create(&oscname, svname, suffix);
         name_create(&oscuuid, oscname, "_UUID");
         name_create(&lovuuid, lovname, "_UUID");
 
@@ -1556,6 +1556,7 @@ out:
         name_destroy(lovuuid);
         name_destroy(oscuuid);
         name_destroy(oscname);
+        name_destroy(svname);
         name_destroy(nodeuuid);
         RETURN(rc);
 }
@@ -1644,8 +1645,9 @@ static int mgs_write_log_ost(struct obd_device *obd, struct fs_db *fsdb,
                         sprintf(mdt_index,"-MDT%04x",i);
                         name_create(&logname, mti->mti_fsname, mdt_index);
                         name_create(&lovname, logname, "-mdtlov");
-                        mgs_write_log_osc_to_lov(obd, fsdb, mti, logname, 
-                                                 lovname, &sec_conf_mdt, flags);
+                        mgs_write_log_osc_to_lov(obd, fsdb, mti, logname,
+                                                 mdt_index, lovname,
+                                                 &sec_conf_mdt, flags);
                         name_destroy(logname);
                         name_destroy(lovname);
                 }
@@ -1654,8 +1656,8 @@ static int mgs_write_log_ost(struct obd_device *obd, struct fs_db *fsdb,
     
         /* Append ost info to the client log */
         name_create(&logname, mti->mti_fsname, "-client");
-        mgs_write_log_osc_to_lov(obd, fsdb, mti, logname, fsdb->fsdb_clilov,
-                                 &sec_conf_cli, 0);
+        mgs_write_log_osc_to_lov(obd, fsdb, mti, logname, "",
+                                 fsdb->fsdb_clilov, &sec_conf_cli, 0);
         name_destroy(logname);
         
         RETURN(rc);
index a63c4e2..b4c2eae 100644 (file)
@@ -1009,8 +1009,8 @@ exhaust_precreations() {
        OST=$(grep ${OSTIDX}": " $LPROC/lov/${LOVNAME}/target_obd | \
            awk '{print $2}' | sed -e 's/_UUID$//')
        # on the mdt's osc
-        OSC=$(ls $LPROC/osc | grep "mdtlov-osc000${OSTIDX}")
-       last_id=$(cat $LPROC/osc/${OSC}/prealloc_last_id)
+        OSC=$(ls $LPROC/osc | grep "${OST}-osc-MDT0000")
+        last_id=$(cat $LPROC/osc/${OSC}/prealloc_last_id)
        next_id=$(cat $LPROC/osc/${OSC}/prealloc_next_id)
         
         mkdir -p $DIR/d27/${OST}
@@ -1710,7 +1710,7 @@ test_42a() {
        stop_writeback
        sync; sleep 1; sync # just to be safe
        BEFOREWRITES=`count_ost_writes`
-       grep "[0-9]" $LPROC/osc/*-osc0*/cur_grant_bytes
+       grep "[0-9]" $LPROC/osc/*-osc-*/cur_grant_bytes
        dd if=/dev/zero of=$DIR/f42a bs=1024 count=100
        AFTERWRITES=`count_ost_writes`
        [ $BEFOREWRITES -eq $AFTERWRITES ] || \
@@ -2472,7 +2472,7 @@ run_test 63b "async write errors should be returned to fsync ==="
 
 test_64a () {
        df $DIR
-       grep "[0-9]" $LPROC/osc/*-osc0*/cur*
+       grep "[0-9]" $LPROC/osc/*-osc-*/cur*
 }
 run_test 64a "verify filter grant calculations (in kernel) ====="
 
@@ -3157,7 +3157,7 @@ test_104() {
        lfs df $DIR/$tfile || error "lfs df $DIR/$tfile failed"
        lfs df -ih $DIR/$tfile || error "lfs df -ih $DIR/$tfile failed"
        
-       OSC=`awk '/-osc0/ {print $4}' $LPROC/devices | head -n 1`
+       OSC=`awk '/-osc-/ {print $4}' $LPROC/devices | head -n 1`
        lctl --device %$OSC deactivate
        lfs df || error "lfs df with deactivated OSC failed"
        lctl --device %$OSC recover