From patchwork Thu Oct 8 03:56:06 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: 11822129 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 338C8139F for ; Thu, 8 Oct 2020 03:56:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0759F21527 for ; Thu, 8 Oct 2020 03:56:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="A1LnYJQf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728167AbgJHD4N (ORCPT ); Wed, 7 Oct 2020 23:56:13 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:55152 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbgJHD4M (ORCPT ); Wed, 7 Oct 2020 23:56:12 -0400 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 0983ob3C021406; Thu, 8 Oct 2020 03:56:09 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=SqWkaNz2R1or/xehuNFlqNWi/rtEaIDsF+vgxqnpoO4=; b=A1LnYJQf3guFr6qQXKmFh6WbyuM2oc67TorBasTSKkzQbrUawIansZirvAi0s5BQNJgR D3syQwSTxMgtWhxK2jNDmkDyeMku/bxhzuDLcrLwPEVuz3t3X+sSKohG/C1tS7MFx1LK UZXs4Vmdr6NCqB/6sdaHJRqpVbIyqKegAQ6LI3/mzoE/gVFSVGglam7kH4nrzISARPEx xNDhqWdykT7lZF3L4vdJ+zPH7vps/oaFXhO2wHKRjrGPnSzUzdvHddbQaxMR4toOadk7 MhfKsHMcrBLhlTHb6dq2mlDMt3IR8gcsu3N8uq4icIj1QVPBaQdnmb0f7b/CsHtCMV5O Rg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 33ym34tebt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 08 Oct 2020 03:56:08 +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 0983kDnC018185; Thu, 8 Oct 2020 03:56:08 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3030.oracle.com with ESMTP id 33y380ep7f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Oct 2020 03:56:08 +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 0983u7O6022577; Thu, 8 Oct 2020 03:56:07 GMT Received: from localhost (/10.159.134.247) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 07 Oct 2020 20:56:07 -0700 Subject: [PATCH 1/2] xfs: fix realtime bitmap/summary file truncation when growing rt volume From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, chandanrlinux@gmail.com, sandeen@redhat.com Date: Wed, 07 Oct 2020 20:56:06 -0700 Message-ID: <160212936619.248573.5638028611780993013.stgit@magnolia> In-Reply-To: <160212936001.248573.7813264584242634489.stgit@magnolia> References: <160212936001.248573.7813264584242634489.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9767 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 malwarescore=0 suspectscore=1 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010080030 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9767 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 spamscore=0 malwarescore=0 phishscore=0 suspectscore=1 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010080030 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong The realtime bitmap and summary files are regular files that are hidden away from the directory tree. Since they're regular files, inode inactivation will try to purge what it thinks are speculative preallocations beyond the incore size of the file. Unfortunately, xfs_growfs_rt forgets to update the incore size when it resizes the inodes, with the result that inactivating the rt inodes at unmount time will cause their contents to be truncated. Fix this by updating the incore size when we change the ondisk size as part of updating the superblock. Note that we don't do this when we're allocating blocks to the rt inodes because we actually want those blocks to get purged if the growfs fails. This fixes corruption complaints from the online rtsummary checker when running xfs/233. Since that test requires rmap, one can also trigger this by growing an rt volume, cycling the mount, and creating rt files. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R --- fs/xfs/xfs_rtalloc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 9d4e33d70d2a..1c3969807fb9 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1027,10 +1027,13 @@ xfs_growfs_rt( xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL); xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL); /* - * Update the bitmap inode's size. + * Update the bitmap inode's size ondisk and incore. We need + * to update the incore size so that inode inactivation won't + * punch what it thinks are "posteof" blocks. */ mp->m_rbmip->i_d.di_size = nsbp->sb_rbmblocks * nsbp->sb_blocksize; + i_size_write(VFS_I(mp->m_rbmip), mp->m_rbmip->i_d.di_size); xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE); /* * Get the summary inode into the transaction. @@ -1038,9 +1041,12 @@ xfs_growfs_rt( xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL); xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL); /* - * Update the summary inode's size. + * Update the summary inode's size. We need to update the + * incore size so that inode inactivation won't punch what it + * thinks are "posteof" blocks. */ mp->m_rsumip->i_d.di_size = nmp->m_rsumsize; + i_size_write(VFS_I(mp->m_rsumip), mp->m_rsumip->i_d.di_size); xfs_trans_log_inode(tp, mp->m_rsumip, XFS_ILOG_CORE); /* * Copy summary data from old to new sizes. From patchwork Thu Oct 8 03:56:12 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: 11822131 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 DAE29139F for ; Thu, 8 Oct 2020 03:56:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE37F21527 for ; Thu, 8 Oct 2020 03:56:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="MdE2viE8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727663AbgJHD4S (ORCPT ); Wed, 7 Oct 2020 23:56:18 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:60598 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbgJHD4S (ORCPT ); Wed, 7 Oct 2020 23:56:18 -0400 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 0983mvHM124491; Thu, 8 Oct 2020 03:56:15 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=E+XbxTkCGoYDe4AVxbgiGv0okoYGTtADZEEHm8pfH54=; b=MdE2viE8tSM3oT7An/heDslJGtnBMxMjU72PHrz4BWU8VgD2lQPksgau1b4wKV57UNue Yh0Nd+6M6FLjBSVlUoqgNaQKnYDDmwfJDbkkf2s3+e153ypr6usi51ahco4DCmB6a4D3 kXNmeI47V2Vrpf5iN+ENyBZrIud7TnFDKEj0t1FH7xesbZf6lPmOejGHjSOLladNVfZs zU49zwDvSYLpnjLqFUW+NmJK6jcCs/Rv9DwR9rQy5vgK96PfLslypOGebJwXGo7XYJHI 09nWviowrIlKGS6pH5nqOlLcKtVXDNsznqWrD2PP9VV34sW506ynQoc5vioXbi0D0ML8 Xw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2130.oracle.com with ESMTP id 33xetb5g4v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 08 Oct 2020 03:56:15 +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 0983kDt1018380; Thu, 8 Oct 2020 03:56:14 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 33y380ep9q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Oct 2020 03:56:14 +0000 Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0983uDVV025180; Thu, 8 Oct 2020 03:56:13 GMT Received: from localhost (/10.159.134.247) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 07 Oct 2020 20:56:13 -0700 Subject: [PATCH 2/2] xfs: make xfs_growfs_rt update secondary superblocks From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, chandanrlinux@gmail.com, sandeen@redhat.com Date: Wed, 07 Oct 2020 20:56:12 -0700 Message-ID: <160212937238.248573.3832120826354421788.stgit@magnolia> In-Reply-To: <160212936001.248573.7813264584242634489.stgit@magnolia> References: <160212936001.248573.7813264584242634489.stgit@magnolia> User-Agent: StGit/0.19 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9767 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 malwarescore=0 suspectscore=3 adultscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010080030 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9767 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 adultscore=0 mlxlogscore=999 phishscore=0 impostorscore=0 malwarescore=0 suspectscore=3 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010080030 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong When we call growfs on the data device, we update the secondary superblocks to reflect the updated filesystem geometry. We need to do this for growfs on the realtime volume too, because a future xfs_repair run could try to fix the filesystem using a backup superblock. This was observed by the online superblock scrubbers while running xfs/233. One can also trigger this by growing an rt volume, cycling the mount, and creating new rt files. Signed-off-by: Darrick J. Wong --- fs/xfs/xfs_rtalloc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 1c3969807fb9..5b2e68d9face 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -18,7 +18,7 @@ #include "xfs_trans_space.h" #include "xfs_icache.h" #include "xfs_rtalloc.h" - +#include "xfs_sb.h" /* * Read and return the summary information for a given extent size, @@ -1108,6 +1108,11 @@ xfs_growfs_rt( */ kmem_free(nmp); + /* Update secondary superblocks now the physical grow has completed */ + error = xfs_update_secondary_sbs(mp); + if (error) + return error; + /* * If we had to allocate a new rsum_cache, we either need to free the * old one (if we succeeded) or free the new one and restore the old one From patchwork Thu Oct 8 03:59:57 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: 11822137 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 EC1E1175A for ; Thu, 8 Oct 2020 04:00:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C42112173E for ; Thu, 8 Oct 2020 04:00:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="X0/vo7Lv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726055AbgJHEAG (ORCPT ); Thu, 8 Oct 2020 00:00:06 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:57510 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725858AbgJHEAG (ORCPT ); Thu, 8 Oct 2020 00:00:06 -0400 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 0983q173022276; Thu, 8 Oct 2020 04:00:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2020-01-29; bh=Axgp1WhcYaon0Tasz6siQqvnIgVaKo4ughqpt5Nd3J8=; b=X0/vo7LvTX8WZrb550OiWAXx3bfblvxDZOgpG88yyDq+VOdEZORZ/8boaHQNjk3uq0W0 1AMfU6kp4U/CxiNSjPcnLfkFo0RESe+8CaOmuzmpwSiZf46IhfzZchyp1AAQh6+5wCqL 8nJcz9cEamCgTPXd0NQpTqo4ZvQhSpGNcRNitN6WCJ+ezuf1TtyJgxHyVVorGhCEEnuj aVQC5B8r2lFGK9G39zPsyaw0Xh0BCAZB+xOyNBIX39GtU/+yZGlsdiBLLeLQLLwpXUJX hVkN5VlC7GaiPpu5DKz5aYnX2KyENBLLFpcX1cao8zKA2zzM0cfypkziJViHiLZv52fK gQ== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 33ym34tejs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 08 Oct 2020 04:00:00 +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 0983isZ4142445; Thu, 8 Oct 2020 04:00:00 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 3410k0fjjr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Oct 2020 04:00:00 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 0983xwWa024235; Thu, 8 Oct 2020 03:59:58 GMT Received: from localhost (/10.159.134.247) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 07 Oct 2020 20:59:58 -0700 Date: Wed, 7 Oct 2020 20:59:57 -0700 From: "Darrick J. Wong" To: linux-xfs@vger.kernel.org, chandanrlinux@gmail.com, sandeen@redhat.com Cc: fstests Subject: [RFC PATCH 3/2] xfstest: test running growfs on the realtime volume Message-ID: <20201008035957.GJ6540@magnolia> References: <160212936001.248573.7813264584242634489.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <160212936001.248573.7813264584242634489.stgit@magnolia> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9767 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 spamscore=0 adultscore=0 bulkscore=0 malwarescore=0 suspectscore=1 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010080030 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9767 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 spamscore=0 malwarescore=0 phishscore=0 suspectscore=1 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010080030 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org From: Darrick J. Wong Make sure that we can run growfs to expand the realtime volume without it blowing up. This is a regression test for the following patches: xfs: Set xfs_buf type flag when growing summary/bitmap files xfs: Set xfs_buf's b_ops member when zeroing bitmap/summary files xfs: fix realtime bitmap/summary file truncation when growing rt volume xfs: make xfs_growfs_rt update secondary superblocks Because the xfs maintainer realized that no, we have no tests for this particular piece of functionality. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R --- tests/xfs/916 | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/916.out | 10 +++++++ tests/xfs/group | 1 + 3 files changed, 92 insertions(+) create mode 100755 tests/xfs/916 create mode 100644 tests/xfs/916.out diff --git a/tests/xfs/916 b/tests/xfs/916 new file mode 100755 index 00000000..c2484376 --- /dev/null +++ b/tests/xfs/916 @@ -0,0 +1,81 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2020, Oracle and/or its affiliates. All Rights Reserved. +# +# FS QA Test No. 916 +# +# Tests xfs_growfs on the realtime volume to make sure none of it blows up. +# This is a regression test for the following patches: +# +# xfs: Set xfs_buf type flag when growing summary/bitmap files +# xfs: Set xfs_buf's b_ops member when zeroing bitmap/summary files +# xfs: fix realtime bitmap/summary file truncation when growing rt volume +# xfs: make xfs_growfs_rt update secondary superblocks +# +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + _scratch_unmount >> $seqres.full 2>&1 + test -e "$rtdev" && losetup -d $rtdev >> $seqres.full 2>&1 + rm -f $tmp.* $TEST_DIR/$seq.rtvol +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# real QA test starts here +_supported_fs xfs +# Note that we don't _require_realtime because we synthesize a rt volume +# below. +_require_scratch_nocheck +_require_no_large_scratch_dev + +echo "Create fake rt volume" +truncate -s 400m $TEST_DIR/$seq.rtvol +rtdev=$(_create_loop_device $TEST_DIR/$seq.rtvol) + +echo "Format and mount 100m rt volume" +export USE_EXTERNAL=yes +export SCRATCH_RTDEV=$rtdev +_scratch_mkfs -r size=100m > $seqres.full +_scratch_mount || _notrun "Could not mount scratch with synthetic rt volume" + +testdir=$SCRATCH_MNT/test-$seq +mkdir $testdir + +echo "Check rt volume stats" +$XFS_IO_PROG -c 'chattr +t' $testdir +$XFS_INFO_PROG $SCRATCH_MNT >> $seqres.full +before=$(stat -f -c '%b' $testdir) + +echo "Create some files" +_pwrite_byte 0x61 0 1m $testdir/original >> $seqres.full + +echo "Grow fs" +$XFS_GROWFS_PROG $SCRATCH_MNT 2>&1 | _filter_growfs >> $seqres.full +_scratch_cycle_mount + +echo "Recheck 400m rt volume stats" +$XFS_INFO_PROG $SCRATCH_MNT >> $seqres.full +after=$(stat -f -c '%b' $testdir) +_within_tolerance "rt volume size" $after $((before * 4)) 5% -v + +echo "Create more copies to make sure the bitmap really works" +cp -p $testdir/original $testdir/copy3 + +echo "Check filesystem" +_check_xfs_filesystem $SCRATCH_DEV none $rtdev + +# success, all done +status=0 +exit diff --git a/tests/xfs/916.out b/tests/xfs/916.out new file mode 100644 index 00000000..55f2356a --- /dev/null +++ b/tests/xfs/916.out @@ -0,0 +1,10 @@ +QA output created by 916 +Create fake rt volume +Format and mount 100m rt volume +Check rt volume stats +Create some files +Grow fs +Recheck 400m rt volume stats +rt volume size is in range +Create more copies to make sure the bitmap really works +Check filesystem diff --git a/tests/xfs/group b/tests/xfs/group index ef375397..4e58b5cc 100644 --- a/tests/xfs/group +++ b/tests/xfs/group @@ -549,6 +549,7 @@ 910 auto quick inobtcount 911 auto quick bigtime 915 auto quick quota +916 auto quick realtime growfs 1202 auto quick swapext 1208 auto quick swapext 1500 dangerous_fuzzers dangerous_bothrepair