fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: fdmanana@gmail.com, Qu Wenruo <wqu@suse.com>
Cc: fstests <fstests@vger.kernel.org>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] fstests: btrfs/011: Fill the fs to ensure we have enough data for dev-replace
Date: Wed, 25 Sep 2019 18:03:22 +0800	[thread overview]
Message-ID: <52c7fccb-a760-25ae-f3d0-14994ffe480e@gmx.com> (raw)
In-Reply-To: <CAL3q7H6Fo+79a36Bp1kRpfyczK5diRwtgkcNLewEY1Fj=dTPiQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2919 bytes --]



On 2019/9/25 下午5:48, Filipe Manana wrote:
[...]
>> +
>> +       # If the system is too fast and the fs is too small, then skip the test
>> +       if grep -q "No space left" $tmp.filler_result; then
>> +               ls -alh $SCRATCH_MNT >> $seqres.full
>> +               cat $tmp.filler_result >> $seqres.full
>> +               _notrun "system too fast and/or too small fs"
> 
> It would probably be better to require so minimal size for the
> filesystem instead.
> 
>> +       fi
>> +       # If killed properly, this file should be empty.
> 
> Confusing comment for me. If killed properly? How does that influence
> the file being empty?
> What influences the file being empty is that it's impossible (in
> practice) for xfs_io to complete the write in less then 2 seconds,
> assuming the fs isn't very small and it hits ENOSPC in less than 2
> seconds.

The point I want to express is, if xfs_io is killed by KILL signal
halfway without finish, it doesn't output anything. So if the output
file is not empty (and not ENOSPC), we must have something wrong happened.

I'll rephrase that line.

Thanks,
Qu
> 
> I would rephrase that or remove that line.
> 
> Other than that it looks ok to me.
> 
> Thanks
> 
>> +       # If something other than ENOSPC happened, output to make sure we can
>> +       # detect the error
>> +       cat $tmp.filler_result
>>         sync; sync
>>  }
>>
>> @@ -147,7 +178,7 @@ btrfs_replace_test()
>>         if [ "${with_cancel}Q" = "cancelQ" ]; then
>>                 # background the replace operation (no '-B' option given)
>>                 _run_btrfs_util_prog replace start -f $replace_options $source_dev $target_dev $SCRATCH_MNT
>> -               sleep 1
>> +               sleep $wait_time
>>                 _run_btrfs_util_prog replace cancel $SCRATCH_MNT
>>
>>                 # 'replace status' waits for the replace operation to finish
>> @@ -157,10 +188,10 @@ btrfs_replace_test()
>>                 grep -q canceled $tmp.tmp || _fail "btrfs replace status (canceled) failed"
>>         else
>>                 if [ "${quick}Q" = "thoroughQ" ]; then
>> -                       # On current hardware, the thorough test runs
>> -                       # more than a second. This is a chance to force
>> -                       # a sync in the middle of the replace operation.
>> -                       (sleep 1; sync) > /dev/null 2>&1 &
>> +                       # The thorough test runs around 2 * $wait_time seconds.
>> +                       # This is a chance to force a sync in the middle of the
>> +                       # replace operation.
>> +                       (sleep $wait_time; sync) > /dev/null 2>&1 &
>>                 fi
>>                 _run_btrfs_util_prog replace start -Bf $replace_options $source_dev $target_dev $SCRATCH_MNT
>>
>> --
>> 2.22.0
>>
> 
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2019-09-25 10:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23 12:43 [PATCH] fstests: btrfs/011: Fill the fs to ensure we have enough data for dev-replace Qu Wenruo
2019-09-25  9:48 ` Filipe Manana
2019-09-25 10:03   ` Qu Wenruo [this message]

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=52c7fccb-a760-25ae-f3d0-14994ffe480e@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=fdmanana@gmail.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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).