xfstest: preallocate file space greater then MAXEXTLEN
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 xfstest: preallocate file space greater then MAXEXTLEN
xfstest: preallocate file space greater then MAXEXTLEN
This test is trying to reserve file space greater then the maximum size allow per extent, this also using extsize to see if the extsize alignment does not overflow MAXEXTLEN.
You need to make sure that you are AG that are big enough to contain the entire extent.
Signed-off-by Alain Renaud <[email protected]>
---
288 | 88 88 + 0 - 0 ! 288.out | 2 2 + 0 - 0 ! group | 1 1 + 0 - 0 ! 3 files changed, 91 insertions(+) create mode 100755 288 create mode 100644 288.out
288 new file +88 -0
@@ -0,0 +1,88 @@ +#! /bin/bash +# FS QA Test No. 288 +# +# test preallocation using value greater the maximum size for extent. +# +#----------------------------------------------------------------------- +# Copyright (c) 2012 SGI. 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 [email protected] + +seq=`basename $0` +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 + +# get standard environment, filters and checks +. ./common.rc +. ./common.filter + +# real QA test starts here +_supported_fs xfs +_supported_os Linux + +_require_scratch + +rm -f $seq.full +# Use a small block size so we do not need to much disk +# space to get more the 2^21 block. Since the AG size +# also need to be bigger then 2^21 block. let's create +# a 4Gig filesystem with 1 AG. +if ! _scratch_mkfs_xfs -b size=512 \ + -d agcount=1,size=4294967296 >> $seq.full 2>&1 +then + echo "!!! failed to mkfs on $SCRATCH_DEV" + exit ${status} +fi + +_scratch_mount + +if ! cd ${SCRATCH_MNT} +then + echo "!!! failed to cd in SCRATCH_MNT" + exit ${status} +fi + +mkdir testdir +cd testdir +xfs_io -c 'extsize 1m' . +xfs_io -f -c 'resvsp 0 1g' testfile +rm testfile +xfs_io -f -c 'resvsp 512 1g' testfile +rm testfile + + +xfs_io -c 'extsize 4m' . +xfs_io -f -c 'resvsp 0 1g' testfile +rm testfile +xfs_io -f -c 'resvsp 512 1g' testfile +rm testfile + + +cd "$here" + +_scratch_unmount +echo "Silence is golden" + +# success, all done +status=0 +exit
288.out new file +2 -0
@@ -0,0 +1,2 @@ +QA output created by 288 +Silence is golden
group +1 -0
@@ -406,3 +406,4 @@ 285 auto rw 286 other 287 auto rw +288 auto quick rw
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs