For machines with big numbers of CPUs the count of files to create
is more than available inodes. So, the sanity::test_124b fails.
Test-Parameters: trivial
Change-Id: I544efbc0da7acc99f4f60010cb404d234b1db964
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/23543
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
NR=$(($(default_lru_size)*20))
if [[ $NR -gt $LIMIT ]]; then
- log "Limit lock number by $LIMIT locks"
- NR=$LIMIT
- fi
- lru_resize_disable mdc
- test_mkdir -p $DIR/$tdir/disable_lru_resize ||
+ log "Limit lock number by $LIMIT locks"
+ NR=$LIMIT
+ fi
+
+ IFree=$(mdsrate_inodes_available)
+ if [ $IFree -lt $NR ]; then
+ log "Limit lock number by $IFree inodes"
+ NR=$IFree
+ fi
+
+ lru_resize_disable mdc
+ test_mkdir -p $DIR/$tdir/disable_lru_resize ||
error "failed to create $DIR/$tdir/disable_lru_resize"
createmany -o $DIR/$tdir/disable_lru_resize/f $NR