lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <le6qqxhkbdaacsifz4b3mody53gllg4rzhowm2j62y56y56y6k@pmlukhvwjw24>
Date:   Fri, 28 Apr 2023 02:59:02 +0000
From:   Shinichiro Kawasaki <shinichiro.kawasaki@....com>
To:     Daniel Wagner <dwagner@...e.de>
CC:     "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        Chaitanya Kulkarni <kch@...dia.com>,
        Shin'ichiro Kawasaki <shinichiro@...tmail.com>
Subject: Re: [PATCH REPOST blktests v2 3/9] common-xfs: Make size argument
 optional for _xfs_run_fio_verify_io

On Apr 21, 2023 / 08:04, Daniel Wagner wrote:
> Make the size argument optional by reading the filesystem info. The
> caller doesn't have to guess (or calculate) how big the max IO size.
> The log data structure of XFS is reducing the capacity.
> 
> Signed-off-by: Daniel Wagner <dwagner@...e.de>
> ---
>  common/xfs     | 6 ++++++
>  tests/nvme/012 | 2 +-
>  tests/nvme/013 | 2 +-
>  tests/nvme/035 | 2 +-
>  4 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/common/xfs b/common/xfs
> index 2c5d96164ac1..ec35599e017b 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -27,6 +27,12 @@ _xfs_run_fio_verify_io() {
>  
>  	_xfs_mkfs_and_mount "${bdev}" "${mount_dir}" >> "${FULL}" 2>&1
>  
> +	if [[ -z "${sz}" ]]; then
> +		local avail
> +		avail="$(df --output=avail "${mount_dir}" | awk 'NR==2 {print $1}')"
> +		sz="$(printf "%d" $((avail / 1024 - 1 )))m"
> +	fi
> +
>  	_run_fio_verify_io --size="$sz" --directory="${mount_dir}/"
>  
>  	umount "${mount_dir}" >> "${FULL}" 2>&1
> diff --git a/tests/nvme/012 b/tests/nvme/012
> index e60082c2e751..c9d24388306d 100755
> --- a/tests/nvme/012
> +++ b/tests/nvme/012
> @@ -44,7 +44,7 @@ test() {
>  	cat "/sys/block/${nvmedev}n1/uuid"
>  	cat "/sys/block/${nvmedev}n1/wwid"
>  
> -	_xfs_run_fio_verify_io "/dev/${nvmedev}n1" "900m"
> +	_xfs_run_fio_verify_io "/dev/${nvmedev}n1"
>  
>  	_nvme_disconnect_subsys "${subsys_name}"
>  
> diff --git a/tests/nvme/013 b/tests/nvme/013
> index 9d60a7df4577..265b6968fd34 100755
> --- a/tests/nvme/013
> +++ b/tests/nvme/013
> @@ -41,7 +41,7 @@ test() {
>  	cat "/sys/block/${nvmedev}n1/uuid"
>  	cat "/sys/block/${nvmedev}n1/wwid"
>  
> -	_xfs_run_fio_verify_io "/dev/${nvmedev}n1" "900m"
> +	_xfs_run_fio_verify_io "/dev/${nvmedev}n1"
>  
>  	_nvme_disconnect_subsys "${subsys_name}"
>

As for nvme/012 and nvme/013, I observed the I/O size changes from 900m to 920m
with this patch. This condition looks better for testing point of view. Good.

> diff --git a/tests/nvme/035 b/tests/nvme/035
> index eb1024edddbf..8b485bc8e682 100755
> --- a/tests/nvme/035
> +++ b/tests/nvme/035
> @@ -32,7 +32,7 @@ test_device() {
>  	port=$(_nvmet_passthru_target_setup "${subsys}")
>  	nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${subsys}")
>  
> -	_xfs_run_fio_verify_io "${nsdev}" "900m"
> +	_xfs_run_fio_verify_io "${nsdev}"

On the other hand, this change for nvme/035 does not look good. It runs the
test on TEST_DEV, which may take very long time without TIMEOUT config.

>  
>  	_nvme_disconnect_subsys "${subsys}"
>  	_nvmet_passthru_target_cleanup "${port}" "${subsys}"
> -- 
> 2.40.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ