summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1a8c46a)
Account for inode size for 11KB for ZFS (and 4KB for LDISKFS) when
checking space on MDC during sanity test_51b.
Do lfs df and lfs df -i on completion of sanity/test_51b. This helps
determine the correct inode size accounting.
Test-Parameters: trivial mdsfilesystemtype=zfs mdtfilesystemtype=zfs ostfilesystemtype=zfs testlist=sanity envdefinitions=SLOW=yes mdscount=1
Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Icd8e0d55a89d8e3d22bbb1b2ff206e238a7262ac
Reviewed-on: http://review.whamcloud.com/21821
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
if [ $(facet_fstype $SINGLEMDS) = "zfs" ]; then
# bug number for skipped test: LU-4536 LU-1957
ALWAYS_EXCEPT="$ALWAYS_EXCEPT 65ic 180"
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"
}
run_test 51a "special situations: split htree with empty entry =="
}
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
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)
# 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
[[ $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"
# create files
createmany -d $dir/d $nrdirs ||
error "failed to create $nrdirs subdirs in MDT$mdtidx:$dir"
local left=100
local delete=$((nrdirs - left))
local left=100
local delete=$((nrdirs - left))
# 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"
# 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"
local after=$(stat -c %h $dir)
[[ $after -gt 2 ]] && error "nlink after: $after > 2" ||
echo "nlink after: $after"
}
run_test 51b "exceed 64k subdirectory nlink limit on create, verify unlink"
}
run_test 51b "exceed 64k subdirectory nlink limit on create, verify unlink"
+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
check_gss_daemon_nodes() {
local list=$1
dname=$2