ALWAYS_EXCEPT=" 27u 42a 42b 42c 42d 45 51d 68b $SANITY_EXCEPT"
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
+# with LOD/OSP landing
+# bug number for skipped tests: LU2036
+ALWAYS_EXCEPT=" 76 $ALWAYS_EXCEPT"
+
+
# Tests that fail on uml
CPU=`awk '/model/ {print $4}' /proc/cpuinfo`
# buffer i/o errs sock spc runas
}
run_test 17k "symlinks: rsync with xattrs enabled ========================="
+# LU-1540
+test_17m() {
+ local short_sym="0123456789"
+ local WDIR=$DIR/${tdir}m
+ local mds_index
+ local devname
+ local cmd
+ local i
+ local rc=0
+
+ [ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.2.0) ] &&
+ [ $(lustre_version_code $SINGLEMDS) -le $(version_code 2.2.93) ] &&
+ skip "MDS 2.2.0-2.2.93 do not NUL-terminate symlinks" && return
+
+ [ "$(facet_fstype $SINGLEMDS)" != "ldiskfs" ] &&
+ skip "only for ldiskfs MDT" && return 0
+
+ mkdir -p $WDIR
+ long_sym=$short_sym
+ # create a long symlink file
+ for ((i = 0; i < 4; ++i)); do
+ long_sym=${long_sym}${long_sym}
+ done
+
+ echo "create 512 short and long symlink files under $WDIR"
+ for ((i = 0; i < 256; ++i)); do
+ ln -sf ${long_sym}"a5a5" $WDIR/long-$i
+ ln -sf ${short_sym}"a5a5" $WDIR/short-$i
+ done
+
+ echo "erase them"
+ rm -f $WDIR/*
+ sync
+ sleep 2
+
+ echo "recreate the 512 symlink files with a shorter string"
+ for ((i = 0; i < 512; ++i)); do
+ # rewrite the symlink file with a shorter string
+ ln -sf ${long_sym} $WDIR/long-$i
+ ln -sf ${short_sym} $WDIR/short-$i
+ done
+
+ mds_index=$($LFS getstripe -M $WDIR)
+ mds_index=$((mds_index+1))
+ devname=$(mdsdevname $mds_index)
+ cmd="$E2FSCK -fnvd $devname"
+
+ echo "stop and checking mds${mds_index}: $cmd"
+ # e2fsck should not return error
+ stop mds${mds_index} -f
+ do_facet mds${mds_index} $cmd || rc=$?
+
+ start mds${mds_index} $devname $MDS_MOUNT_OPTS
+ df $MOUNT > /dev/null 2>&1
+ [ $rc -ne 0 ] && error "e2fsck should not report error upon "\
+ "short/long symlink MDT: rc=$rc"
+ return $rc
+}
+run_test 17m "run e2fsck against MDT which contains short/long symlink"
+
test_18() {
touch $DIR/f
ls $DIR || error
[ "$OSTIDX" ] && list=$(facet_host ost$((OSTIDX + 1)))
do_nodes $list lctl set_param fail_loc=0
+ sync # initiate all OST_DESTROYs from MDS to OST
sleep_maxage
}
# this should be set to future
TEST_39_ATIME=`date -d "1 year" +%s`
+is_sles11() # LU-1783
+{
+ if [ -r /etc/SuSE-release ]
+ then
+ local vers=`grep VERSION /etc/SuSE-release | awk '{print $3}'`
+ local patchlev=`grep PATCHLEVEL /etc/SuSE-release \
+ | awk '{print $3}'`
+ if [ $vers -eq 11 ] && [ $patchlev -eq 1 ]
+ then
+ return 0
+ fi
+ fi
+ return 1
+}
+
test_39l() {
+ is_sles11 && skip "SLES 11 SP1" && return # LU-1783
remote_mds_nodsh && skip "remote MDS with nodsh" && return
local atime_diff=$(do_facet $SINGLEMDS lctl get_param -n mdd.*.atime_diff)
local osc1_mppc=osc.$(get_osc_import_name client ost1).max_pages_per_rpc
local orig_mppc=`$LCTL get_param -n $osc1_mppc`
# loop until dd process exits
- while ps ax -opid | grep -q $dd_pid; do
+ while ps ax -opid | grep -wq $dd_pid; do
$LCTL set_param $osc1_mppc=$((RANDOM % 256 + 1))
sleep $((RANDOM % 5 + 1))
done
run_test 51b "mkdir .../t-0 --- .../t-$NUMTEST ===================="
test_51ba() { # LU-993
- local BASE=$DIR/d51b
- # unlink all but 100 subdirectories, then check it still works
- local LEFT=100
- local DELETE=$((NUMTEST - LEFT))
-
- ! [ -d "${BASE}/t-$DELETE" ] && skip "test_51b() not run" && return 0
-
- # for ldiskfs the nlink count should be 1, but this is OSD specific
- # and so this is listed for informational purposes only
- log "nlink before: $(stat -c %h $BASE)"
- unlinkmany -d $BASE/t- $DELETE ||
- error "unlink of first $DELETE subdirs failed"
-
- log "nlink between: $(stat -c %h $BASE)"
- local FOUND=$(ls -l ${BASE} | wc -l)
- FOUND=$((FOUND - 1)) # trim the first line of ls output
- [ $FOUND -ne $LEFT ] &&
- error "can't find subdirs: found only $FOUND/$LEFT"
-
- unlinkmany -d $BASE/t- $DELETE $LEFT ||
- error "unlink of second $LEFT subdirs failed"
- log "nlink after: $(stat -c %h $BASE)"
+ local BASE=$DIR/d51b
+ # unlink all but 100 subdirectories, then check it still works
+ local LEFT=100
+ local DELETE=$((NUMTEST - LEFT))
+
+ # continue on to run this test even if 51b didn't finish,
+ # just to delete the many subdirectories created.
+ ! [ -d "${BASE}/t-1" ] && skip "test_51b() not run" && return 0
+
+ # for ldiskfs the nlink count should be 1, but this is OSD specific
+ # and so this is listed for informational purposes only
+ log "nlink before: $(stat -c %h $BASE)"
+ unlinkmany -d $BASE/t- $DELETE ||
+ error "unlink of first $DELETE subdirs failed"
+
+ log "nlink between: $(stat -c %h $BASE)"
+ local FOUND=$(ls -l ${BASE} | wc -l)
+ FOUND=$((FOUND - 1)) # trim the first line of ls output
+ [ $FOUND -ne $LEFT ] &&
+ error "can't find subdirs: found only $FOUND/$LEFT"
+
+ unlinkmany -d $BASE/t- $DELETE $LEFT ||
+ error "unlink of second $LEFT subdirs failed"
+ log "nlink after: $(stat -c %h $BASE)"
}
run_test 51ba "rmdir .../t-0 --- .../t-$NUMTEST"
run_test 65ib "getstripe -v on -1 default directory striping"
test_65ic() { # bug12836
- $LFS find -mtime -1 $MOUNT || error "find $MOUNT failed"
+ $LFS find -mtime -1 $MOUNT > /dev/null || error "find $MOUNT failed"
}
run_test 65ic "new find on -1 default directory striping"
echo read-ahead disabled time read $time_ra_OFF
echo read-ahead enabled time read $time_ra_ON
- set_read_ahead $old_READAHEAD
- rm -f $file
+ set_read_ahead $old_READAHEAD
+ rm -f $file
+ wait_delete_completed
[ $time_ra_ON -lt $time_ra_OFF ] ||
error "read-ahead enabled time read (${time_ra_ON}s) is more than
cut -c11-20)
# don't return an error
- [ $OSTIO_post -eq $OSTIO_pre ] && echo \
- "WARNING: No new ll_ost_io threads were created ($OSTIO_pre)" &&\
- echo "This may be fine, depending on what ran before this test" &&\
+ [ $OSTIO_post == $OSTIO_pre ] && echo \
+ "WARNING: No new ll_ost_io threads were created ($OSTIO_pre)" &&
+ echo "This may be fine, depending on what ran before this test" &&
echo "and how fast this system is." && return
echo "Started with $OSTIO_pre threads, ended with $OSTIO_post"
}
run_test 118h "Verify timeout in handling recoverables errors =========="
+[ "$SLOW" = "no" ] && [ -n "$OLD_RESENDCOUNT" ] && set_resend_count $OLD_RESENDCOUNT
+
test_118i() {
remote_ost_nodsh && skip "remote OST with nodsh" && return
}
run_test 118i "Fix error before timeout in recoverable error =========="
+[ "$SLOW" = "no" ] && set_resend_count 4
+
test_118j() {
remote_ost_nodsh && skip "remote OST with nodsh" && return
}
test_130a() {
- filefrag_op=$(filefrag -e 2>&1 | grep "invalid option")
- [ -n "$filefrag_op" ] && skip "filefrag does not support FIEMAP" && return
+ local filefrag_op=$(filefrag -e 2>&1 | grep "invalid option")
+ [ -n "$filefrag_op" ] && skip_env "filefrag does not support FIEMAP" &&
+ return
trap cleanup_130 EXIT RETURN
local fm_file=$DIR/$tfile
$SETSTRIPE -S 65536 -c 1 $fm_file || error "setstripe on $fm_file"
- dd if=/dev/zero of=$fm_file bs=65536 count=1 || error "dd failed for $fm_file"
+ dd if=/dev/zero of=$fm_file bs=65536 count=1 ||
+ error "dd failed for $fm_file"
- filefrag -ves $fm_file || error "filefrag $fm_file failed"
- filefrag_op=`filefrag -ve $fm_file | grep -A 100 "ext:" | grep -v "ext:" | grep -v "found"`
+ # LU-1795: test filefrag/FIEMAP once, even if unsupported
+ filefrag -ves $fm_file
+ RC=$?
+ [ "$(facet_fstype ost$(($($GETSTRIPE -i $fm_file) + 1)))" = "zfs" ] &&
+ skip "ORI-366/LU-1941: FIEMAP unimplemented on ZFS" && return
+ [ $RC != 0 ] && error "filefrag $fm_file failed"
+ filefrag_op=$(filefrag -ve $fm_file | grep -A 100 "ext:" |
+ grep -v "ext:" | grep -v "found")
lun=$($GETSTRIPE -i $fm_file)
start_blk=`echo $filefrag_op | cut -d: -f2 | cut -d. -f1`
run_test 130a "FIEMAP (1-stripe file)"
test_130b() {
- [ "$OSTCOUNT" -lt "2" ] && skip_env "skipping FIEMAP on 2-stripe file test" && return
+ [ "$OSTCOUNT" -lt "2" ] &&
+ skip_env "skipping FIEMAP on 2-stripe file test" && return
- filefrag_op=$(filefrag -e 2>&1 | grep "invalid option")
- [ -n "$filefrag_op" ] && skip "filefrag does not support FIEMAP" && return
+ local filefrag_op=$(filefrag -e 2>&1 | grep "invalid option")
+ [ -n "$filefrag_op" ] && skip_env "filefrag does not support FIEMAP" &&
+ return
trap cleanup_130 EXIT RETURN
local fm_file=$DIR/$tfile
$SETSTRIPE -S 65536 -c 2 $fm_file || error "setstripe on $fm_file"
- dd if=/dev/zero of=$fm_file bs=1M count=2 || error "dd failed on $fm_file"
+ [ "$(facet_fstype ost$(($($GETSTRIPE -i $fm_file) + 1)))" = "zfs" ] &&
+ skip "ORI-366/LU-1941: FIEMAP unimplemented on ZFS" && return
+
+ dd if=/dev/zero of=$fm_file bs=1M count=2 ||
+ error "dd failed on $fm_file"
filefrag -ves $fm_file || error "filefrag $fm_file failed"
- filefrag_op=`filefrag -ve $fm_file | grep -A 100 "ext:" | grep -v "ext:" | grep -v "found"`
+ filefrag_op=$(filefrag -ve $fm_file | grep -A 100 "ext:" |
+ grep -v "ext:" | grep -v "found")
- last_lun=`echo $filefrag_op | cut -d: -f5`
+ last_lun=$(echo $filefrag_op | cut -d: -f5)
IFS=$'\n'
tot_len=0
run_test 130b "FIEMAP (2-stripe file)"
test_130c() {
- [ "$OSTCOUNT" -lt "2" ] && skip_env "skipping FIEMAP on 2-stripe file with hole test" && return
+ [ "$OSTCOUNT" -lt "2" ] &&
+ skip_env "skipping FIEMAP on 2-stripe file" && return
filefrag_op=$(filefrag -e 2>&1 | grep "invalid option")
- [ -n "$filefrag_op" ] && skip "filefrag does not support FIEMAP" && return
+ [ -n "$filefrag_op" ] && skip "filefrag does not support FIEMAP" &&
+ return
trap cleanup_130 EXIT RETURN
local fm_file=$DIR/$tfile
$SETSTRIPE -S 65536 -c 2 $fm_file || error "setstripe on $fm_file"
+ [ "$(facet_fstype ost$(($($GETSTRIPE -i $fm_file) + 1)))" = "zfs" ] &&
+ skip "ORI-366/LU-1941: FIEMAP unimplemented on ZFS" && return
+
dd if=/dev/zero of=$fm_file seek=1 bs=1M count=1 || error "dd failed on $fm_file"
filefrag -ves $fm_file || error "filefrag $fm_file failed"
local fm_file=$DIR/$tfile
$SETSTRIPE -S 65536 -c $OSTCOUNT $fm_file||error "setstripe on $fm_file"
+ [ "$(facet_fstype ost$(($($GETSTRIPE -i $fm_file) + 1)))" = "zfs" ] &&
+ skip "ORI-366/LU-1941: FIEMAP unimplemented on ZFS" && return
dd if=/dev/zero of=$fm_file bs=1M count=$OSTCOUNT || error "dd failed on $fm_file"
filefrag -ves $fm_file || error "filefrag $fm_file failed"
local fm_file=$DIR/$tfile
$SETSTRIPE -S 131072 -c 2 $fm_file || error "setstripe on $fm_file"
+ [ "$(facet_fstype ost$(($($GETSTRIPE -i $fm_file) + 1)))" = "zfs" ] &&
+ skip "ORI-366/LU-1941: FIEMAP unimplemented on ZFS" && return
+
NUM_BLKS=512
EXPECTED_LEN=$(( (NUM_BLKS / 2) * 64 ))
for ((i = 0; i < $NUM_BLKS; i++))
chmod 444 ${testdir}/${tfile} || error "chmod failed"
check_stats $SINGLEMDS "setattr" 1
do_facet $SINGLEMDS $LCTL set_param mdt.*.md_stats=clear
- ls -l ${testdir}/${tfile} > /dev/null|| error "ls failed"
- check_stats $SINGLEMDS "getattr" 1
+ if [ $(lustre_version_code $SINGLEMDS) -ne $(version_code 2.2.0) ]
+ then # LU-1740
+ ls -l ${testdir}/${tfile} > /dev/null|| error "ls failed"
+ check_stats $SINGLEMDS "getattr" 1
+ fi
$LFS df || error "lfs failed"
check_stats $SINGLEMDS "statfs" 1
$SETSTRIPE -c 1 -i 0 ${testdir}/${tfile}
sync
cancel_lru_locks osc
+ wait_delete_completed
# clear stats.
do_facet $SINGLEMDS $LCTL set_param mdt.*.md_stats=clear
check_stats ost "punch" 1
rm -f ${testdir}/${tfile} || error "file remove failed"
+ wait_delete_completed
check_stats ost "destroy" 1
rm -rf $DIR/${tdir}
run_test 153 "test if fdatasync does not crash ======================="
test_154() {
+ [[ $(lustre_version_code $SINGLEMDS) -ge $(version_code 2.2.51) ]] ||
+ { skip "Need MDS version at least 2.2.51"; return 0; }
+
cp /etc/hosts $DIR/$tfile
fid=$($LFS path2fid $DIR/$tfile)
touch $DIR/.lustre/fid/$tfile && \
error "touch $DIR/.lustre/fid/$tfile should fail."
+ echo "setxattr to $DIR/.lustre/fid"
+ setfattr -n trusted.name1 -v value1 $DIR/.lustre/fid &&
+ error "setxattr should fail."
+
+ echo "listxattr for $DIR/.lustre/fid"
+ getfattr -d -m "^trusted" $DIR/.lustre/fid &&
+ error "listxattr should fail."
+
+ echo "delxattr from $DIR/.lustre/fid"
+ setfattr -x trusted.name1 $DIR/.lustre/fid &&
+ error "delxattr should fail."
+
+ echo "touch invalid fid: $DIR/.lustre/fid/[0x200000400:0x2:0x3]"
+ touch $DIR/.lustre/fid/[0x200000400:0x2:0x3] &&
+ error "touch invalid fid should fail."
+
+ echo "touch non-normal fid: $DIR/.lustre/fid/[0x1:0x2:0x0]"
+ touch $DIR/.lustre/fid/[0x1:0x2:0x0] &&
+ error "touch non-normal fid should fail."
+
+ echo "rename $tdir to $DIR/.lustre/fid"
+ mrename $DIR/$tdir $DIR/.lustre/fid &&
+ error "rename to $DIR/.lustre/fid should fail."
+
+ echo "rename .lustre to itself"
+ fid=$($LFS path2fid $DIR)
+ mrename $DIR/.lustre $DIR/.lustre/fid/$fid/.lustre &&
+ error "rename .lustre to itself should fail."
+
+ $OPENFILE -f O_LOV_DELAY_CREATE:O_CREAT $DIR/$tfile-2
+ fid=$($LFS path2fid $DIR/$tfile-2)
+ echo "cp /etc/passwd $DIR/.lustre/fid/$fid"
+ cp /etc/passwd $DIR/.lustre/fid/$fid &&
+ error "create lov data thru .lustre should fail."
+ echo "cp /etc/passwd $DIR/$tfile-2"
+ cp /etc/passwd $DIR/$tfile-2 || error "copy to $DIR/$tfile-2 failed."
+ echo "diff /etc/passwd $DIR/.lustre/fid/$fid"
+ diff /etc/passwd $DIR/.lustre/fid/$fid ||
+ error "diff /etc/passwd $DIR/.lustre/fid/$fid failed."
+
echo "Open-by-FID succeeded"
}
run_test 154 "Open-by-FID"
local POOL_ROOT=${POOL_ROOT:-$DIR/d200.pools}
local POOL_DIR_NAME=${POOL_DIR_NAME:-dir_tst}
# Pool OST targets
- local first_ost=1
+ local first_ost=0
local last_ost=$(($OSTCOUNT - 1))
local ost_step=2
local ost_list=$(seq $first_ost $ost_step $last_ost)
}
test_205() { # Job stats
+ [ -z "$(lctl get_param -n mdc.*.connect_flags | grep jobstats)" ] &&
+ skip "Server doesn't support jobstats" && return 0
+
local cmd
OLD_JOBENV=`$LCTL get_param -n jobid_var`
if [ $OLD_JOBENV != $JOBENV ]; then
}
run_test 205 "Verify job stats"
+# LU-1480, LU-1773 and LU-1657
+test_206() {
+ mkdir -p $DIR/$tdir
+ lfs setstripe -c -1 $DIR/$tdir
+#define OBD_FAIL_LOV_INIT 0x1403
+ $LCTL set_param fail_loc=0xa0001403
+ $LCTL set_param fail_val=1
+ touch $DIR/$tdir/$tfile || true
+}
+run_test 206 "fail lov_init_raid0() doesn't lbug"
+
test_212() {
size=`date +%s`
size=$((size % 8192 + 1))
}
run_test 227 "running truncated executable does not cause OOM"
+# LU-1512 try to reuse idle OI blocks
+test_228a() {
+ [ "$FSTYPE" != "ldiskfs" ] && skip "non-ldiskfs backend" && return
+
+ local MDT_DEV=$(mdsdevname ${SINGLEMDS//mds/})
+ local myDIR=$DIR/$tdir
+
+ mkdir -p $myDIR
+ #define OBD_FAIL_SEQ_EXHAUST 0x1002
+ $LCTL set_param fail_loc=0x80001002
+ createmany -o $myDIR/t- 10000
+ $LCTL set_param fail_loc=0
+ # The guard is current the largest FID holder
+ touch $myDIR/guard
+ local SEQ=$($LFS path2fid $myDIR/guard | awk -F ':' '{print $1}' |
+ tr -d '[')
+ local IDX=$(($SEQ % 64))
+
+ do_facet $SINGLEMDS sync
+ # Make sure journal flushed.
+ sleep 6
+ local blk1=$(do_facet $SINGLEMDS \
+ "$DEBUGFS -c -R \\\"stat oi.16.${IDX}\\\" $MDT_DEV" |
+ grep Blockcount | awk '{print $4}')
+
+ # Remove old files, some OI blocks will become idle.
+ unlinkmany $myDIR/t- 10000
+ # Create new files, idle OI blocks should be reused.
+ createmany -o $myDIR/t- 2000
+ do_facet $SINGLEMDS sync
+ # Make sure journal flushed.
+ sleep 6
+ local blk2=$(do_facet $SINGLEMDS \
+ "$DEBUGFS -c -R \\\"stat oi.16.${IDX}\\\" $MDT_DEV" |
+ grep Blockcount | awk '{print $4}')
+
+ [ $blk1 == $blk2 ] || error "old blk1=$blk1, new blk2=$blk2, unmatched!"
+}
+run_test 228a "try to reuse idle OI blocks"
+
+test_228b() {
+ [ "$FSTYPE" != "ldiskfs" ] && skip "non-ldiskfs backend" && return
+
+ local MDT_DEV=$(mdsdevname ${SINGLEMDS//mds/})
+ local myDIR=$DIR/$tdir
+
+ mkdir -p $myDIR
+ #define OBD_FAIL_SEQ_EXHAUST 0x1002
+ $LCTL set_param fail_loc=0x80001002
+ createmany -o $myDIR/t- 10000
+ $LCTL set_param fail_loc=0
+ # The guard is current the largest FID holder
+ touch $myDIR/guard
+ local SEQ=$($LFS path2fid $myDIR/guard | awk -F ':' '{print $1}' |
+ tr -d '[')
+ local IDX=$(($SEQ % 64))
+
+ do_facet $SINGLEMDS sync
+ # Make sure journal flushed.
+ sleep 6
+ local blk1=$(do_facet $SINGLEMDS \
+ "$DEBUGFS -c -R \\\"stat oi.16.${IDX}\\\" $MDT_DEV" |
+ grep Blockcount | awk '{print $4}')
+
+ # Remove old files, some OI blocks will become idle.
+ unlinkmany $myDIR/t- 10000
+
+ # stop the MDT
+ stop $SINGLEMDS || error "Fail to stop MDT."
+ # remount the MDT
+ start $SINGLEMDS $MDT_DEV $MDS_MOUNT_OPTS || error "Fail to start MDT."
+
+ df $MOUNT || error "Fail to df."
+ # Create new files, idle OI blocks should be reused.
+ createmany -o $myDIR/t- 2000
+ do_facet $SINGLEMDS sync
+ # Make sure journal flushed.
+ sleep 6
+ local blk2=$(do_facet $SINGLEMDS \
+ "$DEBUGFS -c -R \\\"stat oi.16.${IDX}\\\" $MDT_DEV" |
+ grep Blockcount | awk '{print $4}')
+
+ [ $blk1 == $blk2 ] || error "old blk1=$blk1, new blk2=$blk2, unmatched!"
+}
+run_test 228b "idle OI blocks can be reused after MDT restart"
+
+#LU-1881
+test_228c() {
+ [ "$FSTYPE" != "ldiskfs" ] && skip "non-ldiskfs backend" && return
+
+ local MDT_DEV=$(mdsdevname ${SINGLEMDS//mds/})
+ local myDIR=$DIR/$tdir
+
+ mkdir -p $myDIR
+ #define OBD_FAIL_SEQ_EXHAUST 0x1002
+ $LCTL set_param fail_loc=0x80001002
+ # 20000 files can guarantee there are index nodes in the OI file
+ createmany -o $myDIR/t- 20000
+ $LCTL set_param fail_loc=0
+ # The guard is current the largest FID holder
+ touch $myDIR/guard
+ local SEQ=$($LFS path2fid $myDIR/guard | awk -F ':' '{print $1}' |
+ tr -d '[')
+ local IDX=$(($SEQ % 64))
+
+ do_facet $SINGLEMDS sync
+ # Make sure journal flushed.
+ sleep 6
+ local blk1=$(do_facet $SINGLEMDS \
+ "$DEBUGFS -c -R \\\"stat oi.16.${IDX}\\\" $MDT_DEV" |
+ grep Blockcount | awk '{print $4}')
+
+ # Remove old files, some OI blocks will become idle.
+ unlinkmany $myDIR/t- 20000
+ rm -f $myDIR/guard
+ # The OI file should become empty now
+
+ # Create new files, idle OI blocks should be reused.
+ createmany -o $myDIR/t- 2000
+ do_facet $SINGLEMDS sync
+ # Make sure journal flushed.
+ sleep 6
+ local blk2=$(do_facet $SINGLEMDS \
+ "$DEBUGFS -c -R \\\"stat oi.16.${IDX}\\\" $MDT_DEV" |
+ grep Blockcount | awk '{print $4}')
+
+ [ $blk1 == $blk2 ] || error "old blk1=$blk1, new blk2=$blk2, unmatched!"
+}
+run_test 228c "NOT shrink the last entry in OI index node to recycle idle leaf"
+
#
# tests that do cleanup/setup should be run at the end
#