linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: waxhead@dirtcellar.net, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/7] btrfs-progs: cmds/tune: add set/clear features
Date: Fri, 22 Sep 2023 08:23:51 +0930	[thread overview]
Message-ID: <9dace590-06c7-4cc4-bfae-0cf51d3de70e@suse.com> (raw)
In-Reply-To: <81c4792e-b7d9-73ab-452b-d840917ebbee@dirtcellar.net>



On 2023/9/22 08:03, waxhead wrote:
> 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)
>>
>> 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 just a regular BTRFS user I would like to please ask you to consider 
> having functions that may have consequences e.g. "dangerous" functions 
> disabled until enabled.
> 
> In other words much like you need to arm a missile or flip a safety 
> cover on a toggle switch
> 
> So if btrfs on every mount set a bit that disabled access to dangerous 
> functions (such as the tune functionality you would have to explicitly 
> enable it to be able to do scary stuff).
> 
> btrfs tune enable
> btrfs tune whatever_needs_tuning=123
> btrfs tune disable (manually disable scary functions)

We hide unsafe features behind the experimental flag of btrfs-progs, 
which is determined at compiling time.

Furthermore, all those features can be set/clear in "btrfs tune" must be 
done offline (unmounted).

Thus I think there is not much I can do to further improve the situation.

Thanks,
Qu

> 
> And yes, I am aware that root users have powers to do scary stuff, but 
> sometimes even root users need to be protected against free will.
> 
> Please consider something like the above...

  reply	other threads:[~2023-09-21 22:54 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 [this message]
2023-10-13 17:55   ` David Sterba
2023-10-13 18:50 ` David Sterba
2023-10-13 20:53   ` Qu Wenruo

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=9dace590-06c7-4cc4-bfae-0cf51d3de70e@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=waxhead@dirtcellar.net \
    /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).