Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp411310ybz; Fri, 24 Apr 2020 02:35:05 -0700 (PDT) X-Google-Smtp-Source: APiQypK9AX0WDVMDwjJ7Iu9DlA1lkhptjXqu8O8GybOGdDgM8oV4bs5WcjeRBYeWK9OrMR7UPJoX X-Received: by 2002:a17:906:e210:: with SMTP id gf16mr6464046ejb.214.1587720905084; Fri, 24 Apr 2020 02:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587720905; cv=none; d=google.com; s=arc-20160816; b=Z9HES/K07iKEmrKVC5NJ64fzXtYu48w550TfXAsm5uo0zdv+lCS5OKJnXrRsqlJv/d f7Bm/3+hqFvaL+N4NtvASkW3qSVvOCIQrxOcIgUQLAmET0wCzzgpkhbgrSwn6nkSMeJL 8rPNdIj1LZ2QsQeqB0W18ALNlXch8NiUpJNTBH+DG4JLtI7jH754M+2OTfeTGiy8tg1q pYYr8gvufA3SK2JroQHCv9hYMaTqM1pmDJH/EhKiD5u9GQsq22PhvYRVgLxxvwgv/sLC U5CyE8zMgTsqnEmiQUKaPDJx2wiNv2Nbf93yk3LBSTXVs6LLBY0T5GaIt9W1kSxzkKgJ jyrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=UuGDkqE1GhyMs9J+7y0jFFSRkRQacWxB02tQoV7smG4=; b=nXxWsSAk6XeXqnSe0vQGkjwTBftzr2i7D+7qpKXgWc8saHzbFEJ+GAq0HGRNzZLNEU B4o26YAhXCDEbTMSofy2xBgUt+Z2qVNsmjViSB0kwVdfHmCvJqIiqUi2PJHzruyRXtUj DOtjxf6SFys8VyQQ0VBofoHExAQlE/LVEAz2LdFZ/e72cEUmwggQSjRfRX74eglSh7LQ WN2wk7pthbMbUk0MXqki5hL1zIOyjv7U/fxlgIZDbeZmMwvyWcsRZMWZXOLFgxa/bCiG /UkRUOFEauO7V/e8R6/4KPAmEYYt+84bpgkrdYG5yaoqpBGK73RpuR1HOztSF+dduEFj ky9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n16si3054368ejl.134.2020.04.24.02.34.41; Fri, 24 Apr 2020 02:35:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726647AbgDXJeN (ORCPT + 99 others); Fri, 24 Apr 2020 05:34:13 -0400 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:58022 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726770AbgDXJeK (ORCPT ); Fri, 24 Apr 2020 05:34:10 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R361e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01355;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0TwVfl8I_1587720847; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0TwVfl8I_1587720847) by smtp.aliyun-inc.com(127.0.0.1); Fri, 24 Apr 2020 17:34:07 +0800 From: Jeffle Xu To: fstests@vger.kernel.org Cc: linux-ext4@vger.kernel.org, joseph.qi@linux.alibaba.com, Jeffle Xu Subject: [PATCH RFC 2/2] xfstests: common/rc: add cluster size support for ext4 Date: Fri, 24 Apr 2020 17:33:50 +0800 Message-Id: <1587720830-11955-3-git-send-email-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1587720830-11955-1-git-send-email-jefflexu@linux.alibaba.com> References: <1587720830-11955-1-git-send-email-jefflexu@linux.alibaba.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Inserting and collapsing range on ext4 with 'bigalloc' feature will fail due to the offset and size should be alligned with the cluster size. The previous patch has add support for cluster size in fsx. Detect and pass the cluster size parameter to fsx if the underlying filesystem is ext4 with bigalloc. Signed-off-by: Jeffle Xu --- common/rc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/rc b/common/rc index 2000bd9..71dde5f 100644 --- a/common/rc +++ b/common/rc @@ -3908,6 +3908,15 @@ run_fsx() { echo fsx $@ local args=`echo $@ | sed -e "s/ BSIZE / $bsize /g" -e "s/ PSIZE / $psize /g"` + + if [ "$FSTYP" == "ext4" ]; then + local cluster_size=$(tune2fs -l $TEST_DEV | grep 'Cluster size' | awk '{print $3}') + if [ -n $cluster_size ]; then + echo "cluster size: $cluster_size" + args="$args -u $cluster_size" + fi + fi + set -- $here/ltp/fsx $args $FSX_AVOID $TEST_DIR/junk echo "$@" >>$seqres.full rm -f $TEST_DIR/junk -- 1.8.3.1