From patchwork Thu Aug 11 20:01:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Jain X-Patchwork-Id: 1058632 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7BJr6qn004659 for ; Thu, 11 Aug 2011 19:53:06 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753451Ab1HKTxC (ORCPT ); Thu, 11 Aug 2011 15:53:02 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:63376 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752312Ab1HKTxB (ORCPT ); Thu, 11 Aug 2011 15:53:01 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p7BJquBm022026 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 11 Aug 2011 19:52:58 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p7BJqtDo015999 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 11 Aug 2011 19:52:55 GMT Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p7BJqoF4000675; Thu, 11 Aug 2011 14:52:50 -0500 Received: from [10.186.101.88] (/10.186.101.88) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 11 Aug 2011 12:52:50 -0700 Message-ID: <4E443517.5090105@oracle.com> Date: Fri, 12 Aug 2011 04:01:27 +0800 From: Anand Jain User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, xfs@oss.sgi.com CC: Chris Mason Subject: [PATCH 2/3] Added test case 258 for btrfs defragmentation References: <4E3BA2F7.4080500@oracle.com> In-Reply-To: <4E3BA2F7.4080500@oracle.com> X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090203.4E44331A.00C9:SCFMA922111, ss=1, re=-4.000, fgs=0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 11 Aug 2011 19:53:06 +0000 (UTC) Signed-off-by: Anand Jain --- 258 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 258.out | 2 ++ group | 1 + 3 files changed, 63 insertions(+), 0 deletions(-) create mode 100755 258 create mode 100644 258.out diff --git a/258 b/258 new file mode 100755 index 0000000..798bbaf --- /dev/null +++ b/258 @@ -0,0 +1,60 @@ +#! /bin/bash +# FS QA Test No. 258 +# +# btrfs defragmentation tests +# +#----------------------------------------------------------------------- +# Copyright (c) 2011 Oracle. 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=anand.jain@oracle.com + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +_need_to_be_root +_supported_fs btrfs +_supported_os Linux +_require_scratch + +_scratch_mkfs $SCRATCH_DEV_POOL > /dev/null 2>&1 || _fail "mkfs failed" +_scratch_mount + +_fillfs 1 10 100 4096 8192 $SCRATCH_MNT + +btrfs filesystem defragment $SCRATCH_MNT +[ $? = 20 ] || _fail "Defragment failed" + +umount $SCRATCH_MNT || _fail "umount failed" + +echo "Silence is golden" +status=0; exit diff --git a/258.out b/258.out new file mode 100644 index 0000000..9d47016 --- /dev/null +++ b/258.out @@ -0,0 +1,2 @@ +QA output created by 258 +Silence is golden diff --git a/group b/group index 84c45da..739f806 100644 --- a/group +++ b/group @@ -371,3 +371,4 @@ deprecated 255 auto quick prealloc 256 auto quick 257 auto quick +258 auto quick