From patchwork Wed Sep 12 11:04:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zorro Lang X-Patchwork-Id: 10597373 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 E2D2E13B8 for ; Wed, 12 Sep 2018 11:04:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D38DE29772 for ; Wed, 12 Sep 2018 11:04:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C827529B7C; Wed, 12 Sep 2018 11:04:12 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 7932929B74 for ; Wed, 12 Sep 2018 11:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727709AbeILQIN (ORCPT ); Wed, 12 Sep 2018 12:08:13 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:56010 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727618AbeILQIN (ORCPT ); Wed, 12 Sep 2018 12:08:13 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4DD14070486; Wed, 12 Sep 2018 11:04:10 +0000 (UTC) Received: from dhcp-12-136.nay.redhat.com (unknown [10.66.12.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90DE263F36; Wed, 12 Sep 2018 11:04:09 +0000 (UTC) From: Zorro Lang To: fstests@vger.kernel.org Cc: linux-xfs@vger.kernel.org Subject: [PATCH] xfs/119: fix too small log size error Date: Wed, 12 Sep 2018 19:04:04 +0800 Message-Id: <20180912110404.32673-1-zlang@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 12 Sep 2018 11:04:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 12 Sep 2018 11:04:10 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'zlang@redhat.com' RCPT:'' Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP xfs/119 fails on 4k hard sector size device if reflink (with/without rmapbt) is enabled: # mkfs.xfs -f -m reflink=1,rmapbt=0 -l version=2,size=2560b,su=64k /dev/sdf log size 2560 blocks too small, minimum size is 2688 blocks # mkfs.xfs -f -m reflink=1,rmapbt=1 -l version=2,size=2560b,su=64k /dev/sdf log size 2560 blocks too small, minimum size is 4368 blocks So remove log size parameter and run mkfs.xfs again if it fails. Signed-off-by: Zorro Lang --- I saw Dave changed the log size once in commit: d0a3cc5a xfs/104: log size too small for 4k sector drives But it's still not enough after we have reflink feature now. I don't know why this case need "-l version=2,size=2560b,su=64k", if someone learns about this case, please tell me how to change this case properly. If the log size parameter is not necessary, I'd like to remove it. Thanks, Zorro tests/xfs/119 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/xfs/119 b/tests/xfs/119 index bf7f1ca8..d507aacf 100755 --- a/tests/xfs/119 +++ b/tests/xfs/119 @@ -40,7 +40,14 @@ sync export MKFS_OPTIONS="-l version=2,size=2560b,su=64k" export MOUNT_OPTIONS="-o logbsize=64k" -_scratch_mkfs_xfs >/dev/null +_scratch_mkfs_xfs >/dev/null 2>&1 +# The specified log size maybe too small if new features (e.g: reflink +# or/and rmapbt) is enabled. So if mkfs fails, don't specify log size +# and try to mkfs again. +if [ $? -ne 0 ]; then + export MKFS_OPTIONS="-l version=2,su=64k" + _scratch_mkfs_xfs >/dev/null +fi _scratch_mount