common.attr: get block size of test fs not root fs
[xfstests-dev.git] / common.attr
index 0f1e7891386192517a706ff6f0fbf2030f52d795..6e2c004bc0cbee14d37201d26a349ddcce0d8598 100644 (file)
@@ -187,7 +187,7 @@ _sort_getfattr_output()
 if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" ]; then
        MAX_ATTRS=1000
 else # Assume max ~1 block of attrs
-       BLOCK_SIZE=`stat -f $TEST_DEV | grep "Block size" | cut -d " " -f3`
+       BLOCK_SIZE=`stat -f $TEST_DIR | grep "Block size" | cut -d " " -f3`
        # user.attribute_XXX="value.XXX" is about 32 bytes; leave some overhead
        let MAX_ATTRS=$BLOCK_SIZE/40
 fi
@@ -198,7 +198,7 @@ export MAX_ATTRS
 if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
        MAX_ATTRVAL_SIZE=64
 else # Assume max ~1 block of attrs
-       BLOCK_SIZE=`stat -f $TEST_DEV | grep "Block size" | cut -d " " -f3`
+       BLOCK_SIZE=`stat -f $TEST_DIR | grep "Block size" | cut -d " " -f3`
        # leave a little overhead
        let MAX_ATTRVAL_SIZE=$BLOCK_SIZE-256
 fi