From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id q8B39qeS262008 for ; Mon, 10 Sep 2012 22:09:52 -0500 Received: from mail.sandeen.net (sandeen.net [63.231.237.45]) by cuda.sgi.com with ESMTP id g6lGJCprHcUCKKvg for ; Mon, 10 Sep 2012 20:10:55 -0700 (PDT) Message-ID: <504EABBF.3080008@sandeen.net> Date: Mon, 10 Sep 2012 22:10:55 -0500 From: Eric Sandeen MIME-Version: 1.0 Subject: Re: [PATCH v3] Add test case to test xfs projid32bit functionality a bit more extensively. References: <504EA627.2050906@sandeen.net> In-Reply-To: <504EA627.2050906@sandeen.net> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: xfs-bounces@oss.sgi.com Errors-To: xfs-bounces@oss.sgi.com To: Boris Ranto Cc: xfs-oss On 9/10/12 9:47 PM, Eric Sandeen wrote: > On 9/6/12 10:23 AM, Boris Ranto wrote: >> The test covers several areas including enabling projid32bit >> functionality dynamically by xfs_admin, dumping, restoring, quota >> reporting and xfs_db projid values reporting. >> This test case hits a bug with xfsdump/xfsrestore process on a >> projid32bit enabled filesystem. >> >> Signed-off-by: Boris Ranto > > there are just a couple things below, but I think we can get it > checked in unless Dave has further concerns - please see below. > >> --- >> 285 | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 285.out | 23 ++++++++++ >> group | 1 + >> 3 files changed, 168 insertions(+), 0 deletions(-) >> create mode 100644 285 >> create mode 100644 285.out >> >> diff --git a/285 b/285 >> new file mode 100644 >> index 0000000..a1e497d >> --- /dev/null >> +++ b/285 >> @@ -0,0 +1,144 @@ >> +#! /bin/bash >> +# FS QA Test No. 285 >> +# >> +# Test to verify project quota xfs_admin, xfsdump/xfsrestore and >> +# xfs_db functionality >> +# >> +#----------------------------------------------------------------------- >> +# Copyright (c) 2012 Red Hat, Inc. All Rights Reserved. >> +# >> +# This program is free software; you can redistribute it and/or >> +# modify it under the terms of the GNU General Public License as >> +# published by the Free Software Foundation. >> +# >> +# This program is distributed in the hope that it would be useful, >> +# but WITHOUT ANY WARRANTY; without even the implied warranty of >> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> +# GNU General Public License for more details. >> +# >> +# You should have received a copy of the GNU General Public License >> +# along with this program; if not, write the Free Software Foundation, >> +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA >> +# >> +#----------------------------------------------------------------------- >> +# >> +# creator >> +owner=ranto.boris@gmail.com >> + >> +seq=`basename $0` >> +echo "QA output created by $seq" >> +tmp=/tmp/$$ >> +here=`pwd` >> +status=1 # failure is the default! >> +trap "_cleanup; exit \$status" 0 1 2 3 15 >> +rm -f $seq.full >> + >> +# get standard environment, filters and checks >> +. ./common.rc >> +. ./common.quota >> + >> +_cleanup() >> +{ >> + cd / >> + umount $SCRATCH_MNT 2>/dev/null >> + rm -rf $tmp.* >> +} >> + >> +_print_projid() >> +{ >> + $XFS_DB_PROG -c "inode $1" \ >> + -c "print core.projid_lo" \ >> + -c "print core.projid_hi" \ >> + $SCRATCH_DEV >> +} >> + >> +# real QA test starts here >> +_supported_fs xfs >> +_require_xfs_quota >> +_require_scratch >> +_require_projid32bit >> + >> +# create xfs fs without projid32bit ability, will be gained by xfs_admin >> +_scratch_mkfs_xfs -i projid32bit=0 -d size=200m >> $seq.full \ >> + || _fail "mkfs failed" >> +_qmount_option "pquota" >> +_qmount >> +# require project quotas >> +_require_prjquota $SCRATCH_DEV >> + >> +dir=$SCRATCH_MNT/pquota >> + >> +status=1 >> + >> +mkdir -p $dir >> +touch $dir/{16,32}less > > Although I understand it ok, I might add a comment here saying: > > # create files to hold 16 and 32-bit project IDs > > In retrospect I might use 16bit and 32bit to make more sense. > Sorry, should have suggested that earlier. > > I could just change the names on checkin with a note if that's ok with you. > >> +inode16a=$(ls -i $dir/16less|cut -d ' ' -f 1) >> +inode32a=$(ls -i $dir/32less|cut -d ' ' -f 1) >> +$XFS_QUOTA_PROG -x -c "project -s -p $dir/16less 1234" $SCRATCH_DEV \ >> + >> $seq.full >> +$XFS_QUOTA_PROG -x -c "project -s -p $dir/32less 2123456789" $SCRATCH_DEV \ >> + >> $seq.full 2>&1 > > It's a little weird to set project quota on a regular file, but I guess it works, > so I guess it's ok. :) I take it back, Dave explained why this makes sense, inheritance from a dir isn't the only way to assign a quota to a project.... > So with those caveats I can do: > > Reviewed-by: Eric Sandeen > > and unless Dave has further comments I'll check it in in a bit. > > Thanks, > -Eric > _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs