diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index 5d7a40710b578b678962cd6aa47c2dfe42c86f33..a1f0b1023f610ee5b5f0b07e72852a9ffc312660 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 76e4b4a3dca50e43894b34eae01d852955db3ca1..4231d322d2106c9135a5f9467695954c99c5c5cd 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 5b9ee542e90702b7d2d8e79884255ae1818780b3..5df6fcbfd7633672cd8e93225548b7d33fdc4b31 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