From patchwork Mon May 18 15:38:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Foster X-Patchwork-Id: 6430131 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 88C059F1C1 for ; Mon, 18 May 2015 15:38:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4ECD205DC for ; Mon, 18 May 2015 15:38:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6583D20411 for ; Mon, 18 May 2015 15:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754282AbbERPih (ORCPT ); Mon, 18 May 2015 11:38:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43069 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754104AbbERPie (ORCPT ); Mon, 18 May 2015 11:38:34 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4IFcVCp003616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 18 May 2015 11:38:31 -0400 Received: from bfoster.bfoster (dhcp-41-237.bos.redhat.com [10.18.41.237]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4IFcUFP019520; Mon, 18 May 2015 11:38:31 -0400 Received: by bfoster.bfoster (Postfix, from userid 1000) id B51E6124FD7; Mon, 18 May 2015 11:38:29 -0400 (EDT) From: Brian Foster To: fstests@vger.kernel.org Cc: xfs@oss.sgi.com Subject: [PATCH] xfs/007: use gquotino for project quotas on pre-v5 superblocks Date: Mon, 18 May 2015 11:38:29 -0400 Message-Id: <1431963509-54017-1-git-send-email-bfoster@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.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=unavailable 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 This test checks block usage on quota inodes based on the inode number values stored in the superblock. Version 5 superblocks (crc=1) have an independent project quota inode field to support concurrent group and project quotas. Older superblocks do not have the pquotino field. The gquotino field is reused for project quotas. The test currently unconditionally uses the pquotino field to determine the project quota inode. This causes failures on pre-v5 superblocks as the test queries the block usage of an incorrect inode number. Update the test to use gquotino as the project quota inode on such filesystems. Signed-off-by: Brian Foster --- tests/xfs/007 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/xfs/007 b/tests/xfs/007 index 01cc421..76c100f 100755 --- a/tests/xfs/007 +++ b/tests/xfs/007 @@ -50,7 +50,8 @@ _require_xfs_quota rm -f $seqres.full -_scratch_mkfs_xfs >/dev/null 2>&1 +_scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs +. $tmp.mkfs do_test() { @@ -88,11 +89,16 @@ _qmount_option "uquota,gquota" _qmount do_test uquotino gquotino ug -# Test user and project +# Test user and project. Note that pquotino only exists on v5 (crc=1) +# superblocks. Older supers reuse gquotino. +PQUOTINO=pquotino +if [ $_fs_has_crcs == 0 ]; then + PQUOTINO=gquotino +fi _qmount_option "uquota,pquota" _qmount _require_prjquota $SCRATCH_DEV -do_test uquotino pquotino up +do_test uquotino $PQUOTINO up # success, all done status=0