Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Marcos Paulo de Souza <marcos@mpdesouza.com>
To: dsterba@suse.com, linux-btrfs@vger.kernel.org, fstests@vger.kernel.org
Cc: Marcos Paulo de Souza <mpdesouza@suse.com>
Subject: [PATCH v2] btrfs: 210: Ignore output from "quota rescan" after "quota enable"
Date: Tue, 21 Jul 2020 09:46:30 -0300	[thread overview]
Message-ID: <20200721124630.3112-1-marcos@mpdesouza.com> (raw)

From: Marcos Paulo de Souza <mpdesouza@suse.com>

Command "quota enable" triggers a quota rescan, but it can finish quick
in some machines leading to the next command "quota rescan" to be able
to start scanning again, and then printing "quota rescan started" making
the test fail.

In some machines this don't happen because the first rescan initiated by
"quota enable" is still running when "quota rescan" is executed, returning
-EINPROGRESS from ioctl BTRFS_IOC_QUOTA_RESCAN_STATUS and not printing the
message.

Ignoring any output from "quota rescan" solves the issue in both cases, and
this is already being done by others tests as well.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
---
 Patch v1 can be found here:
 https://www.spinics.net/lists/linux-btrfs/msg103177.html

 tests/btrfs/210 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/btrfs/210 b/tests/btrfs/210
index daa76a87..13d1a87b 100755
--- a/tests/btrfs/210
+++ b/tests/btrfs/210
@@ -46,7 +46,7 @@ _pwrite_byte 0xcd 0 16M "$SCRATCH_MNT/src/file" > /dev/null
 # by qgroup
 sync
 $BTRFS_UTIL_PROG quota enable "$SCRATCH_MNT"
-$BTRFS_UTIL_PROG quota rescan -w "$SCRATCH_MNT"
+$BTRFS_UTIL_PROG quota rescan -w "$SCRATCH_MNT" > /dev/null
 $BTRFS_UTIL_PROG qgroup create 1/0 "$SCRATCH_MNT"
 
 # Create a snapshot with qgroup inherit
-- 
2.27.0


             reply	other threads:[~2020-07-21 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 12:46 Marcos Paulo de Souza [this message]
2020-07-22 11:48 ` [PATCH v2] btrfs: 210: Ignore output from "quota rescan" after "quota enable" Filipe Manana

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=20200721124630.3112-1-marcos@mpdesouza.com \
    --to=marcos@mpdesouza.com \
    --cc=dsterba@suse.com \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mpdesouza@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