linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Eryu Guan <eguan@redhat.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>,
	fstests@vger.kernel.org, Qu Wenruo <quwenruo@cn.fujitsu.com>
Subject: Re: [PATCH 1/2] btrfs/131: test for umount of read-only fs when quota rescan is paused
Date: Fri, 19 Aug 2016 15:20:07 -0400	[thread overview]
Message-ID: <c93508d9-712b-891d-2b55-8bc19b2a688f@suse.com> (raw)
In-Reply-To: <20160817084539.GS27776@eguan.usersys.redhat.com>


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

On 8/17/16 4:45 AM, Eryu Guan wrote:
> On Tue, Aug 16, 2016 at 02:30:21PM -0400, Jeff Mahoney wrote:
>> +_require_btrfs
>> +BTRFS_DEBUG_TREE_PROG="`set_prog_path btrfs-debug-tree`"
>> +_require_command "$BTRFS_DEBUG_TREE_PROG" btrfs-debug-tree
>> +TIMEOUT_PROG="`set_prog_path timeout`"
>> +_require_command "$TIMEOUT_PROG" timeout
> 
> The "set_prog_path" calls belong to common/config, we only need
> "_require_command" calls in test.

Ok, then we should probably fix up the existing cases that do this in
tests/ since this and the cp /lib/modules thing were copied from other
test cases in the repo.

>> +
>> +rm -f $seqres.full
>> +_scratch_mkfs >>$seqres.full 2>&1
>> +
>> +_scratch_mount
>> +cp -aR /lib/modules/$(uname -r) $SCRATCH_MNT
> 
> Consider populating the filesystem using _populate_fs or fsstress?

Same.

>> +
>> +# A qgroup rescan on an empty or small file system completes nearly
>> +# immediately.  We need to ensure that it runs long enough that it will
>> +# be paused on umount.  Snapshots slow down the rescan so we should see
>> +# the race without a lot of data.  This is an arbitrary number that
>> +# works on a ramdisk so it should be sufficient for any storage.
>> +for n in $(seq 1 100); do
>> +  _run_btrfs_util_prog subvolume snapshot $SCRATCH_MNT $SCRATCH_MNT/$n
> 
> Use tab for indention.

Ok.

>> +done
>> +_run_btrfs_util_prog quota enable $SCRATCH_MNT
>> +_scratch_unmount
>> +
>> +echo "read-write umount completed"
>> +
>> +# Confirm that the rescan is paused
>> +if ! $BTRFS_DEBUG_TREE_PROG $SCRATCH_DEV | \
>> +	egrep -q 'flags ON|SCANNING|INCONSISTENT scan'; then
>> +	echo "qgroup rescan not paused."
>> +fi
>> +_scratch_mount -r
>> +
>> +# If the bug exists, this will hang.  If we can kill it, that's another bug.
>> +$TIMEOUT_PROG 10 umount $SCRATCH_MNT
>> +if test $? -eq 124 ; then
>> +    echo "umount hung but was killed"
> 
> I see this log with 4.8-rc1 kernel, is that expected?

Yes, the patch was posted this week and hasn't landed yet.

Thanks,

-Jeff

-- 
Jeff Mahoney
SUSE Labs


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

      parent reply	other threads:[~2016-08-19 19:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16 18:30 [PATCH 1/2] btrfs/131: test for umount of read-only fs when quota rescan is paused Jeff Mahoney
2016-08-17  8:45 ` Eryu Guan
2016-08-17  8:59   ` Qu Wenruo
2016-08-19 19:20   ` Jeff Mahoney [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=c93508d9-712b-891d-2b55-8bc19b2a688f@suse.com \
    --to=jeffm@suse.com \
    --cc=eguan@redhat.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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).