diff mbox

[v2,12/14] generic/204: use available blocks to determine the number of files to create

Message ID 20171103042619.GB1233@magnolia (mailing list archive)
State New, archived
Headers show

Commit Message

Darrick J. Wong Nov. 3, 2017, 4:26 a.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Use the available block count to compute the number of files we think
we can create, rather than hardcoding a particular size.  This fixes
the ENOSPC failures for xfs filesystems with rmap/reflink support.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 tests/generic/204 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Eryu Guan Nov. 4, 2017, 5:25 a.m. UTC | #1
On Thu, Nov 02, 2017 at 09:26:19PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Use the available block count to compute the number of files we think
> we can create, rather than hardcoding a particular size.  This fixes
> the ENOSPC failures for xfs filesystems with rmap/reflink support.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  tests/generic/204 |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/204 b/tests/generic/204
> index 4c203a2..ac417a7 100755
> --- a/tests/generic/204
> +++ b/tests/generic/204
> @@ -69,7 +69,7 @@ _scratch_mount
>  # work out correctly. Space usages is based 22500 files and 1024 reserved blocks
>  # on a 4k block size 256 byte inode size filesystem.
>  resv_blks=1024
> -space=97920000
> +space=$(stat -f -c '%f * %S' $SCRATCH_MNT | $BC_PROG)

Hmm, this regressed test with 512B block size XFS. I'll drop it for now.

Thanks,
Eryu

>  
>  # decrease files for inode size.
>  #	22500 * (256 + 4k) = ~97MB
--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/generic/204 b/tests/generic/204
index 4c203a2..ac417a7 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -69,7 +69,7 @@  _scratch_mount
 # work out correctly. Space usages is based 22500 files and 1024 reserved blocks
 # on a 4k block size 256 byte inode size filesystem.
 resv_blks=1024
-space=97920000
+space=$(stat -f -c '%f * %S' $SCRATCH_MNT | $BC_PROG)
 
 # decrease files for inode size.
 #	22500 * (256 + 4k) = ~97MB