From patchwork Mon Oct 24 06:13:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 13016708 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96440FA373D for ; Mon, 24 Oct 2022 06:15:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229562AbiJXGPd (ORCPT ); Mon, 24 Oct 2022 02:15:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbiJXGOp (ORCPT ); Mon, 24 Oct 2022 02:14:45 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB3D760CBF for ; Sun, 23 Oct 2022 23:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666592048; h=from:from:reply-to:subject:subject: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=RswB510iQnL61XzrmzYzoOFaNhqJWXGUpuiXL9j46Jc=; b=AECQHPnMP9LH5qYO0oboaPLqdVX411mjtG22I1iJhKkeL8V5Q9rI/iGZE5FGXJqfj6gztN PqpfZTS8VWf/SZGHYpTuqITJa+jpinkCjuDgVoE8pKqP3VECnKwBOADF8V660AlKj8NFBm gZm9z62E+gSgPRxxpiNyQTEyhMH+FvQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-618-udukxtUXM5m9tNaSxq2Msg-1; Mon, 24 Oct 2022 02:14:06 -0400 X-MC-Unique: udukxtUXM5m9tNaSxq2Msg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0121A1010428; Mon, 24 Oct 2022 06:14:06 +0000 (UTC) Received: from fedora34.. (unknown [10.66.146.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 61B5C2022EA4; Mon, 24 Oct 2022 06:14:01 +0000 (UTC) From: Yi Zhang To: shinichiro.kawasaki@wdc.com, chaitanyak@nvidia.com Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 1/3] common/xfs: set the minimal log size 64m during mkfs.xfs Date: Mon, 24 Oct 2022 14:13:17 +0800 Message-Id: <20221024061319.1133470-2-yi.zhang@redhat.com> In-Reply-To: <20221024061319.1133470-1-yi.zhang@redhat.com> References: <20221024061319.1133470-1-yi.zhang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Update to use the new minimum xfs log size 64MB which introudced from xfsprogs v5.19.0: $ mkfs.xfs -l size=32m -f /dev/nvme0n1 Log size must be at least 64MB. Usage: mkfs.xfs /* blocksize */ [-b size=num] /* config file */ [-c options=xxx] /* metadata */ [-m crc=0|1,finobt=0|1,uuid=xxx,rmapbt=0|1,reflink=0|1, inobtcount=0|1,bigtime=0|1] /* data subvol */ [-d agcount=n,agsize=n,file,name=xxx,size=num, (sunit=value,swidth=value|su=num,sw=num|noalign), sectsize=num /* force overwrite */ [-f] /* inode size */ [-i perblock=n|size=num,maxpct=n,attr=0|1|2, projid32bit=0|1,sparse=0|1,nrext64=0|1] /* no discard */ [-K] /* log subvol */ [-l agnum=n,internal,size=num,logdev=xxx,version=n sunit=value|su=num,sectsize=num,lazy-count=0|1] /* label */ [-L label (maximum 12 characters)] /* naming */ [-n size=num,version=2|ci,ftype=0|1] /* no-op info only */ [-N] /* prototype file */ [-p fname] /* quiet */ [-q] /* realtime subvol */ [-r extsize=num,size=num,rtdev=xxx] /* sectorsize */ [-s size=num] /* version */ [-V] devicename is required unless -d name=xxx is given. is xxx (bytes), xxxs (sectors), xxxb (fs blocks), xxxk (xxx KiB), xxxm (xxx MiB), xxxg (xxx GiB), xxxt (xxx TiB) or xxxp (xxx PiB). is xxx (512 byte blocks). Signed-off-by: Yi Zhang --- common/xfs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/xfs b/common/xfs index 210c924..846a5ef 100644 --- a/common/xfs +++ b/common/xfs @@ -16,7 +16,7 @@ _xfs_mkfs_and_mount() { mkdir -p "${mount_dir}" umount "${mount_dir}" - mkfs.xfs -l size=32m -f "${bdev}" + mkfs.xfs -l size=64m -f "${bdev}" mount "${bdev}" "${mount_dir}" } From patchwork Mon Oct 24 06:13:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 13016709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2D6C7C38A2D for ; Mon, 24 Oct 2022 06:15:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbiJXGPi (ORCPT ); Mon, 24 Oct 2022 02:15:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230395AbiJXGO7 (ORCPT ); Mon, 24 Oct 2022 02:14:59 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B7276113A for ; Sun, 23 Oct 2022 23:14:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666592057; h=from:from:reply-to:subject:subject: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=pantO3zHCuj/0sWwfClVRGHvq4EWW3HMQyB2NqJ2iXQ=; b=Lcu1AdXoxAPY5CBuIfxnVO8qrpOAvVlbeb5vMEzz4OxanQylKrT6/gXBC6H6WaUFjjDZZJ udD5zEh9hSUKR9iPXbhg0lMORGejcnjG/6uc0ngUDdgiIXCbK/IkTSNdN6R0JlQJTxeHoL aEchaqaYdFggJvMNO3kcZaHBbXguU28= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-99-2tP-MINfPZODaPehndilYA-1; Mon, 24 Oct 2022 02:14:13 -0400 X-MC-Unique: 2tP-MINfPZODaPehndilYA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B5B3A185A792; Mon, 24 Oct 2022 06:14:12 +0000 (UTC) Received: from fedora34.. (unknown [10.66.146.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 19C472024CCA; Mon, 24 Oct 2022 06:14:10 +0000 (UTC) From: Yi Zhang To: shinichiro.kawasaki@wdc.com, chaitanyak@nvidia.com Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 2/3] common/rc: add one function to get test dev size in mb Date: Mon, 24 Oct 2022 14:13:18 +0800 Message-Id: <20221024061319.1133470-3-yi.zhang@redhat.com> In-Reply-To: <20221024061319.1133470-1-yi.zhang@redhat.com> References: <20221024061319.1133470-1-yi.zhang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Signed-off-by: Yi Zhang --- common/rc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/rc b/common/rc index e490041..847be1b 100644 --- a/common/rc +++ b/common/rc @@ -324,6 +324,14 @@ _get_pci_parent_from_blkdev() { tail -2 | head -1 } +_get_test_dev_size_mb() { + local test_dev_sz + test_dev_sz=$(blockdev --getsize64 "$TEST_DEV") + + echo $((test_dev_sz / 1024 / 1024)) + +} + _require_test_dev_in_hotplug_slot() { local parent parent="$(_get_pci_parent_from_blkdev)" From patchwork Mon Oct 24 06:13:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Zhang X-Patchwork-Id: 13016710 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDD3CC38A2D for ; Mon, 24 Oct 2022 06:15:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230395AbiJXGPm (ORCPT ); Mon, 24 Oct 2022 02:15:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbiJXGPK (ORCPT ); Mon, 24 Oct 2022 02:15:10 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61DAEF1A for ; Sun, 23 Oct 2022 23:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666592066; h=from:from:reply-to:subject:subject: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=M0gXq1Lc71bTwl8oDci+aZ7NB8vliFVN2WVxtP9Rj4k=; b=QxwjtPPOEb+81PG5SALUw9EbX/7GCLjpBK4hxcneZct5xrSMLVuD9Lo7Kwb76tRrwy04/s yAiF7Czx9bGl5b02VHGPK8rWhAYL7joQXjW8hH5kRkzSMu1mUwxxM3NQWBj18xKzmhWDnD tv9IiiHAPP3MhYgYviAoCxBJVueUPAk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-518-H4MDlhpiP7y4DM5yEBu5mw-1; Mon, 24 Oct 2022 02:14:22 -0400 X-MC-Unique: H4MDlhpiP7y4DM5yEBu5mw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4FB403C0D180; Mon, 24 Oct 2022 06:14:22 +0000 (UTC) Received: from fedora34.. (unknown [10.66.146.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id AB8CE2028E94; Mon, 24 Oct 2022 06:14:20 +0000 (UTC) From: Yi Zhang To: shinichiro.kawasaki@wdc.com, chaitanyak@nvidia.com Cc: linux-block@vger.kernel.org Subject: [PATCH blktests 3/3] common/xfs: update _xfs_run_fio_verify_io to accept the size parameter Date: Mon, 24 Oct 2022 14:13:19 +0800 Message-Id: <20221024061319.1133470-4-yi.zhang@redhat.com> In-Reply-To: <20221024061319.1133470-1-yi.zhang@redhat.com> References: <20221024061319.1133470-1-yi.zhang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org This commit alo updated nvme/012 nvme/013 nvme/035 to pass the size parameter to _xfs_run_fio_verify_io Signed-off-by: Yi Zhang --- common/xfs | 3 ++- tests/nvme/012 | 2 +- tests/nvme/013 | 2 +- tests/nvme/035 | 9 ++++++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/common/xfs b/common/xfs index 846a5ef..2c5d961 100644 --- a/common/xfs +++ b/common/xfs @@ -23,10 +23,11 @@ _xfs_mkfs_and_mount() { _xfs_run_fio_verify_io() { local mount_dir="/mnt/blktests" local bdev=$1 + local sz=$2 _xfs_mkfs_and_mount "${bdev}" "${mount_dir}" >> "${FULL}" 2>&1 - _run_fio_verify_io --size=950m --directory="${mount_dir}/" + _run_fio_verify_io --size="$sz" --directory="${mount_dir}/" umount "${mount_dir}" >> "${FULL}" 2>&1 rm -fr "${mount_dir}" diff --git a/tests/nvme/012 b/tests/nvme/012 index c9d2438..e60082c 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" + _xfs_run_fio_verify_io "/dev/${nvmedev}n1" "900m" _nvme_disconnect_subsys "${subsys_name}" diff --git a/tests/nvme/013 b/tests/nvme/013 index 265b696..9d60a7d 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" + _xfs_run_fio_verify_io "/dev/${nvmedev}n1" "900m" _nvme_disconnect_subsys "${subsys_name}" diff --git a/tests/nvme/035 b/tests/nvme/035 index ee78a75..31de0d1 100755 --- a/tests/nvme/035 +++ b/tests/nvme/035 @@ -21,14 +21,21 @@ test_device() { local ctrldev local nsdev local port + local test_dev_sz echo "Running ${TEST_NAME}" _setup_nvmet port=$(_nvmet_passthru_target_setup "${subsys}") nsdev=$(_nvmet_passthru_target_connect "${nvme_trtype}" "${subsys}") + test_dev_sz=$(_get_test_dev_size_mb) - _xfs_run_fio_verify_io "${nsdev}" + if (( "$test_dev_sz" < 1024 )); then + echo "Test dev: $TEST_DEV should at leat 1024m" + return 1 + + fi + _xfs_run_fio_verify_io "${nsdev}" "900m" _nvme_disconnect_subsys "${subsys}" _nvmet_passthru_target_cleanup "${port}" "${subsys}"