From patchwork Fri Feb 6 06:37:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaegeuk Kim X-Patchwork-Id: 5788901 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 6E1429F88A for ; Fri, 6 Feb 2015 06:37:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9B75C20125 for ; Fri, 6 Feb 2015 06:37:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1AE1201E4 for ; Fri, 6 Feb 2015 06:37:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754067AbbBFGhs (ORCPT ); Fri, 6 Feb 2015 01:37:48 -0500 Received: from mail.kernel.org ([198.145.29.136]:52972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752385AbbBFGhs (ORCPT ); Fri, 6 Feb 2015 01:37:48 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 265EF201EC; Fri, 6 Feb 2015 06:37:47 +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 5A974201E4; Fri, 6 Feb 2015 06:37:46 +0000 (UTC) From: Jaegeuk Kim To: Dave Chinner Cc: fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Jaegeuk Kim Subject: [PATCH 8/9 v5] common/quota: give quota mount option per filesystem Date: Thu, 5 Feb 2015 22:37:12 -0800 Message-Id: <1423204633-66673-9-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 add _get_quota_option to assign the mount option selectively in: tests/xfs/087 Signed-off-by: Jaegeuk Kim --- common/quota | 15 +++++++++++++++ tests/xfs/087 | 7 ++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/common/quota b/common/quota index b320cf2..a103826 100644 --- a/common/quota +++ b/common/quota @@ -78,6 +78,21 @@ _require_xfs_quota() } # +# give quota option accoring to the filesystems. +# +_get_quota_option() +{ + case $FSTYP in + xfs) + _require_xfs_quota + echo "-o uquota" + ;; + *) + ;; + esac +} + +# # checks that the XFS project quota support in the kernel is enabled. # _require_prjquota() diff --git a/tests/xfs/087 b/tests/xfs/087 index 8da0f9c..2fd6f1a 100755 --- a/tests/xfs/087 +++ b/tests/xfs/087 @@ -62,7 +62,8 @@ _require_scratch _require_scratch_shutdown _require_logstate _require_v2log -_require_xfs_quota + +QUOTA_OPTION=`_get_quota_option` echo "*** init FS" umount $SCRATCH_DEV >/dev/null 2>&1 @@ -90,7 +91,7 @@ do # mount the FS _echofull "mount" - if ! _scratch_mount -o uquota >>$seqres.full 2>&1; then + if ! _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1; then _echofull "mount failed: $MOUNT_OPTIONS" continue fi @@ -116,7 +117,7 @@ do _scratch_xfs_logprint -n >>$seqres.full 2>&1 _echofull "mount with replay" - _scratch_mount -o uquota >>$seqres.full 2>&1 \ + _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1 \ || _fail "mount failed: $MOUNT_OPTIONS" # check on what FS looks like after log recovery