From patchwork Fri Feb 6 06:37:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaegeuk Kim X-Patchwork-Id: 5788851 Return-Path: X-Original-To: patchwork-fstests@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BEEA99F336 for ; Fri, 6 Feb 2015 06:37:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F360D201E4 for ; Fri, 6 Feb 2015 06:37:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1EA68201C0 for ; Fri, 6 Feb 2015 06:37:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751627AbbBFGhk (ORCPT ); Fri, 6 Feb 2015 01:37:40 -0500 Received: from mail.kernel.org ([198.145.29.136]:52886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090AbbBFGhk (ORCPT ); Fri, 6 Feb 2015 01:37:40 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1692201B4; Fri, 6 Feb 2015 06:37:39 +0000 (UTC) Received: from localhost (unknown [73.189.178.17]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A4FD2201CE; Fri, 6 Feb 2015 06:37:38 +0000 (UTC) From: Jaegeuk Kim To: Dave Chinner Cc: fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Jaegeuk Kim Subject: [PATCH 3/9 v5] common/rc: add _require_norecovery Date: Thu, 5 Feb 2015 22:37:07 -0800 Message-Id: <1423204633-66673-4-git-send-email-jaegeuk@kernel.org> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1423204633-66673-1-git-send-email-jaegeuk@kernel.org> References: <1423204633-66673-1-git-send-email-jaegeuk@kernel.org> X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds checking code whether filesystem supports norecovery mount option or not. And let use this into the following xfs test. xfs/200 (recovery vs ro-block device) * Currently, norecovery mount option is used by xfs only. But some of log-based filesystems (e.g., f2fs) are able to support it later. Signed-off-by: Jaegeuk Kim --- common/rc | 8 ++++++++ tests/xfs/200 | 1 + 2 files changed, 9 insertions(+) diff --git a/common/rc b/common/rc index 078d3ca..395bf6c 100644 --- a/common/rc +++ b/common/rc @@ -2332,6 +2332,14 @@ _require_scratch_shutdown() _scratch_unmount } +# Does norecovery support by this fs? +_require_norecovery() +{ + _scratch_mount -o ro,norecovery || \ + _notrun "$FSTYP does not support norecovery" + _scratch_unmount +} + # Does fiemap support? _require_fiemap() { diff --git a/tests/xfs/200 b/tests/xfs/200 index c62d2b8..bd6d0fd 100755 --- a/tests/xfs/200 +++ b/tests/xfs/200 @@ -46,6 +46,7 @@ _supported_os Linux _require_scratch_nocheck _require_scratch_shutdown +_require_norecovery _scratch_mkfs_xfs >/dev/null 2>&1