Whamcloud - gitweb
b=2936
authorrread <rread>
Wed, 17 Mar 2004 00:26:38 +0000 (00:26 +0000)
committerrread <rread>
Wed, 17 Mar 2004 00:26:38 +0000 (00:26 +0000)
Skip closing files for the self_export, and add a test.

lustre/mds/handler.c
lustre/tests/conf-sanity.sh

index 5a50482..54a69e6 100644 (file)
@@ -321,6 +321,9 @@ static int mds_destroy_export(struct obd_export *export)
         med = &export->exp_mds_data;
         target_destroy_export(export);
 
+        if (obd_uuid_equals(&export->exp_client_uuid, &obd->obd_uuid))
+                GOTO(out, 0);
+
         push_ctxt(&saved, &obd->obd_ctxt, NULL);
         /* Close any open files (which may also cause orphan unlinking). */
         spin_lock(&med->med_open_lock);
@@ -350,6 +353,7 @@ static int mds_destroy_export(struct obd_export *export)
         spin_unlock(&med->med_open_lock);
         pop_ctxt(&saved, &obd->obd_ctxt, NULL);
 
+out:
         mds_client_free(export, !(export->exp_flags & OBD_OPT_FAILOVER));
 
         RETURN(rc);
index beaa4b6..f2483c3 100644 (file)
@@ -646,4 +646,29 @@ test_16() {
 }
 run_test 16 "verify that lustre will correct the mode of OBJECTS/LOGS/PENDING"
 
+test_17() {
+        TMPMTPT="/mnt/conf17"
+
+        if [ ! -f "$MDSDEV" ]; then
+            echo "no $MDSDEV existing, so mount Lustre to create one"
+            start_ost
+            start_mds
+            mount_client $MOUNT
+            check_mount || return 41
+            cleanup || return $?
+        fi
+
+        echo "Remove mds config log"
+        [ -d $TMPMTPT ] || mkdir -p $TMPMTPT
+        mount -o loop -t ext3 $MDSDEV $TMPMTPT || return $?
+        rm -f $TMPMTPT/LOGS/mds_svc || return $?
+        umount $TMPMTPT || return $?
+
+        start_ost
+       start mds $MDSLCONFARGS && return 42
+        cleanup || return $?
+}
+run_test 17 "Verify failed mds_postsetup won't fail assertion (2936)"
+
+
 equals_msg "Done"