* [PATCH 1/2] xfstests: 083 make variable filesize as size in bytes
@ 2011-11-04 2:38 Eryu Guan
2011-11-04 2:38 ` [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized() Eryu Guan
0 siblings, 1 reply; 5+ messages in thread
From: Eryu Guan @ 2011-11-04 2:38 UTC (permalink / raw)
To: xfs; +Cc: Eryu Guan
The first argument of _scratch_mkfs_sized() should be file system size
in bytes, so '100m' is not a valid number, and the 'expr' expression in
_scratch_mkfs_sized() complains 'non-numeric argument' about it.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
---
083 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/083 b/083
index 441284e..e0670b9 100755
--- a/083
+++ b/083
@@ -91,7 +91,7 @@ workout()
echo "*** test out-of-space handling for random write operations"
-filesize=100m
+filesize=`expr 100 \* 1024 \* 1024`
agcount=6
numprocs=15
numops=1500
--
1.7.7.1
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized()
2011-11-04 2:38 [PATCH 1/2] xfstests: 083 make variable filesize as size in bytes Eryu Guan
@ 2011-11-04 2:38 ` Eryu Guan
2011-11-04 5:39 ` Christoph Hellwig
0 siblings, 1 reply; 5+ messages in thread
From: Eryu Guan @ 2011-11-04 2:38 UTC (permalink / raw)
To: xfs; +Cc: Eryu Guan
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.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
---
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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized()
2011-11-04 2:38 ` [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized() Eryu Guan
@ 2011-11-04 5:39 ` Christoph Hellwig
2011-11-04 6:06 ` Eryu Guan
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2011-11-04 5:39 UTC (permalink / raw)
To: Eryu Guan; +Cc: linux-btrfs, xfs
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.
>
> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
> ---
> 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@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
---end quoted text---
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized()
2011-11-04 5:39 ` Christoph Hellwig
@ 2011-11-04 6:06 ` Eryu Guan
2011-11-04 8:21 ` Stefan Behrens
0 siblings, 1 reply; 5+ messages in thread
From: Eryu Guan @ 2011-11-04 6:06 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-btrfs, xfs
On Fri, Nov 4, 2011 at 1:39 PM, Christoph Hellwig <hch@infradead.org> 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@gmail.com>
>> ---
>> 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@oss.sgi.com
>> http://oss.sgi.com/mailman/listinfo/xfs
> ---end quoted text---
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized()
2011-11-04 6:06 ` Eryu Guan
@ 2011-11-04 8:21 ` Stefan Behrens
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Behrens @ 2011-11-04 8:21 UTC (permalink / raw)
To: guaneryu; +Cc: Christoph Hellwig, linux-btrfs, xfs
On 11/4/2011 7:06 AM, Eryu Guan wrote:
> On Fri, Nov 4, 2011 at 1:39 PM, Christoph Hellwig <hch@infradead.org> 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"
Commit bd7d6d45 from Zhong, Xin <xin.zhong@intel.com> with date
6/21/2011 removed the 256MB size limitation in mkfs.c in btrfs-progs.
>>>
>>> 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@gmail.com>
>>> ---
>>> 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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-04 8:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-04 2:38 [PATCH 1/2] xfstests: 083 make variable filesize as size in bytes Eryu Guan
2011-11-04 2:38 ` [PATCH 2/2] xfstests: meet btrfs fs size requirement in _scratch_mkfs_sized() Eryu Guan
2011-11-04 5:39 ` Christoph Hellwig
2011-11-04 6:06 ` Eryu Guan
2011-11-04 8:21 ` Stefan Behrens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox