xfs
[Top] [All Lists]

Re: [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkf

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized()
From: Eryu Guan <guaneryu@xxxxxxxxx>
Date: Fri, 4 Nov 2011 14:06:51 +0800
Cc: xfs@xxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=9T24K3aMz4xK1v2hwpcx1GzrObTHARpr5NZDLPsa4fw=; b=u6QYNEfB6vS8o5sNS8ODc83uxc4sxOPLkZ+tqZvZ5DiP4hM7injVcTd/uPogZAThQJ 5DSiDkr91l8cPQhRtJ1QWfcfsV4LfoHY5NTJbyizmRZqkekqd9vz9+IfvG0+mrNBv2vr oHOsJ1Z1y+0FisTws+DjvjKTvi6r11HVm+MrM=
In-reply-to: <20111104053908.GB16720@xxxxxxxxxxxxx>
References: <1320374284-1534-1-git-send-email-guaneryu@xxxxxxxxx> <1320374284-1534-2-git-send-email-guaneryu@xxxxxxxxx> <20111104053908.GB16720@xxxxxxxxxxxxx>
Reply-to: guaneryu@xxxxxxxxx
On Fri, Nov 4, 2011 at 1:39 PM, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> On Fri, Nov 04, 2011 at 10:38:04AM +0800, Eryu Guan wrote:
>> btrfs requires at least 256M file system size, so check 'fssize' in
>> _scratch_mkfs_sized first and give it a proper value. Otherwise
>> mkfs.btrfs will complain something like
>>
>> "File system size 267386880 bytes is too small, 256M is required at least"
>>
>> This makes 015 077 and 083 run on btrfs.
>
> But it's not really going to test the ENOSPC conditions it was designed
> to exercise.  It would be better to either find a way to make btrfs run on
> smaller filesystem, or call _notrun for too small filesystems on btrfs
> from _scratch_mkfs_sized.

Yes, you're right. I checked 015 (it would dd zero to btrfs to full) but forgot
to check 077 and 083.

I'll try to find a better way. Thanks for reviewing!

Eryu Guan
>
>>
>> Signed-off-by: Eryu Guan <guaneryu@xxxxxxxxx>
>> ---
>>  common.rc |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/common.rc b/common.rc
>> index e948169..ab61786 100644
>> --- a/common.rc
>> +++ b/common.rc
>> @@ -356,6 +356,11 @@ _scratch_mkfs_sized()
>>       /sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
>>       ;;
>>      btrfs)
>> +    # btrfs needs at least 256M file system size
>> +     if [ $fssize -lt $((256*1024*1024)) ]
>> +     then
>> +             fssize=$((256*1024*1024))
>> +     fi
>>       $MKFS_BTRFS_PROG $MKFS_OPTIONS -b $fssize $SCRATCH_DEV
>>       ;;
>>      *)
>> --
>> 1.7.7.1
>>
>> _______________________________________________
>> xfs mailing list
>> xfs@xxxxxxxxxxx
>> http://oss.sgi.com/mailman/listinfo/xfs
> ---end quoted text---
>

<Prev in Thread] Current Thread [Next in Thread>