From patchwork Thu Nov 1 23:19:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10664661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0DF817DB for ; Thu, 1 Nov 2018 23:19:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B0E7C2C4F4 for ; Thu, 1 Nov 2018 23:19:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A50772C518; Thu, 1 Nov 2018 23:19:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 516412C4F4 for ; Thu, 1 Nov 2018 23:19:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728137AbeKBIYV (ORCPT ); Fri, 2 Nov 2018 04:24:21 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:52744 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727749AbeKBIYV (ORCPT ); Fri, 2 Nov 2018 04:24:21 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wA1NJ8cu134487; Thu, 1 Nov 2018 23:19:18 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-2018-07-02; bh=KZjlqCd+dQeXs5LyB5/cnkUSHMCrTCDCN7I5wIXb3Fw=; b=G+Cx0jEFoY5tA2cE32j2rhYSbg9G8RjeXSgW8jFV8ygVAmWbplSGVpzkTTMBJ19yTI6J poizwdRnhMZQSywV73q+VjV5wUC8delv6gRe9Pv6/W09hgbMgAOUZGtjXYNYTdfY8AWS c6jQlt+cBO7wDv9r5NJXYLnJS+fihETCmTyizGAKUcZA010KvFWKXJFdk5NQ70Fbah1y sOo1NBJ6d7YRksI1vxjxdrZYEN8pyjHbCOSSQ7F4rtt7hCxwhZY6WHNnfYMxwN8voNJy UyKSLsy2Oz5PFVGt+pjl7stkKslDXrc5e2IZQ1boDpZUckHzSfSHMBWgBe1LbAOGo9dE TQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2ncfyqbprc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 01 Nov 2018 23:19:17 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wA1NJGMq019370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Nov 2018 23:19:17 GMT 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 wA1NJGIX030796; Thu, 1 Nov 2018 23:19:16 GMT Received: from localhost (/10.145.178.77) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 01 Nov 2018 16:19:16 -0700 Subject: [PATCH 2/8] xfs: force unlink metadata updates to disk From: "Darrick J. Wong" To: guaneryu@gmail.com, darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org Date: Thu, 01 Nov 2018 16:19:15 -0700 Message-ID: <154111435522.6577.18438780918971479613.stgit@magnolia> In-Reply-To: <154111434286.6577.15010861884505931015.stgit@magnolia> References: <154111434286.6577.15010861884505931015.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9064 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=919 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811010194 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong In xfs/318 and xfs/325 we inject errors on extent freeing then delete some files to see if we can make the filesystem go offline. However, with the advent of deferred inode inactivation, sync won't guarantee that unlinked inodes removal is actually pushed to disk since the "inode needs to be deallocated" state is persisted to disk. Freeze achieves this, however, so inject a freeze/thaw cycle to make sure we hit the injected error. Signed-off-by: Darrick J. Wong --- tests/xfs/318 | 1 + tests/xfs/325 | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/xfs/318 b/tests/xfs/318 index 2f2a34b0..83b858ea 100755 --- a/tests/xfs/318 +++ b/tests/xfs/318 @@ -59,6 +59,7 @@ _scratch_inject_error "free_extent" echo "Remove files" rm -rf $SCRATCH_MNT/file1 sync +$XFS_IO_PROG -x -c 'freeze' -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1 echo "FS should be shut down, touch will fail" touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch diff --git a/tests/xfs/325 b/tests/xfs/325 index 67959015..eafb4ae0 100755 --- a/tests/xfs/325 +++ b/tests/xfs/325 @@ -62,6 +62,7 @@ _scratch_inject_error "free_extent" rm $SCRATCH_MNT/file1 sync +$XFS_IO_PROG -x -c 'freeze' -c 'thaw' $SCRATCH_MNT >> $seqres.full 2>&1 echo "FS should be shut down, touch will fail" touch $SCRATCH_MNT/badfs 2>&1 | _filter_scratch