From: Bill O'Donnell <billodo@redhat.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: zlang@redhat.com, linux-xfs@vger.kernel.org,
fstests@vger.kernel.org, guan@eryu.me
Subject: Re: [PATCH 1/3] xfs/108: allow slightly higher block usage
Date: Tue, 6 Jun 2023 20:51:50 -0500 [thread overview]
Message-ID: <ZH/itoJAt/5SEbvi@redhat.com> (raw)
In-Reply-To: <168609054837.2590724.6227482661383718314.stgit@frogsfrogsfrogs>
On Tue, Jun 06, 2023 at 03:29:08PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> With pmem and fsdax enabled, I occasionally see this test fail on XFS:
>
> Mode: (0600/-rw-------) Uid: (1) Gid: (2)
> Disk quotas for User #1 (1)
> Filesystem Blocks Quota Limit Warn/Time Mounted on
> -SCRATCH_DEV 48M 0 0 00 [------] SCRATCH_MNT
> +SCRATCH_DEV 48.0M 0 0 00 [------] SCRATCH_MNT
> Disk quotas for User #1 (1)
> Filesystem Files Quota Limit Warn/Time Mounted on
> SCRATCH_DEV 3 0 0 00 [------] SCRATCH_MNT
>
> The cause of this failure is fragmentation in the file mappings that
> results in a block mapping structure that no longer fits in the inode.
> Hence the block usage is 49160K instead of the 49152K that was written.
> Use some fugly sed duct tape to make this test accomodate this
> possiblity.
>
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
LGTM.
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
> ---
> tests/xfs/108 | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
>
> diff --git a/tests/xfs/108 b/tests/xfs/108
> index 4607000544..8593edbdd2 100755
> --- a/tests/xfs/108
> +++ b/tests/xfs/108
> @@ -32,6 +32,14 @@ test_files()
> done
> }
>
> +# Some filesystem configurations fragment the file mapping more than others,
> +# which leads to the quota block counts being slightly higher than the 48MB
> +# written.
> +filter_quota()
> +{
> + sed -e 's/48\.[01]M/48M/g' | _filter_quota
> +}
> +
> test_accounting()
> {
> echo "### some controlled buffered, direct and mmapd IO (type=$type)"
> @@ -49,9 +57,9 @@ test_accounting()
> $here/src/lstat64 $file | head -3 | _filter_scratch
> done
> $XFS_IO_PROG -c syncfs $SCRATCH_MNT
> - $XFS_QUOTA_PROG -c "quota -hnb -$type $id" $QARGS | _filter_quota
> - $XFS_QUOTA_PROG -c "quota -hni -$type $id" $QARGS | _filter_quota
> - $XFS_QUOTA_PROG -c "quota -hnr -$type $id" $QARGS | _filter_quota
> + $XFS_QUOTA_PROG -c "quota -hnb -$type $id" $QARGS | filter_quota
> + $XFS_QUOTA_PROG -c "quota -hni -$type $id" $QARGS | filter_quota
> + $XFS_QUOTA_PROG -c "quota -hnr -$type $id" $QARGS | filter_quota
> }
>
> export MOUNT_OPTIONS="-opquota"
>
next prev parent reply other threads:[~2023-06-07 1:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 22:29 [PATCHSET 0/3] fstests: random fixes for v2023.05.28 Darrick J. Wong
2023-06-06 22:29 ` [PATCH 1/3] xfs/108: allow slightly higher block usage Darrick J. Wong
2023-06-07 1:51 ` Bill O'Donnell [this message]
2023-06-06 22:29 ` [PATCH 2/3] xfs/155: discard stderr when checking for NEEDSREPAIR Darrick J. Wong
2023-06-08 9:12 ` Andrey Albershteyn
2023-06-06 22:29 ` [PATCH 3/3] xfs/155: improve logging in this test Darrick J. Wong
2023-06-07 2:24 ` Bill O'Donnell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZH/itoJAt/5SEbvi@redhat.com \
--to=billodo@redhat.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.