From 11ea9ca2b9564eccb1846f32edaf6fb0a534446f Mon Sep 17 00:00:00 2001 From: rread Date: Wed, 17 Mar 2004 00:26:38 +0000 Subject: [PATCH] b=2936 Skip closing files for the self_export, and add a test. --- lustre/mds/handler.c | 4 ++++ lustre/tests/conf-sanity.sh | 25 +++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 5a50482..54a69e6 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -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); diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index beaa4b6..f2483c3 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -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" -- 1.8.3.1