linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: tests/misc/058: reduce the space requirement and speed up the test
Date: Wed, 9 Aug 2023 14:35:12 +0200	[thread overview]
Message-ID: <ZNOIAAevFOADA3Zi@twin.jikos.cz> (raw)
In-Reply-To: <ZNOGCSts6w4tm9nI@twin.jikos.cz>

On Wed, Aug 09, 2023 at 02:26:49PM +0200, David Sterba wrote:
> On Tue, Aug 08, 2023 at 02:55:21PM +0800, Qu Wenruo wrote:
> > [BUG]
> > When I was testing misc/058, the fs still has around 7GiB free space,
> > but during that test case, btrfs kernel module reports write failures
> > and even git commands failed inside that fs.
> > 
> > And obviously the test case failed.
> > 
> > [CAUSE]
> > It turns out that, the test case itself would require 6GiB (4 data
> > disks) + 1.5GiB x 2 (the two replace target), thus it requires 9 GiB
> > free space.
> > 
> > And obviously my partition is not that large and failed.
> 
> The file sizes were picked so the replace is not too fast, this again
> depends on the system. Please add more space for tests.
> 
> > [FIX]
> > In fact, we really don't need that much space at all.
> > 
> > Our objective is to test "btrfs device replace --enqueue" functionality,
> > there is not much need to wait for 1 second, we can just do the enqueue
> > immediately.
> 
> This depends on the system and the sleep might be needed if the first
> command does not start the first replace. The test is not testing just
> the --enqueue, but that two replaces can be enqueued on top each other.
> So we need the first one to start.
> 
> > So this patch would reduce the file size to a more sane (and rounded)
> > 2GiB, and do the enqueue immediately.
> 
> I'm not sure that the test would actually work as intended after the
> changes. The sleeps and dependency on system is fragile but we don't
> have anything better than to over allocate and provide enough time for
> the other commands to catch up.

The reduced test still reliably verifies the fix so I'll apply it.
Thanks.

  reply	other threads:[~2023-08-09 12:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-08  6:55 [PATCH] btrfs-progs: tests/misc/058: reduce the space requirement and speed up the test Qu Wenruo
2023-08-09 12:26 ` David Sterba
2023-08-09 12:35   ` David Sterba [this message]
2023-08-10  1:06     ` Qu Wenruo
2023-08-10 14:22       ` David Sterba
2023-08-09 13:20 ` Josef Bacik

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=ZNOIAAevFOADA3Zi@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --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).