linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Nikolay Borisov <nborisov@suse.com>,
	Qu Wenruo <quwenruo.btrfs@gmx.com>,
	fstests@vger.kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH RFC] fstests: generic/077: fix populate fs use _fill_fs()
Date: Fri, 12 Apr 2019 15:39:26 +0800	[thread overview]
Message-ID: <1586b0c1-c973-8ace-ca8b-e3f52298dd25@oracle.com> (raw)
In-Reply-To: <dd0e5f46-09b0-8be2-d909-2e011d72ff5e@suse.com>



On 12/4/19 3:27 PM, Nikolay Borisov wrote:
> 
> 
> On 12.04.19 г. 10:15 ч., Qu Wenruo wrote:
>>
>>
>> On 2019/4/12 下午1:24, Anand Jain wrote:
>>> Test case generic/077 uses files under /lib or /usr to fill SCRATCH_MNT.
>>> If /usr or /lib is below 256mb then test fails to run, or if these dirs
>>> are too large it takes a long time for the cp to finish. On my machine
>>> it takes 645sec.
>>
>> Wait for a minute, ths fs is only 256M sized, if it takes you over 10
>> minutes, there must be something else wrong.
> 
> I've had the same issue, the problem is that once the fs is full cp will
> continue happily trying to copy stuff and will just be failing with ENOSPC
> 
>>
>>>
>>> This patch propose to use the common/populate function _fill_fs() to
>>> write files into the target directory instead. However I am not too
>>> sure about the motivation of this test case in the first place, and
>>> why does it wanted to cp /usr or /lib,
>>
>> To my eyes, it's using /usr or /lib just for it's mostly full/contains a
>> lot of files for most systems.
>>
>>> and why fs should become full?
>>
>> Maybe to hit certain ENOSPC corner case for ACL/xattr, just my guess.
> 
> nod, I've used that test to test certain patches (latest this test was
> useful is when testing Anad's xattr/acl patches)
> 
>>
>>> Any idea? Thanks.
>>
>> Use populate_fs is definitely the right move.
>>
>> However I have some concern below.
>>
>> [snip]
>>>   echo "*** set default ACL"
>>>   setfacl -R -dm u:fsgqa:rwx,g::rwx,o::r-x,m::rwx $SCRATCH_MNT/subdir
>>>   
>>> -echo "*** populate filesystem, pass #1" | tee -a $seqres.full
>>> -cp -rf $filler $SCRATCH_MNT/subdir >$seqres.full 2>&1
>>> -
>>> -echo "*** populate filesystem, pass #2" | tee -a $seqres.full
>>> -cp -rf $filler $SCRATCH_MNT/subdir >$seqres.full 2>&1
>>> +blksz="$(_get_block_size $SCRATCH_MNT/subdir)"
>>> +echo "*** populate filesystem" | tee -a $seqres.full
>>> +echo "*** fill_fs $fs_size $SCRATCH_MNT/subdir $blksz 0" >> $seqres.full
>>> +_fill_fs $fs_size $SCRATCH_MNT/subdir $blksz 0 >> $seqres.full 2>&1
>>
>> Unlike the original behavior, which do 2 passes and the 2nd pass will
>> overwrite previous files.
>>
>> While after your modification, it's no longer the case.
>>
>> At least we should try to replay the 1st run to mimic the original behavior.
> 
> Looking at the test shouldn't the "set default acl" be done after the fs
> is completely full?

  Even by using a large /usr, the cp (2 iterations) was never been able
  to make the metadata full, (same with __full_fs() as well).

  After cp -r /usr <256mb fs> reported ENOSPC.
  stat -f -c "%f" /btrfs
   16488

Thanks, Anand

>>
>> Thanks,
>> Qu
>>
>>>   
>>>   _check_scratch_fs
>>>   
>>> diff --git a/tests/generic/077.out b/tests/generic/077.out
>>> index eae7226ab29c..9c143c902a2c 100644
>>> --- a/tests/generic/077.out
>>> +++ b/tests/generic/077.out
>>> @@ -1,7 +1,6 @@
>>>   QA output created by 077
>>>   *** create filesystem
>>>   *** set default ACL
>>> -*** populate filesystem, pass #1
>>> -*** populate filesystem, pass #2
>>> +*** populate filesystem
>>>   *** all done
>>>   *** unmount
>>>
>>

  reply	other threads:[~2019-04-12  7:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-12  5:24 [PATCH RFC] fstests: generic/077: fix populate fs use _fill_fs() Anand Jain
2019-04-12  7:15 ` Qu Wenruo
2019-04-12  7:27   ` Nikolay Borisov
2019-04-12  7:39     ` Anand Jain [this message]
2019-04-12  7:30   ` Anand Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1586b0c1-c973-8ace-ca8b-e3f52298dd25@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.com \
    --cc=quwenruo.btrfs@gmx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).