Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/2] btrfs-progs: btrfstune: fix false alerts on dev-replace when changing csum
Date: Mon, 3 Jun 2024 21:57:03 +0200	[thread overview]
Message-ID: <20240603195703.GC12376@twin.jikos.cz> (raw)
In-Reply-To: <cover.1717299366.git.wqu@suse.com>

On Sun, Jun 02, 2024 at 01:15:31PM +0930, Qu Wenruo wrote:
> There is a bug report that if a btrfs has experienced any dev-replace,
> "btrfstune --csum" would always report a running dev-replace and refuse
> to continue.
> 
> It turns out that, DEV_REPLACE item is not a transient one (but not
> created properly as mkfs time either), after a dev-replace the
> DEV_REPLACE item would exist forever, recording the last dev-replace
> timestamp.

I don't think we want to create the item at mkfs time, this would be
confusing and not related to any previous dev-replace operation.

> Although I really hate such behavior (especially when balance item would
> be gone after a balance is finished/canceled), at least fix the problem
> first.

It's handled differently yeah, though the two operations are bit
different, one would run balance more often that dev-replace. But it's
still only for internal tracking, other than that it's not handled the
same way I don't se any problem.

> The first patch enhances the print-tree to properly output the
> contents of the dev-replace item, then the second patch fixes the
> problem.
> 
> I'd like to add test cases for it, but it turns out there is no csum
> change test cases.

I have tests locally from the time I developed it but yeah they should
be in the testsuite.

> My guess is we do not have proper way to skip the test if it's
> experiemental feature?

Currently there's no way to detect it. For some things we can use the
help text, like is done for some features in fstests.

> Maybe it's time to move csum change out of experiemental features?

This depends on creating the separate command group 'tune', this is in
the phase of interface review.

> Qu Wenruo (2):
>   btrfs-progs: print-tree: add support for dev-replace item
>   btrfs-progs: change-csum: handle finished dev-replace correctly

Added to devel, thanks.

      parent reply	other threads:[~2024-06-03 19:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02  3:45 [PATCH 0/2] btrfs-progs: btrfstune: fix false alerts on dev-replace when changing csum Qu Wenruo
2024-06-02  3:45 ` [PATCH 1/2] btrfs-progs: print-tree: add support for dev-replace item Qu Wenruo
2024-06-02  3:45 ` [PATCH 2/2] btrfs-progs: change-csum: handle finished dev-replace correctly Qu Wenruo
2024-06-03 19:57 ` David Sterba [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=20240603195703.GC12376@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