#!/bin/bash
+# -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
+# vim:shiftwidth=4:softtabstop=4:tabstop=4:
set -e
}
run_test 8c "Verify redo io: redo io should fail after eviction"
+test_8d() {
+#define OBD_FAIL_MDS_DQACQ_NET 0x187
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0x187"
+ # test the non-intent create path
+ mcreate $TDIR/$tfile &
+ cpid=$!
+ sleep $TIMEOUT
+ if ! ps -p $cpid > /dev/null 2>&1; then
+ error "mknod finished incorrectly"
+ return 1
+ fi
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0"
+ wait $cpid || return 2
+ stat $TDIR/$tfile || error "mknod failed"
+
+ rm $TDIR/$tfile
+
+#define OBD_FAIL_MDS_DQACQ_NET 0x187
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0x187"
+ # test the intent create path
+ openfile -f O_RDWR:O_CREAT $TDIR/$tfile &
+ cpid=$!
+ sleep $TIMEOUT
+ if ! ps -p $cpid > /dev/null 2>&1; then
+ error "open finished incorrectly"
+ return 3
+ fi
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0"
+ wait $cpid || return 4
+ stat $TDIR/$tfile || error "open failed"
+}
+run_test 8d "Verify redo creation on -EINPROGRESS"
+
+test_8e() {
+ sleep 1 # ensure we have a fresh statfs
+#define OBD_FAIL_OST_STATFS_EINPROGRESS 0x231
+ do_facet ost1 "lctl set_param fail_loc=0x231"
+ df $MOUNT &
+ dfpid=$!
+ sleep $TIMEOUT
+ if ! ps -p $dfpid > /dev/null 2>&1; then
+ do_facet ost1 "lctl set_param fail_loc=0"
+ error "df shouldn't have completed!"
+ return 1
+ fi
+ do_facet ost1 "lctl set_param fail_loc=0"
+}
+run_test 8e "Verify that ptlrpc resends request on -EINPROGRESS"
complete $(basename $0) $SECONDS
check_and_cleanup_lustre