Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2788565pxb; Sun, 3 Apr 2022 21:25:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxVOY7Gch1dpAGDB8Yo3b7+jrcYZwIUSmPUhjJqfJ3mFgrfAS+54Z3pYuJPNhfTMEEyQnVb X-Received: by 2002:aa7:8893:0:b0:4fb:10e1:8976 with SMTP id z19-20020aa78893000000b004fb10e18976mr21818712pfe.36.1649046349578; Sun, 03 Apr 2022 21:25:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649046349; cv=none; d=google.com; s=arc-20160816; b=grgOF5Qk0+XpEgKhCq/sHrOj4S/NoflTZs/sD265c9MxFuxhy5M1u2CdWYtdOf+4uv qICxMZe/5bb9PRq/zu7L+/Jgmmn5DbK2WEWMENvcBFDFjDDY24OvkK9o01r+lB6JSDy1 N7YeVA39WQXgzKFemL1uL1EQbO3kDOhb/yEEJbGMSKYdLtnPcy2a0Vjs5N5ZtmuaN6XU mz9Y8LbcHlOFZCrBZiAVBVURdHXASjd9UZArDvLXOQOq69kYNizPUZYL0M3uBD4pCU1u Du2E6q38VXsZJ0W5w8OgMXWwn7/rMHjdJ18zA52JVgFOz/vs9YW7iWbJpgqaIneW1v0V bZ4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=LJFKnu9U7KqXd4r2ucthZAy4XBEo/joFmLdkdD+yj+8=; b=WCMS3iGzR5cEK62o0yomNYnAr4HPWiwlXfrbFhBVCVZ/qXvdYm2OhXEDJCYd2nFDS4 wdt4oLCP0OLkWhd8bgs5Jo+F9kGQad+bVKMf5MejEWWVnL5E44bAvVrWSN4wAEWmIemR q17cPSCce00WV/PmUwMWgR1vBtklciPjuCLkmibPvV6jJZTXAAJMu3geLoNyPw6xNzRc qZIvaXn1652yNOKcysSty7pf4jLWzxV0Mpv57NHbVLw/UpEjjEuhQcfbaaxkNf4ZkEXq /L+c/Jpz2z9WvdkPwBxtcsjuNypdbO4dqErinCOMeuvh64CusQrfVeGhUBqpeKpqLrz+ 5yTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a170902700c00b00156a02e4425si2385117plk.201.2022.04.03.21.25.15; Sun, 03 Apr 2022 21:25:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357944AbiDCXkn (ORCPT + 99 others); Sun, 3 Apr 2022 19:40:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbiDCXkm (ORCPT ); Sun, 3 Apr 2022 19:40:42 -0400 Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 048C81081; Sun, 3 Apr 2022 16:38:48 -0700 (PDT) Received: from dread.disaster.area (pa49-180-43-123.pa.nsw.optusnet.com.au [49.180.43.123]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 37CFE10E55CE; Mon, 4 Apr 2022 09:38:46 +1000 (AEST) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1nb9nx-00DS7U-6x; Mon, 04 Apr 2022 09:38:45 +1000 Date: Mon, 4 Apr 2022 09:38:45 +1000 From: Dave Chinner To: Ritesh Harjani Cc: fstests , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Darrick J . Wong" , Ritesh Harjani Subject: Re: [PATCHv3 3/4] generic/678: Add a new shutdown recovery test Message-ID: <20220403233845.GT1609613@dread.disaster.area> References: <2df6ee0680b5d2a6fad945e4936749f22abe72dd.1648730443.git.ritesh.list@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2df6ee0680b5d2a6fad945e4936749f22abe72dd.1648730443.git.ritesh.list@gmail.com> X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.4 cv=VuxAv86n c=1 sm=1 tr=0 ts=624a3007 a=MV6E7+DvwtTitA3W+3A2Lw==:117 a=MV6E7+DvwtTitA3W+3A2Lw==:17 a=kj9zAlcOel0A:10 a=z0gMJWrwH1QA:10 a=VnNF1IyMAAAA:8 a=968KyxNXAAAA:8 a=7-415B0cAAAA:8 a=RT4zI6-5qFfLA4DtXGQA:9 a=CjuIK1q_8ugA:10 a=i3p7wj428ZMNU9vUUNTn:22 a=biEYGPWJfzWAr4FL6Ov7:22 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE 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-ext4@vger.kernel.org On Thu, Mar 31, 2022 at 06:24:22PM +0530, Ritesh Harjani wrote: > From: Ritesh Harjani > > In certain cases (it is noted with ext4 fast_commit feature) that, replay phase > may not delete the right range of blocks (after sudden FS shutdown) > due to some operations which depends on inode->i_size (which during replay of > an inode with fast_commit could be 0 for sometime). > This fstest is added to test for such scenarios for all generic fs. > > This test case is based on the test case shared via Xin Yin. > > Signed-off-by: Ritesh Harjani > --- > tests/generic/678 | 72 +++++++++++++++++++++++++++++++++++++++++++ > tests/generic/678.out | 7 +++++ > 2 files changed, 79 insertions(+) > create mode 100755 tests/generic/678 > create mode 100644 tests/generic/678.out > > diff --git a/tests/generic/678 b/tests/generic/678 > new file mode 100755 > index 00000000..46a7be6c > --- /dev/null > +++ b/tests/generic/678 > @@ -0,0 +1,72 @@ > +#! /bin/bash > +# SPDX-License-Identifier: GPL-2.0 > +# Copyright (c) 2022 IBM Corporation. All Rights Reserved. > +# > +# FS QA Test 678 > +# > +# This test with ext4 fast_commit feature w/o below patch missed to delete the right > +# range during replay phase, since it depends upon inode->i_size (which might not be > +# stable during replay phase, at least for ext4). > +# 0b5b5a62b945a141: ext4: use ext4_ext_remove_space() for fast commit replay delete range > +# (Based on test case shared by Xin Yin ) > +# > + > +. ./common/preamble > +_begin_fstest auto shutdown quick log recoveryloop > + > +# Override the default cleanup function. > +_cleanup() > +{ > + cd / > + rm -r -f $tmp.* > +} It's the same as the default cleanup function. Cheers, Dave. -- Dave Chinner david@fromorbit.com