From: Qu Wenruo <wqu@suse.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/7] btrfs-progs: cmds/tune: add set/clear features
Date: Sat, 14 Oct 2023 07:23:33 +1030 [thread overview]
Message-ID: <b668cedc-560d-43da-a84d-d86acf1da756@suse.com> (raw)
In-Reply-To: <20231013185023.GV2211@twin.jikos.cz>
On 2023/10/14 05:20, David Sterba wrote:
> On Tue, Sep 05, 2023 at 03:51:42PM +0800, Qu Wenruo wrote:
>> This is the first step to convert btrfstune functionality to "btrfs
>> tune" subcommand group.
>>
>> For now only binary features, aka set and clear, is supported,
>> thus uuid and csum change is not yet implemented.
>> (Both need their own subcommand groups other than set/clear groups)
>
> There are the easy on/off features that can be added first but you also
> added the block-group-tree _conversion_. That's a different category and
> IMHO requires a separate command so we can add options to check or reset
> the unfinished state. And we also have the the conversion 'to' and
> 'from'.
>
> My current list of 1st level command groups is:
>
> - enable - for the simple on/off features (on)
> - disable - dtto, (off)
> - convert-to - for the BGT, checksum
> - convert-from - subset where the back conversion like BGT may make sense
So your idea is, if an conversion is a long running one, and can be
interrupted, then we need to go convert instead of simple on/off?
That makes sense, although my question is, does that makes any difference?
If we have an interrupted conversion, the only valid operation we can do
is to finish the conversion. No rollback for most conversions.
Thus in the end, it's sill on/off, just with an extra interrupted
status, but that status can only lead to the "on" state, thus it makes
no difference to have an dedicated state for it.
Thanks,
Qu
> - analyze - go through the structures and identify features (all, subset)
>
> We can add aliases like set for enable and clear for disable, the two
> conversion commands may not be necessary or even confusing when it's not
> clear which direction is the right one.
>
> Actions:
>
> - extref (on/off)
> - skinny-metadata (on/off)
> - no-holes (on)
> - seeding (on/off)
> - uuid rewrite (one time)
> - metadata_uuid (set value)
> - change checksum (convert-to)
> - currently there's the simple quota, this may change
>
> This should give examples of all categories of actions we might have in
> the future.
>
>> And even for set/clear, there is some changes to btrfstune:
>>
>> - Merge seed feature into set/clear
>> To enable seeding, just go "btrfs tune set seed <device>".
>>
>> - All supported features can be checked by "list-all" feature
>> Please note that, "btrfs tune set list-all" and
>> "btrfs tune clear list-all" will have different output.
>
> As the help test works, we would get that for free if all the
> implemented actions are also command names, i.e. 'btrfs tune convert-to'
> would list 'block-group-tree'.
prev parent reply other threads:[~2023-10-13 20:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 7:51 [PATCH 0/7] btrfs-progs: cmds/tune: add set/clear features Qu Wenruo
2023-09-05 7:51 ` [PATCH 1/7] btrfs-progs: export btrfs_feature structure Qu Wenruo
2023-09-21 0:32 ` Anand Jain
2023-09-21 21:35 ` Qu Wenruo
2023-09-05 7:51 ` [PATCH 2/7] btrfs-progs: cmds: add "btrfs tune set" subcommand group Qu Wenruo
2023-09-21 0:53 ` Anand Jain
2023-09-21 2:13 ` Qu Wenruo
2023-10-13 17:47 ` David Sterba
2023-10-30 8:26 ` Anand Jain
2023-09-05 7:51 ` [PATCH 3/7] btrfs-progs: cmds/tune: add set support for free-space-tree feature Qu Wenruo
2023-09-05 7:51 ` [PATCH 4/7] btrfs-progs: cmds/tune: add set support for block-group-tree feature Qu Wenruo
2023-09-05 7:51 ` [PATCH 5/7] btrfs-progs: cmds/tune: add set support for seeding device Qu Wenruo
2023-09-05 7:51 ` [PATCH 6/7] btrfs-progs: cmds/tune: add "btrfs tune clear" subcommand Qu Wenruo
2023-09-05 7:51 ` [PATCH 7/7] btrfs-progs: tests/cli: add a test case for "btrfs tune" subcommand Qu Wenruo
2023-09-20 23:03 ` [PATCH 0/7] btrfs-progs: cmds/tune: add set/clear features Qu Wenruo
2023-09-21 22:33 ` waxhead
2023-09-21 22:53 ` Qu Wenruo
2023-10-13 17:55 ` David Sterba
2023-10-13 18:50 ` David Sterba
2023-10-13 20:53 ` 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=b668cedc-560d-43da-a84d-d86acf1da756@suse.com \
--to=wqu@suse.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/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).