#define OBD_FAIL_OSC_DELAY_IO 0x414
#define OBD_FAIL_OSC_NO_SIZE_DATA 0x415
#define OBD_FAIL_OSC_DELAY_CANCEL 0x416
+#define OBD_FAIL_OSC_SLOW_PAGE_EVICT 0x417
#define OBD_FAIL_PTLRPC 0x500
#define OBD_FAIL_PTLRPC_ACK 0x501
if (!res)
break;
+ OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_SLOW_PAGE_EVICT,
+ cfs_fail_val ?: 20);
+
if (io->ci_type == CIT_MISC &&
io->u.ci_misc.lm_next_rpc_time &&
ktime_get_seconds() > io->u.ci_misc.lm_next_rpc_time) {
}
run_test 902 "test short write doesn't hang lustre"
+# LU-14711
+test_903() {
+ $LFS setstripe -i 0 -c 1 $DIR/$tfile $DIR/${tfile}-2
+ echo "blah" > $DIR/${tfile}-2
+ dd if=/dev/zero of=$DIR/$tfile bs=1M count=6 conv=fsync
+ #define OBD_FAIL_OSC_SLOW_PAGE_EVICT 0x417
+ $LCTL set_param fail_loc=0x417 fail_val=20
+
+ mv $DIR/${tfile}-2 $DIR/$tfile # Destroys the big object
+ sleep 1 # To start the destroy
+ wait_destroy_complete 150 || error "Destroy taking too long"
+ cat $DIR/$tfile > /dev/null || error "Evicted"
+}
+run_test 903 "Test long page discard does not cause evictions"
+
complete $SECONDS
[ -f $EXT2_DEV ] && rm $EXT2_DEV || true
check_and_cleanup_lustre
# MAX value shouldn't be big as this mean server responsiveness
# never increase this just to make test pass but investigate
# why it takes so long time
- local MAX=5
+ local MAX=${1:-5}
local WAIT=0
local list=$(comma_list $(mdts_nodes))
while [ $WAIT -lt $MAX ]; do