Fix mdsrate test script to also account in inodes numbers used by
test directories.
r=robert.read
$LFS setstripe $BASEDIR -c -1
get_stripe $BASEDIR
$LFS setstripe $BASEDIR -c -1
get_stripe $BASEDIR
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
$LFS setstripe $BASEDIR -i 0 -c 1
get_stripe $BASEDIR
$LFS setstripe $BASEDIR -i 0 -c 1
get_stripe $BASEDIR
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
$LFS setstripe $BASEDIR -c 1
get_stripe $BASEDIR
$LFS setstripe $BASEDIR -c 1
get_stripe $BASEDIR
-IFree=$(inodes_available)
+IFree=$(($(mdsrate_inodes_available) - NUM_DIRS))
if [ $IFree -lt $((NUM_FILES * NUM_DIRS)) ]; then
NUM_FILES=$((IFree / NUM_DIRS))
fi
if [ $IFree -lt $((NUM_FILES * NUM_DIRS)) ]; then
NUM_FILES=$((IFree / NUM_DIRS))
fi
$LFS setstripe $BASEDIR -c 1
get_stripe $BASEDIR
$LFS setstripe $BASEDIR -c 1
get_stripe $BASEDIR
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
$LFS setstripe $BASEDIR -c -1
get_stripe $BASEDIR
$LFS setstripe $BASEDIR -c -1
get_stripe $BASEDIR
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
$LFS setstripe $BASEDIR -i 0 -c 1
get_stripe $BASEDIR
$LFS setstripe $BASEDIR -i 0 -c 1
get_stripe $BASEDIR
-IFree=$(inodes_available)
+IFree=$(mdsrate_inodes_available)
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
if [ $IFree -lt $NUM_FILES ]; then
NUM_FILES=$IFree
fi
+mdsrate_inodes_available () {
+ echo $(($(inodes_available) - 1))
+}
+
# reset llite stat counters
clear_llite_stats(){
lctl set_param -n llite.*.stats 0
# reset llite stat counters
clear_llite_stats(){
lctl set_param -n llite.*.stats 0