From patchwork Wed Nov 11 00:42:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11895931 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EF10921 for ; Wed, 11 Nov 2020 00:43:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B78E221E9 for ; Wed, 11 Nov 2020 00:43:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="pziv/WKb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732213AbgKKAnQ (ORCPT ); Tue, 10 Nov 2020 19:43:16 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:34280 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727275AbgKKAnQ (ORCPT ); Tue, 10 Nov 2020 19:43:16 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0ZFbG016794; Wed, 11 Nov 2020 00:43:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=LlQIkWrl4lGTHdvVLFEfeOVtlqYiQ7ENoW54OAsj6LA=; b=pziv/WKbQi+VLgISfmC2E7BVWH7JwckPM2NWO5wUEEFTjkyC+jXOAD5nZwQZcvRHjxj+ RNx5sFmQzZrSha/8ICbuDDlZVg/56Kvk0KRR6ttdawD4f/iAGn2yQf2fpmq2rUKYQ9k6 dYhxN2d8u4gvOiszk00qhtIo7CNEzACF7F4rd+xE8DD5X+CcXbxnzoPAHmCvBwFhWtIh KOTrSYTU9rLwszw4PMmSTYxRW/djDsS5u4ZqtaCqRc/yAaIAOs9MQiiqyfrbDc/Cm06A 0VBoWdjpUcbHe9IeA5XaCTeXP0fu5UFil7mqBHUkFxVSTOGcoFbG7eMhduBw8dFAz0be 5w== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 34p72emv3n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Nov 2020 00:43:14 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0VDZC095304; Wed, 11 Nov 2020 00:43:13 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 34p55patg8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Nov 2020 00:43:13 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0AB0hCnK013514; Wed, 11 Nov 2020 00:43:12 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Nov 2020 16:43:00 -0800 Subject: [PATCH 1/6] common: extract rt extent size for _get_file_block_size From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 10 Nov 2020 16:42:59 -0800 Message-ID: <160505537946.1388647.16793832491247950385.stgit@magnolia> In-Reply-To: <160505537312.1388647.14788379902518687395.stgit@magnolia> References: <160505537312.1388647.14788379902518687395.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 phishscore=0 priorityscore=1501 spamscore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong _get_file_block_size is intended to return the size (in bytes) of the fundamental allocation unit for a file. This is required for remapping operations like fallocate and reflink, which can only operate on allocation units. Since the XFS realtime volume can be configure for allocation units larger than 1 fs block, we need to factor that in here. Note that ext* with bigalloc does not allocations to be aligned to the cluster size, so no update is needed there. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R --- common/rc | 13 ++++++++++--- common/xfs | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/common/rc b/common/rc index 65ebfe20..019b9b2b 100644 --- a/common/rc +++ b/common/rc @@ -3975,11 +3975,18 @@ _get_file_block_size() echo "Missing mount point argument for _get_file_block_size" exit 1 fi - if [ "$FSTYP" = "ocfs2" ]; then + + case "$FSTYP" in + "ocfs2") stat -c '%o' $1 - else + ;; + "xfs") + _xfs_get_file_block_size $1 + ;; + *) _get_block_size $1 - fi + ;; + esac } # Get the minimum block size of an fs. diff --git a/common/xfs b/common/xfs index 79dab058..3f5c14ba 100644 --- a/common/xfs +++ b/common/xfs @@ -174,6 +174,26 @@ _scratch_mkfs_xfs() return $mkfs_status } +# Get the size of an allocation unit of a file. Normally this is just the +# block size of the file, but for realtime files, this is the realtime extent +# size. +_xfs_get_file_block_size() +{ + local path="$1" + + if ! ($XFS_IO_PROG -c "stat -v" "$path" 2>&1 | egrep -q '(rt-inherit|realtime)'); then + _get_block_size "$path" + return + fi + + # Otherwise, call xfs_info until we find a mount point or the root. + path="$(readlink -m "$path")" + while ! $XFS_INFO_PROG "$path" &>/dev/null && [ "$path" != "/" ]; do + path="$(dirname "$path")" + done + $XFS_INFO_PROG "$path" | grep realtime | sed -e 's/^.*extsz=\([0-9]*\).*$/\1/g' +} + # xfs_check script is planned to be deprecated. But, we want to # be able to invoke "xfs_check" behavior in xfstests in order to # maintain the current verification levels. From patchwork Wed Nov 11 00:43:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11895935 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 535321668 for ; Wed, 11 Nov 2020 00:43:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 30135221E9 for ; Wed, 11 Nov 2020 00:43:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="qKKqR1E4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732233AbgKKAn1 (ORCPT ); Tue, 10 Nov 2020 19:43:27 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:55176 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727275AbgKKAnZ (ORCPT ); Tue, 10 Nov 2020 19:43:25 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0Xrr2040621; Wed, 11 Nov 2020 00:43:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=HU4YD3virhhB4KWCTgXqdQzjB92zkoRForXhRqWUoHU=; b=qKKqR1E4b945YxBDml+ANixkyvdFzgXL9DJkQ250tGKf/R11zu3gO3GK4cUXIgWPJaEx nGRNVxyROUfAUZtXKX2Iyn1DKg6Y+uSJgz51whFuXmKI/mlcdsA7Nyi/0xvV34kGYdIQ U9S4jbq8P7amuJyQjLJCnOm5Yr6jFo0bmspu72ynIAeKtGKzCTNxXluWbIMr7UFm10Po BJ3Vvlpy20X2gxppC1H+waX3F/kvdH5cVQePln9FktMj3B63buQlNbQF1qeT9d5A6MfX csyebcEIjWH/G1IYe/uLiJKz3ISfHuqQneObI07fklXkpfiCHiHNXJwF/4RMsM0MjaIX hw== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 34nh3axw1s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Nov 2020 00:43:23 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0V6Za027505; Wed, 11 Nov 2020 00:43:22 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 34qgp7kqes-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Nov 2020 00:43:22 +0000 Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0AB0hM7B000494; Wed, 11 Nov 2020 00:43:22 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Nov 2020 16:43:17 -0800 Subject: [PATCH 2/6] check: run tests in a systemd scope for mandatory test cleanup From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 10 Nov 2020 16:43:16 -0800 Message-ID: <160505539618.1388647.12413009405934961273.stgit@magnolia> In-Reply-To: <160505537312.1388647.14788379902518687395.stgit@magnolia> References: <160505537312.1388647.14788379902518687395.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 mlxscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong TLDR: If systemd is available, run each test in its own temporary systemd scope. This enables the test harness to forcibly clean up all of the test's child processes (if it does not do so itself) so that we can move into the post-test unmount and check cleanly. I frequently run fstests in "low" memory situations (2GB!) to force the kernel to do interesting things. There are a few tests like generic/224 and generic/561 that put processes in the background and occasionally trigger the OOM killer. Most of the time the OOM killer correctly shoots down fsstress or duperemove, but once in a while it's stupid enough to shoot down the test control process (i.e. tests/generic/224) instead. fsstress is still running in the background, and the one process that knew about that is dead. When the control process dies, ./check moves on to the post-test fsck, which fails because fsstress is still running and we can't unmount. After fsck fails, ./check moves on to the next test, which fails because fsstress is /still/ writing to the filesystem and we can't unmount or format. The end result is that that one OOM kill causes cascading test failures, and I have to re-start fstests to see if I get a clean(er) run. So, the solution I present in this patch is to teach ./check to try to run the test script in a systemd scope. If that succeeds, ./check will tell systemd to kill the scope when the test script exits and returns control to ./check. Concretely, this means that systemd creates a new cgroup, stuffs the processes in that cgroup, and when we kill the scope, systemd kills all the processes in that cgroup and deletes the cgroup. The end result is that fstests now has an easy way to ensure that /all/ child processes of a test are dead before we try to unmount the test and scratch devices. I've designed this to be optional, because not everyone does or wants or likes to run systemd, but it makes QA easier. Signed-off-by: Darrick J. Wong --- check | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/check b/check index 5072dd82..83f6fc8b 100755 --- a/check +++ b/check @@ -521,6 +521,12 @@ _expunge_test() return 0 } +# Can we run systemd scopes? +HAVE_SYSTEMD_SCOPES= +systemctl reset-failed "fstests-check" &>/dev/null +systemd-run --quiet --unit "fstests-check" --scope bash -c "exit 77" &> /dev/null +test $? -eq 77 && HAVE_SYSTEMD_SCOPES=yes + # Make the check script unattractive to the OOM killer... OOM_SCORE_ADJ="/proc/self/oom_score_adj" test -w ${OOM_SCORE_ADJ} && echo -1000 > ${OOM_SCORE_ADJ} @@ -528,8 +534,26 @@ test -w ${OOM_SCORE_ADJ} && echo -1000 > ${OOM_SCORE_ADJ} # ...and make the tests themselves somewhat more attractive to it, so that if # the system runs out of memory it'll be the test that gets killed and not the # test framework. +# +# If systemd is available, run the entire test script in a scope so that we can +# kill all subprocesses of the test if it fails to clean up after itself. This +# is essential for ensuring that the post-test unmount succeeds. Note that +# systemd doesn't automatically remove transient scopes that fail to terminate +# when systemd tells them to terminate (e.g. programs stuck in D state when +# systemd sends SIGKILL), so we use reset-failed to tear down the scope. _run_seq() { - bash -c "test -w ${OOM_SCORE_ADJ} && echo 250 > ${OOM_SCORE_ADJ}; exec ./$seq" + local cmd=(bash -c "test -w ${OOM_SCORE_ADJ} && echo 250 > ${OOM_SCORE_ADJ}; exec ./$seq") + + if [ -n "${HAVE_SYSTEMD_SCOPES}" ]; then + local unit="$(systemd-escape "fs$seq").scope" + systemctl reset-failed "${unit}" &> /dev/null + systemd-run --quiet --unit "${unit}" --scope "${cmd[@]}" + res=$? + systemctl stop "${unit}" &> /dev/null + return "${res}" + else + "${cmd[@]}" + fi } _detect_kmemleak From patchwork Wed Nov 11 00:43:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11895939 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6D80C921 for ; Wed, 11 Nov 2020 00:43:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 498BE21D46 for ; Wed, 11 Nov 2020 00:43:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="N4R6/iqy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732344AbgKKAnb (ORCPT ); Tue, 10 Nov 2020 19:43:31 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:55250 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727275AbgKKAnb (ORCPT ); Tue, 10 Nov 2020 19:43:31 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0ZB38041806; Wed, 11 Nov 2020 00:43:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=LsWyiV8KDRBcLn56P5V3qKQOwRRwjsluHdN3zrQbKIY=; b=N4R6/iqyfl6XIkbjLQLD1Gh2JieBd6EgWs6/+HqCPSZAEnuEfv52NFKF6kZpuej6ex/Q +S/eAzxhN77SVypRYeVfPO2WZAPkfvhSlas7r8fxx28oSZokMikCzv26vzrgT9f/6qa4 e8efzIN2spogUDnTkrCySty/okrAIfKdb2wIGIs+gDNcyySkqslJq/VD9kGFY+dkj8v1 bhQWboYpjfyHVa19ir471e26UaWkkzkX0F8fHOSwBKpCqlPS4ekTFJSownt4hrGLrcaI hhy5yx1239Q5Fb5TShQJofilJd/7Q9vsZzwWzi0bP0kuo0mm2oU66I9R2CXJQPPj6/xv ow== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 34nh3axw27-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Nov 2020 00:43:30 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0V7xh027794; Wed, 11 Nov 2020 00:43:29 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 34qgp7kqg8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Nov 2020 00:43:29 +0000 Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0AB0hSx1013620; Wed, 11 Nov 2020 00:43:28 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Nov 2020 16:43:27 -0800 Subject: [PATCH 3/6] common/populate: make sure _scratch_xfs_populate puts its files on the data device From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 10 Nov 2020 16:43:26 -0800 Message-ID: <160505540684.1388647.10815510555273538238.stgit@magnolia> In-Reply-To: <160505537312.1388647.14788379902518687395.stgit@magnolia> References: <160505537312.1388647.14788379902518687395.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 mlxscore=0 spamscore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Make sure that _scratch_xfs_populate always installs its files on the data device even if the test config selects rt by default. Signed-off-by: Darrick J. Wong --- common/populate | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/populate b/common/populate index 0b036051..f4ad8669 100644 --- a/common/populate +++ b/common/populate @@ -154,6 +154,16 @@ _scratch_xfs_populate() { _populate_xfs_qmount_option _scratch_mount + + # We cannot directly force the filesystem to create the metadata + # structures we want; we can only achieve this indirectly by carefully + # crafting files and a directory tree. Therefore, we must have exact + # control over the layout and device selection of all files created. + # Clear the rtinherit flag on the root directory so that files are + # always created on the data volume regardless of MKFS_OPTIONS. We can + # set the realtime flag when needed. + $XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT + blksz="$(stat -f -c '%s' "${SCRATCH_MNT}")" dblksz="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep naming.*bsize | sed -e 's/^.*bsize=//g' -e 's/\([0-9]*\).*$/\1/g')" crc="$($XFS_INFO_PROG "${SCRATCH_MNT}" | grep crc= | sed -e 's/^.*crc=//g' -e 's/\([0-9]*\).*$/\1/g')" @@ -306,6 +316,7 @@ _scratch_xfs_populate() { if [ $is_rmapbt -gt 0 ] && [ $is_rt -gt 0 ]; then echo "+ rtrmapbt btree" nr="$((blksz * 2 / 32))" + $XFS_IO_PROG -R -f -c 'truncate 0' "${SCRATCH_MNT}/RTRMAPBT" __populate_create_file $((blksz * nr)) "${SCRATCH_MNT}/RTRMAPBT" fi From patchwork Wed Nov 11 00:43:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11895943 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 560471744 for ; Wed, 11 Nov 2020 00:43:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3624E221F1 for ; Wed, 11 Nov 2020 00:43:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="lkYTO5IE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732350AbgKKAnk (ORCPT ); Tue, 10 Nov 2020 19:43:40 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:34506 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727275AbgKKAni (ORCPT ); Tue, 10 Nov 2020 19:43:38 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0ZaiP016919; Wed, 11 Nov 2020 00:43:36 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=jVb9HtEAfL2emr1WrOmAy/0Nx5SxiZuMmNEOnu4Qg6c=; b=lkYTO5IEIkMMmRpeyUJQ7jy96U0J5wtvrx8Wv2zBrBe1oOvpb+FqTLs67XtQeZgG5HUD KNLeGxLpF5m2ObExkvyN39wCsa6dSUd2IuumJGKo88oyrec1bD31RzhqLp0J8wJf/aJT EKVAE1cgZAbV71r+7RWcFUG9zrlWsW6RNyw2yNv7iqf1GrujTrC/h6x9zeZaR9maNybt DovQYOvgbb/v/fwmkG0BaGeUiiRMWN1iq1c3CT8U4XjRbsURpzN0Yh/o7rbsJaVJOJRH iy3/N+s3Gpy0MwTBLXCNgQdnHlGuSXlnn+js4VmvXnA6BSiHQ/3m7V2mfZ35IP/zJpZQ Jg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 34p72emv45-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Nov 2020 00:43:35 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0UsPi171596; Wed, 11 Nov 2020 00:43:35 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 34p5g12pjw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Nov 2020 00:43:35 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0AB0hYbJ017954; Wed, 11 Nov 2020 00:43:34 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Nov 2020 16:43:34 -0800 Subject: [PATCH 4/6] misc: fix $MKFS_PROG.$FSTYP usage treewide From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 10 Nov 2020 16:43:33 -0800 Message-ID: <160505541337.1388647.13512171256174815582.stgit@magnolia> In-Reply-To: <160505537312.1388647.14788379902518687395.stgit@magnolia> References: <160505537312.1388647.14788379902518687395.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 phishscore=0 priorityscore=1501 spamscore=0 impostorscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Replace all the $MKFS_PROG.$FSTYP invocations with $MKFS_PROG -t $FSTYP. The mkfs wrapper binary knows how to search the user's $PATH to find the appropriate mkfs delegate, which the author uses to switch between development and distro versions of various tools. Unfortunately, using "$MKFS_PROG.$FSTYP" means that the shell only looks in the same directory as the mkfs wrapper, which means that we can end up mixing different tool versions when this is the case. Signed-off-by: Darrick J. Wong --- common/rc | 16 ++++++++-------- tests/ext4/032 | 2 +- tests/shared/032 | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/rc b/common/rc index 019b9b2b..9b10d455 100644 --- a/common/rc +++ b/common/rc @@ -987,7 +987,7 @@ _scratch_mkfs_sized() fi ;; ext2|ext3|ext4|ext4dev) - ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks + ${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks ;; gfs2) # mkfs.gfs2 doesn't automatically shrink journal files on small @@ -1002,10 +1002,10 @@ _scratch_mkfs_sized() (( journal_size >= min_journal_size )) || journal_size=$min_journal_size MKFS_OPTIONS="-J $journal_size $MKFS_OPTIONS" fi - ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV $blocks + ${MKFS_PROG} -t $FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV $blocks ;; ocfs2) - yes | ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks + yes | ${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks ;; udf) $MKFS_UDF_PROG $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks @@ -1019,10 +1019,10 @@ _scratch_mkfs_sized() $MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV ;; jfs) - ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS $SCRATCH_DEV $blocks + ${MKFS_PROG} -t $FSTYP $MKFS_OPTIONS $SCRATCH_DEV $blocks ;; reiserfs) - ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks + ${MKFS_PROG} -t $FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks ;; reiser4) # mkfs.resier4 requires size in KB as input for creating filesystem @@ -1101,13 +1101,13 @@ _scratch_mkfs_blocksized() _scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize ;; ext2|ext3|ext4) - ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV + ${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV ;; gfs2) - ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV + ${MKFS_PROG} -t $FSTYP $MKFS_OPTIONS -O -b $blocksize $SCRATCH_DEV ;; ocfs2) - yes | ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize -C $blocksize $SCRATCH_DEV + yes | ${MKFS_PROG} -t $FSTYP -F $MKFS_OPTIONS -b $blocksize -C $blocksize $SCRATCH_DEV ;; *) _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_blocksized" diff --git a/tests/ext4/032 b/tests/ext4/032 index c63e7034..4e8dac42 100755 --- a/tests/ext4/032 +++ b/tests/ext4/032 @@ -46,7 +46,7 @@ ext4_online_resize() echo "+++ create fs on image file $original_size" | \ tee -a $seqres.full - ${MKFS_PROG}.${FSTYP} -F -O bigalloc,resize_inode -C $CLUSTER_SIZ \ + ${MKFS_PROG} -t ${FSTYP} -F -O bigalloc,resize_inode -C $CLUSTER_SIZ \ -b $BLK_SIZ ${LOOP_DEVICE} $original_size >> \ $seqres.full 2>&1 || _fail "mkfs failed" diff --git a/tests/shared/032 b/tests/shared/032 index 40d27898..00ae6860 100755 --- a/tests/shared/032 +++ b/tests/shared/032 @@ -67,7 +67,7 @@ do if [ $? -eq 0 ] ; then # next, ensure we don't overwrite it echo "=== Attempting $FSTYP overwrite of $fs..." >>$seqres.full - ${MKFS_PROG}.$FSTYP $SCRATCH_DEV >>$seqres.full 2>&1 + ${MKFS_PROG} -t $FSTYP $SCRATCH_DEV >>$seqres.full 2>&1 [ $? -eq 0 ] && echo "Failed - overwrote fs type ${fs}!" else From patchwork Wed Nov 11 00:43:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11895999 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57E9B1744 for ; Wed, 11 Nov 2020 00:45:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3524421D46 for ; Wed, 11 Nov 2020 00:45:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="QEVdO8it" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732432AbgKKApo (ORCPT ); Tue, 10 Nov 2020 19:45:44 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:48998 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731234AbgKKApo (ORCPT ); Tue, 10 Nov 2020 19:45:44 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0XmXW110516; Wed, 11 Nov 2020 00:45:42 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=5fcN2c6x1qnJaONISOZWck2J1DwRXoh1U4OLT3bUnLw=; b=QEVdO8itcVedVEbiwTpagC5WLKA2CkXOLb4Zh0fe2v52Gb7m4TdqyTpB3leuAP4+1F/S +B2d/O3sMIVZq7JWACgvdE9av1B+yeaOnCjTdRHaM7//H07waGcVQlwe9VdUUEEFPhPa oFRVwJRCZ+UKJoJxtCqqN77yYNOd5kn8iQ+VNc/YDvez1qRuH6R7ckzycWxBvyqRNHoI u+XhDxlLYF7zoC+P/qMjFsLOBcd40hB+A0LLAopXsiayIPslbj9lfkXcP/ZEvSk1bffB wYT1wxgeff/r2yUqztKAnNKqHD2VWDNdTAniMfwiX0OKyFFrt/XaReCz4nR0oi0zeuux TQ== Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 34nkhkxnqp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Nov 2020 00:45:42 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0VEuH095476; Wed, 11 Nov 2020 00:43:42 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 34p55pattn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Nov 2020 00:43:42 +0000 Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0AB0heqm028935; Wed, 11 Nov 2020 00:43:41 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Nov 2020 16:43:40 -0800 Subject: [PATCH 5/6] misc: fix _get_file_block_size usage From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 10 Nov 2020 16:43:39 -0800 Message-ID: <160505541965.1388647.5276414050359284933.stgit@magnolia> In-Reply-To: <160505537312.1388647.14788379902518687395.stgit@magnolia> References: <160505537312.1388647.14788379902518687395.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 malwarescore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 malwarescore=0 adultscore=0 clxscore=1015 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Fix these tests that rely on the allocation unit size of a file, which might not necessarily be the fs block size. Signed-off-by: Darrick J. Wong --- tests/generic/157 | 2 +- tests/generic/175 | 2 +- tests/xfs/129 | 2 +- tests/xfs/169 | 2 +- tests/xfs/208 | 2 +- tests/xfs/336 | 2 +- tests/xfs/344 | 2 +- tests/xfs/345 | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/generic/157 b/tests/generic/157 index 5ec8999e..379c38b9 100755 --- a/tests/generic/157 +++ b/tests/generic/157 @@ -46,7 +46,7 @@ testdir2=$SCRATCH_MNT/test-$seq mkdir $testdir2 echo "Create the original files" -blksz="$(_get_block_size $testdir1)" +blksz="$(_get_file_block_size $testdir1)" blks=1000 margin='7%' sz=$((blksz * blks)) diff --git a/tests/generic/175 b/tests/generic/175 index f1b73522..436d2cca 100755 --- a/tests/generic/175 +++ b/tests/generic/175 @@ -41,7 +41,7 @@ testdir="$SCRATCH_MNT/test-$seq" mkdir "$testdir" echo "Create a one block file" -blksz="$(_get_block_size $testdir)" +blksz="$(_get_file_block_size $testdir)" _pwrite_byte 0x61 0 $blksz "$testdir/file1" >> "$seqres.full" fnr=19 diff --git a/tests/xfs/129 b/tests/xfs/129 index 5e348805..78baf5c4 100755 --- a/tests/xfs/129 +++ b/tests/xfs/129 @@ -44,7 +44,7 @@ mkdir $testdir metadump_file=$TEST_DIR/${seq}_metadump echo "Create the original file blocks" -blksz="$(_get_block_size $testdir)" +blksz="$(_get_file_block_size $testdir)" nr_blks=$((4 * blksz / 12)) _pwrite_byte 0x61 0 $((blksz * nr_blks)) $testdir/file1 >> $seqres.full diff --git a/tests/xfs/169 b/tests/xfs/169 index 44577fbf..2051091f 100755 --- a/tests/xfs/169 +++ b/tests/xfs/169 @@ -42,7 +42,7 @@ testdir=$SCRATCH_MNT/test-$seq mkdir $testdir echo "Create the original file blocks" -blksz="$(_get_block_size $testdir)" +blksz="$(_get_file_block_size $testdir)" nr_blks=$((8 * blksz / 12)) for i in 1 2 x; do diff --git a/tests/xfs/208 b/tests/xfs/208 index 104763d5..2a899fc0 100755 --- a/tests/xfs/208 +++ b/tests/xfs/208 @@ -56,7 +56,7 @@ bufnr=16 bufsize=$((blksz * bufnr)) _require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4)) -real_blksz=$(_get_block_size $testdir) +real_blksz=$(_get_file_block_size $testdir) internal_blks=$((filesize / real_blksz)) echo "Create the original files" diff --git a/tests/xfs/336 b/tests/xfs/336 index 5f32f060..a006938d 100755 --- a/tests/xfs/336 +++ b/tests/xfs/336 @@ -39,7 +39,7 @@ _scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null . $tmp.mkfs cat $tmp.mkfs > "$seqres.full" 2>&1 _scratch_mount -blksz="$(_get_block_size $SCRATCH_MNT)" +blksz="$(_get_file_block_size $SCRATCH_MNT)" metadump_file=$TEST_DIR/${seq}_metadump rm -rf $metadump_file diff --git a/tests/xfs/344 b/tests/xfs/344 index b00541f6..46868fa5 100755 --- a/tests/xfs/344 +++ b/tests/xfs/344 @@ -55,7 +55,7 @@ bufnr=16 bufsize=$((blksz * bufnr)) _require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4)) -real_blksz=$(_get_block_size $testdir) +real_blksz=$(_get_file_block_size $testdir) internal_blks=$((filesize / real_blksz)) echo "Create the original files" diff --git a/tests/xfs/345 b/tests/xfs/345 index ceb1dce9..4204cc22 100755 --- a/tests/xfs/345 +++ b/tests/xfs/345 @@ -53,7 +53,7 @@ bufnr=16 bufsize=$((blksz * bufnr)) _require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4)) -real_blksz=$(_get_block_size $testdir) +real_blksz=$(_get_file_block_size $testdir) internal_blks=$((filesize / real_blksz)) echo "Create the original files" From patchwork Wed Nov 11 00:43:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 11895947 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5C77A921 for ; Wed, 11 Nov 2020 00:43:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E69921D46 for ; Wed, 11 Nov 2020 00:43:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="nlf8qcJn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732409AbgKKAnu (ORCPT ); Tue, 10 Nov 2020 19:43:50 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:47854 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732399AbgKKAnu (ORCPT ); Tue, 10 Nov 2020 19:43:50 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0XmTQ110532; Wed, 11 Nov 2020 00:43:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=4ZtBNkTbnpUPrYiymVEW8qoevwfeZ1XMqQUVxskRH8M=; b=nlf8qcJncec8GxmFAWrd8N69ead4OY52dbGSD5aT5oTDAAqw8uI7QD4JVWIiJWg5iFXQ 0XsmGZoKl6U4ZxN8ZgI46Mv780Qc9LOt1AZscCYmSjOvqKmBVSOfAkcxJsB2pvAQRBzY 3a+HkgLruewwgzRG4VAeiOg3NGLFIKnP1Zg1S9jG6XA3b6/XYdF5M3xUh2cdkeYWEZkT SnHWUkvWSXC8KvShcARoPvhjCikwcmzLhdkvS2vNXORJ18mfpmvlNjgEa3/JaOfpbqAx rxXq9/txctPZI82eeXf8VIhZnb8eLbX48NqOIhkFudzj9UprswIAS/xUXMlvuCeyjH15 OA== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 34nkhkxnmj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Nov 2020 00:43:48 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0AB0UArh097643; Wed, 11 Nov 2020 00:43:47 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 34p5gxq72m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Nov 2020 00:43:47 +0000 Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0AB0hlOo000699; Wed, 11 Nov 2020 00:43:47 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 10 Nov 2020 16:43:46 -0800 Subject: [PATCH 6/6] xfs/033: use _scratch_xfs_db wrapper From: "Darrick J. Wong" To: darrick.wong@oracle.com, guaneryu@gmail.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Tue, 10 Nov 2020 16:43:45 -0800 Message-ID: <160505542588.1388647.226564119701569514.stgit@magnolia> In-Reply-To: <160505537312.1388647.14788379902518687395.stgit@magnolia> References: <160505537312.1388647.14788379902518687395.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 phishscore=0 adultscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9801 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 mlxlogscore=999 lowpriorityscore=0 spamscore=0 malwarescore=0 adultscore=0 clxscore=1015 bulkscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011110001 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Use the wrapper instead of open-coding the call. Signed-off-by: Darrick J. Wong --- tests/xfs/033 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/xfs/033 b/tests/xfs/033 index 372426b7..a1311dbe 100755 --- a/tests/xfs/033 +++ b/tests/xfs/033 @@ -76,7 +76,7 @@ if [ $_fs_has_crcs -eq 1 ]; then fi _link_out_file_named $seqfull.out "$FEATURES" -`xfs_db -r -c sb -c p $SCRATCH_DEV | grep 'ino = ' | \ +`_scratch_xfs_db -r -c sb -c p | grep 'ino = ' | \ sed -e 's/ //g' -e 's/^/export /'` # check we won't get any quota inodes setup on mount