+ sleep 3
+
+ for n in $(seq $MDSCOUNT); do
+ updated1[$n]=$(scrub_status $n |
+ awk '/^prior_updated/ { print $2 }')
+ [ ${updated0[$n]} -eq ${updated1[$n]} ] || {
+ echo "OI scrub on MDS$n status for the 4th time:"
+ do_facet mds$n $LCTL get_param -n \
+ osd-*.$(facet_svc mds$n).oi_scrub
+
+ error "(18) NOT auto trigger full scrub as expected"
+ }
+ done
+}
+run_test 4c "Auto trigger OI scrub if bad OI mapping was found (3)"
+
+test_4d() {
+ [ $(facet_fstype $SINGLEMDS) != "ldiskfs" ] && skip "ldiskfs only test"
+
+ check_mount_and_prep
+
+ #define OBD_FAIL_OSD_DUPLICATE_MAP 0x19b
+ do_nodes $(comma_list $(osts_nodes)) $LCTL set_param fail_loc=0x19b
+ for i in {1..100}; do
+ echo $i > $DIR/$tdir/f_$i || error "write f_$i failed"
+ done
+ do_nodes $(comma_list $(osts_nodes)) $LCTL set_param fail_loc=0
+
+ for i in {101..200}; do
+ echo $i > $DIR/$tdir/f_$i || error "write f_$i failed"
+ done
+
+ for i in {1..200}; do
+ echo $i | cmp $DIR/$tdir/f_$i - || error "f_$i data corrupt"
+ done
+}
+run_test 4d "FID in LMA mismatch with object FID won't block create"
+
+test_5() {
+ formatall > /dev/null
+ setupall > /dev/null
+
+ scrub_prep 100 1
+ echo "starting MDTs with OI scrub disabled (1)"
+ scrub_start_mds 2 "$MOUNT_OPTS_NOSCRUB"
+ scrub_check_status 3 init
+ [ $(facet_fstype $SINGLEMDS) != "ldiskfs" ] ||
+ scrub_check_flags 4 recreated,inconsistent
+ mount_client $MOUNT || error "(5) Fail to start client!"
+ scrub_enable_auto
+ full_scrub_ratio 0
+
+ #define OBD_FAIL_OSD_SCRUB_DELAY 0x190
+ do_nodes $(comma_list $(mdts_nodes)) \
+ $LCTL set_param fail_val=3 fail_loc=0x190
+
+ scrub_check_data 6
+ umount_client $MOUNT || error "(7) Fail to stop client!"
+ scrub_check_status 8 scanning
+
+ #define OBD_FAIL_OSD_SCRUB_CRASH 0x191
+ do_nodes $(comma_list $(mdts_nodes)) $LCTL set_param fail_loc=0x191
+