From patchwork Thu Oct 26 05:57:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gu Jinxiang X-Patchwork-Id: 10027493 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 656DA601E8 for ; Thu, 26 Oct 2017 05:58:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 406F828D1C for ; Thu, 26 Oct 2017 05:58:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21F7128D1F; Thu, 26 Oct 2017 05:58:14 +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=-6.9 required=2.0 tests=BAYES_00,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 8E32228D1C for ; Thu, 26 Oct 2017 05:58:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750974AbdJZF6M (ORCPT ); Thu, 26 Oct 2017 01:58:12 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:13956 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750957AbdJZF6M (ORCPT ); Thu, 26 Oct 2017 01:58:12 -0400 X-IronPort-AV: E=Sophos;i="5.43,368,1503331200"; d="scan'208";a="29625154" Received: from localhost (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 26 Oct 2017 13:58:10 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (unknown [10.167.33.85]) by cn.fujitsu.com (Postfix) with ESMTP id 45543481847A; Thu, 26 Oct 2017 13:58:11 +0800 (CST) Received: from localhost.localdomain (10.167.226.132) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 26 Oct 2017 13:58:09 +0800 From: Gu Jinxiang To: CC: , Gu JinXiang Subject: [PATCH] xfstests: Add message indicating btrfs-progs support FST in read-only mode Date: Thu, 26 Oct 2017 13:57:46 +0800 Message-ID: <1508997466-12859-1-git-send-email-gujx@cn.fujitsu.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [10.167.226.132] X-yoursite-MailScanner-ID: 45543481847A.A68DB X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: gujx@cn.fujitsu.com Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gu JinXiang btrfs-progs now support FST in read-only mode, so when space_cache=v2 enabled, this test case will fail. Add message to help user to understand this status. Signed-off-by: Gu JinXiang --- tests/btrfs/012 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/btrfs/012 b/tests/btrfs/012 index 85c82f07..529e6eca 100755 --- a/tests/btrfs/012 +++ b/tests/btrfs/012 @@ -96,6 +96,12 @@ cp -aR /lib/modules/`uname -r`/ $SCRATCH_MNT/new _scratch_unmount +space_cache_version=$(echo "$MOUNT_OPTIONS" | grep "space_cache=v2") +if [ -n "$space_cache_version" ]; then + _fail "since used space_cache=v2 when mount," \ + "and for FST btrfs-progs support is read-only."\ + "so btrfs-convert rollback will fail" +fi # Now restore the ext4 device $BTRFS_CONVERT_PROG -r $SCRATCH_DEV >> $seqres.full 2>&1 || \ _fail "btrfs-convert rollback failed"