Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1810269rwr; Thu, 20 Apr 2023 23:09:03 -0700 (PDT) X-Google-Smtp-Source: AKy350Z7alPyY/nJ/pToBoe8FNK9zfs1Gfg6G9R83CdFGEeDlfuCj3cfQol2MDm7CSDYgXw7Pbon X-Received: by 2002:a05:6a20:4323:b0:ef:7b11:3ae with SMTP id h35-20020a056a20432300b000ef7b1103aemr5821629pzk.52.1682057343050; Thu, 20 Apr 2023 23:09:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682057343; cv=none; d=google.com; s=arc-20160816; b=EcCnYf6ocii87M9a4sfFxYdwJYrBhmR/bqWUih6+C8GanllC5g/Dgd+9v61ChKx+09 OFYjlRL59WqOlVEeG2alcMfZVm8YuV7rR1FidVwnx8KMdWoWRtliucWyoy7LoZOckCPP 09IzMlqqC3IactLKeYXJHGtQgYxnmbtWTzX4JLrC0mAM97H7ChFAp3BAyf7k5x6tBUtB pI0EO913KKpiHsVg/KMtLhzegTlZeBLw4iqv/k3/pm8p7/FX9IcHajjn1IHE5X99I+5u BCNtsovgoWlLsOe0RgFBpMSX3Iz7E1yTA+lPZzf9XC7XeEAjJBiIvSt3SwvGK4kejyge gisw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=Piq20gmCbu/sfasT+BJykUx1CpQBqc0w9RDrikSeIvU=; b=Oscd5A7FXMzaN8qbfrJ08eOU5AtemE2RB48EXsTr8v2UyF6hS+f3Y9eu5cACpaO80e 66OGUacwHQ+EyEXCWxx91hk18WyZIqHp3MywjtqEm2eudtLFMi+Tz5N3V7XDQC39m8Bl yfRNED3sKPKm7cSlfaZK02Kd/3aDEF7Scpp7GvKYbGCPtxopKYj+GWuciu8F7JC0h1DH Jfoe8zmmj/jwT2pMLwXgpAwN6ji4albLP2rhuKJWGL+zwYxfJxVk5Chr/2fzXCNu5otM qghaaetrdWYZ5wniHGsAQBZm0JeWehVCi/y8c8JjNzcJWFdKla0LEgTmyuJz2kNVzd37 7nVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=HLT8Ja5M; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org ([23.128.96.18]) by mx.google.com with ESMTP id i28-20020a63221c000000b0051b85b5a3d1si3362259pgi.127.2023.04.20.23.08.49; Thu, 20 Apr 2023 23:09:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=HLT8Ja5M; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233796AbjDUGGJ (ORCPT + 99 others); Fri, 21 Apr 2023 02:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233767AbjDUGFy (ORCPT ); Fri, 21 Apr 2023 02:05:54 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CB656E92; Thu, 20 Apr 2023 23:05:49 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B0EA91FDDF; Fri, 21 Apr 2023 06:05:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1682057117; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Piq20gmCbu/sfasT+BJykUx1CpQBqc0w9RDrikSeIvU=; b=HLT8Ja5MNTGaFTfOk3Pl7fzS2fkTGyqMim0UtWnJfwx4W0wMFVesGi94EVYD9cJSwYNGfE MEBBtiX5zqoaDxnFI23RHSMvo2+VjdDRStOru7jUoKg60r3DtrZh6dQAZscLuQdJMtdIrP 43fBZo+26MTt/VMZO//X6WsRVIE7FU8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1682057117; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Piq20gmCbu/sfasT+BJykUx1CpQBqc0w9RDrikSeIvU=; b=v1kEqw5z6Bt0MQ0mGl4DaaDdmldtIaXqdn7cEdJVh41Yg1Xuh93MjYqPX6+9I0Q16hW3Q2 7ZmELlOgrL2BFOAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A32371390E; Fri, 21 Apr 2023 06:05:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id +tHUJ50nQmRuZgAAMHmgww (envelope-from ); Fri, 21 Apr 2023 06:05:17 +0000 From: Daniel Wagner To: linux-nvme@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Chaitanya Kulkarni , Shin'ichiro Kawasaki , Daniel Wagner Subject: [PATCH REPOST blktests v2 3/9] common-xfs: Make size argument optional for _xfs_run_fio_verify_io Date: Fri, 21 Apr 2023 08:04:59 +0200 Message-Id: <20230421060505.10132-4-dwagner@suse.de> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230421060505.10132-1-dwagner@suse.de> References: <20230421060505.10132-1-dwagner@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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}" 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}" _nvme_disconnect_subsys "${subsys}" _nvmet_passthru_target_cleanup "${port}" "${subsys}" -- 2.40.0