From: Petr Vorel <pvorel@suse.cz>
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v3 2/2] Add test for data integrity over NFS
Date: Thu, 5 Dec 2024 12:10:14 +0100 [thread overview]
Message-ID: <20241205111014.GB28204@pevik> (raw)
In-Reply-To: <20241204172312.34099-2-mdoucha@suse.cz>
> Add NFS test which checks data integrity of random writes into a file,
> with both buffered and direct I/O.
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
> Changes since v1: Added TST_TIMEOUT
> Changes since v2: Force NFS blocksize to the underlying FS blocksize
> By default, NFS uses very large blocksize (up to 1MB) to optimize network
> communication. For the FS integrity test this means a significant slowdown
> because the size of the test file and I/O operations increase with
> blocksize. Autodetect the blocksize of the underlying filesystem and force
> the same value during NFS mount to speed things up.
> The TST_TIMEOUT value is calculated as worst-case scenario for 64KB
> blocksize. On reasonably modern x86_64 machines, the new tests take about
> 6 minutes to complete in total (with Btrfs, Ext4 and XFS being tested).
+1. I also did some testing. BTW TST_TIMEOUT is for single filesystem, thus 11
min is really safe enough even for slow machines like emulated risc-v.
> +++ b/testcases/network/nfs/nfs_stress/nfs10.sh
> @@ -0,0 +1,47 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +# Copyright (C) 2024 SUSE LLC <mdoucha@suse.cz>
> +#
> +# DESCRIPTION: Verify data integrity over NFS, with and without O_DIRECT
> +
> +TST_CNT=4
> +TST_SETUP="nfs10_setup"
> +TST_TESTFUNC="do_test"
> +TST_DEVICE_SIZE=1024
> +TST_TIMEOUT=660
> +
> +nfs10_setup()
> +{
> + local bsize=$(stat -f -c %s .)
> +
> + bsize=$(( $bsize < 1024 ? 1024 : $bsize ))
nit: this would work if stat is not installed (minimal systems) or fails for
some reason:
if [ -z "$bsize" ] || [ "$bsize" -lt 1024 ]; then
bsize=1024
fi
If you agree, I can change it during merge.
Otherwise LGTM.
Thank you!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> + NFS_MOUNT_OPTS="rsize=$bsize,wsize=$bsize"
> + nfs_setup
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2024-12-05 11:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 17:23 [LTP] [PATCH v3 1/2] nfs_lib.sh: Add support for extra NFS mount options Martin Doucha
2024-12-04 17:23 ` [LTP] [PATCH v3 2/2] Add test for data integrity over NFS Martin Doucha
2024-12-05 11:10 ` Petr Vorel [this message]
2024-12-05 12:25 ` Martin Doucha
2024-12-06 14:52 ` Petr Vorel
2024-12-06 9:02 ` Petr Vorel
2024-12-05 10:34 ` [LTP] [PATCH v3 1/2] nfs_lib.sh: Add support for extra NFS mount options Petr Vorel
2024-12-05 12:11 ` Martin Doucha
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=20241205111014.GB28204@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox