From 6bae1b152cff75054d50639b6b19ab7ce82fc295 Mon Sep 17 00:00:00 2001 From: grev <grev> Date: Wed, 12 Mar 2008 23:41:40 +0000 Subject: [PATCH] b=14957 i=Adilger port OBD_FAIL_LDLM_CLOSE_THREAD from b1_6, add test_23b --- lustre/include/obd_support.h | 2 +- lustre/llite/llite_close.c | 3 +++ lustre/tests/conf-sanity.sh | 13 +++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index 5d7a40710b..a1f0b1023f 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -200,8 +200,8 @@ int __obd_fail_check_set(__u32 id, __u32 value, int set); #define OBD_FAIL_LDLM_CANCEL_EVICT_RACE 0x311 /* #define OBD_FAIL_LDLM_PAUSE_CANCEL 0x312 -#define OBD_FAIL_LDLM_CLOSE_THREAD 0x313 */ +#define OBD_FAIL_LDLM_CLOSE_THREAD 0x313 #define OBD_FAIL_LDLM_CANCEL_BL_CB_RACE 0x314 #define OBD_FAIL_OSC 0x400 diff --git a/lustre/llite/llite_close.c b/lustre/llite/llite_close.c index 76e4b4a3dc..4231d322d2 100644 --- a/lustre/llite/llite_close.c +++ b/lustre/llite/llite_close.c @@ -336,6 +336,9 @@ int ll_close_thread_start(struct ll_close_queue **lcq_ret) struct ll_close_queue *lcq; pid_t pid; + if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CLOSE_THREAD)) + return -EINTR; + OBD_ALLOC(lcq, sizeof(*lcq)); if (lcq == NULL) return -ENOMEM; diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh index 5b9ee542e9..5df6fcbfd7 100644 --- a/lustre/tests/conf-sanity.sh +++ b/lustre/tests/conf-sanity.sh @@ -855,6 +855,19 @@ test_23a() { # was test_23 } run_test 23a "interrupt client during recovery mount delay" +umount_client $MOUNT +cleanup_nocli + +test_23b() { # was test_23 + start_ost + start_mds + # Simulate -EINTR during mount OBD_FAIL_LDLM_CLOSE_THREAD + sysctl -w lustre.fail_loc=0x80000313 + mount_client $MOUNT + cleanup +} +run_test 23b "Simulate -EINTR during mount" + fs2mds_HOST=$mds_HOST fs2ost_HOST=$ost_HOST -- GitLab