if [ $(facet_fstype $SINGLEMDS) = "zfs" ]; then
# bug number for skipped test: LU-4536 LU-1957
ALWAYS_EXCEPT="$ALWAYS_EXCEPT 65ic 180"
- # 4 13 (min)"
- [ "$SLOW" = "no" ] && EXCEPT_SLOW="$EXCEPT_SLOW 51b 51ba"
+ # 13 (min)"
+ [ "$SLOW" = "no" ] && EXCEPT_SLOW="$EXCEPT_SLOW 51b"
fi
FAIL_ON_ERROR=false
}
run_test 51a "special situations: split htree with empty entry =="
+cleanup_print_lfs_df () {
+ trap 0
+ $LFS df
+ $LFS df -i
+}
+
test_51b() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
local dir=$DIR/$tdir
# need to check free space for the directories as well
local blkfree=$(lctl get_param -n mdc.$FSNAME-MDT$mdtidx*.kbytesavail)
- numfree=$((blkfree / 4))
+ numfree=$(( blkfree / $(fs_inode_ksize) ))
[[ $numfree -lt $nrdirs ]] && skip "not enough blocks ($numfree)" &&
return
+ trap cleanup_print_lfsdf EXIT
+
# create files
createmany -d $dir/d $nrdirs ||
error "failed to create $nrdirs subdirs in MDT$mdtidx:$dir"
local left=100
local delete=$((nrdirs - left))
+ $LFS df
+ $LFS df -i
+
# for ldiskfs the nlink count should be 1, but this is OSD specific
# and so this is listed for informational purposes only
echo "nlink before: $(stat -c %h $dir), created before: $nrdirs"
local after=$(stat -c %h $dir)
[[ $after -gt 2 ]] && error "nlink after: $after > 2" ||
echo "nlink after: $after"
+
+ cleanup_print_lfs_df
}
run_test 51b "exceed 64k subdirectory nlink limit on create, verify unlink"
echo -n $size
}
+fs_inode_ksize() {
+ local facet=${1:-$SINGLEMDS}
+ local fstype=$(facet_fstype $facet)
+ local size=0
+ case $fstype in
+ ldiskfs) size=4;; # ~4KB per inode
+ zfs) size=11;; # 10 to 11KB per inode
+ esac
+
+ echo -n $size
+}
+
check_gss_daemon_nodes() {
local list=$1
dname=$2