-# bug 3462 - simultaneous MDC requests
-test_51a() {
- replay_barrier_nodf mds
- mkdir -p $DIR/${tdir}-1
- mkdir -p $DIR/${tdir}-2
- touch $DIR/${tdir}-2/f
- multiop $DIR/${tdir}-1/f O_c &
- pid=$!
- # give multiop a chance to open
- sleep 1
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
- kill -USR1 $pid
- do_facet mds "sysctl -w lustre.fail_loc=0"
- $CHECKSTAT -t file $DIR/${tdir}-2/f || return 1
-
- fail mds
-
- wait $pid || return 2
- $CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
- rm -rf $DIR/${tdir}-*
-}
-run_test 51a "|X| close request while two MDC requests in flight"
-
-test_51b() {
- replay_barrier_nodf mds
- mkdir -p $DIR/$tdir-1
- mkdir -p $DIR/$tdir-2
- multiop $DIR/$tdir-1/f O_c &
- pid=$!
- # give multiop a chance to open
- sleep 1
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
- touch $DIR/${tdir}-2/f &
- usleep 500
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- kill -USR1 $pid
- wait $pid || return 1
-
- fail mds
-
- $CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
- $CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
- rm -rf $DIR/${tdir}-*
-}
-run_test 51b "|X| open request while two MDC requests in flight"
-
-test_51c() {
- replay_barrier_nodf mds
- mkdir -p $DIR/${tdir}-1
- mkdir -p $DIR/${tdir}-2
- multiop $DIR/${tdir}-1/f O_c &
- pid=$!
- # give multiop a chance to open
- sleep 1
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
- touch $DIR/${tdir}-2/f &
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
- kill -USR1 $pid
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- fail mds
-
- wait $pid || return 1
- $CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
- $CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
- rm -rf $DIR/${tdir}-*
-}
-run_test 51c "|X| open request and close request while two MDC requests in flight"
-
-test_51d() {
- replay_barrier_nodf mds
- mkdir -p $DIR/${tdir}-1
- mkdir -p $DIR/${tdir}-2
- touch $DIR/${tdir}-2/f
- multiop $DIR/${tdir}-1/f O_c &
- pid=$!
- # give multiop a chance to open
- sleep 1
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
- kill -USR1 $pid
- do_facet mds "sysctl -w lustre.fail_loc=0"
- #$CHECKSTAT -t file $DIR/${tdir}-2/f || return 1
-
- fail mds
-
- wait $pid || return 2
- $CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
- rm -rf $DIR/${tdir}-*
-}
-run_test 51d "|X| close reply while two MDC requests in flight"
-
-test_51e() {
- replay_barrier_nodf mds
- mkdir -p $DIR/$tdir-1
- mkdir -p $DIR/$tdir-2
- multiop $DIR/$tdir-1/f O_c &
- pid=$!
- # give multiop a chance to open
- sleep 1
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
- touch $DIR/${tdir}-2/f &
- usleep 500
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- kill -USR1 $pid
- wait $pid || return 1
-
- fail mds
-
- $CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
- $CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
- rm -rf $DIR/${tdir}-*
-}
-run_test 51e "|X| open reply while two MDC requests in flight"
-
-test_51f() {
- replay_barrier_nodf mds
- mkdir -p $DIR/${tdir}-1
- mkdir -p $DIR/${tdir}-2
- multiop $DIR/${tdir}-1/f O_c &
- pid=$!
- # give multiop a chance to open
- sleep 1
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
- touch $DIR/${tdir}-2/f &
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
- kill -USR1 $pid
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- fail mds
-
- wait $pid || return 1
- $CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
- $CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
- rm -rf $DIR/${tdir}-*
-}
-run_test 51f "|X| open reply and close reply while two MDC requests in flight"
-
-test_51g() {
- replay_barrier_nodf mds
- mkdir -p $DIR/${tdir}-1
- mkdir -p $DIR/${tdir}-2
- multiop $DIR/${tdir}-1/f O_c &
- pid=$!
- # give multiop a chance to open
- sleep 1
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
- touch $DIR/${tdir}-2/f &
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
- kill -USR1 $pid
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- fail mds
-
- wait $pid || return 1
- $CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
- $CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
- rm -rf $DIR/${tdir}-*
-}
-run_test 51g "|X| open reply and close request while two MDC requests in flight"
-
-test_51h() {
- replay_barrier_nodf mds
- mkdir -p $DIR/${tdir}-1
- mkdir -p $DIR/${tdir}-2
- multiop $DIR/${tdir}-1/f O_c &
- pid=$!
- # give multiop a chance to open
- sleep 1
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
- touch $DIR/${tdir}-2/f &
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
- kill -USR1 $pid
- do_facet mds "sysctl -w lustre.fail_loc=0"
-
- fail mds
-
- wait $pid || return 1
- $CHECKSTAT -t file $DIR/${tdir}-1/f || return 2
- $CHECKSTAT -t file $DIR/${tdir}-2/f || return 3
- rm -rf $DIR/${tdir}-*
-}
-run_test 51h "|X| open request and close reply while two MDC requests in flight"
-