From: Josef Bacik <josef@toxicpanda.com>
To: Goffredo Baroncelli <kreijack@inwind.it>
Cc: linux-btrfs@vger.kernel.org,
Zygo Blaxell <ce3g8jdj@umail.furryterror.org>,
David Sterba <dsterba@suse.cz>,
Sinnamohideen Shafeeq <shafeeqs@panasas.com>,
Paul Jones <paul@pauljones.id.au>, Boris Burkov <boris@bur.io>
Subject: Re: [PATCH 0/7][V11] btrfs: allocation_hint
Date: Fri, 4 Mar 2022 09:56:42 -0500 [thread overview]
Message-ID: <YiIoqhq4uVfa1oyf@localhost.localdomain> (raw)
In-Reply-To: <d9d6f8a6-044c-648a-c677-d4258fc70154@inwind.it>
On Thu, Mar 03, 2022 at 08:01:00PM +0100, Goffredo Baroncelli wrote:
> On 02/03/2022 22.23, Josef Bacik wrote:
> > On Wed, Mar 02, 2022 at 08:30:22PM +0100, Goffredo Baroncelli wrote:
> [...]
> > >
> > > For simple filesystem (e.g. 1 disk), it is trivial (and not useful); for more complex
> > > one (2, 3 disks) it is easy to make mistake.
> > >
> > > btrfs-progs relies on major_minor; it is possible to used the BTRFS_IOC_DEV_INFO
> > > but it requires CAP_ADMIN....
> > >
> >
> > Well this just made me go look at the code and realize you don't require
> > CAP_ADMIN for the sysfs knob, which we're going to need. So using
> > BTRFS_IOC_DEV_INFO shouldn't be a problem. Thanks,
>
> I am not sure to be understood completely your answer, so I recap what I am doing:
> - replace the "int" interface in favor of a "string" interface (not "echo 123 > allocaton_hint"
> but "echo DATA_ONLY > allocaton_hint") [DONE]
> - remove the "kernel" patch related to "major_minor" [DONE]
> - update the btrfs-progs patch to use BTRFS_IOC_DEV_INFO instead of <devid>/major_minor [WIP]
>
>
> This will have the following consequences:
> - any user is still capable to read <devid>/allocaton_hint
> - only root is able to use "btrfs prop get allocaton_hint <devname>" (before any user)
Ah yeah I see how this is annoying, oh well it can't be helped.
> - only root is able to update <devid>/allocaton_hint
> - only root is able to use "btrfs prop set allocation_hint <devname>"
>
> The 2nd point may be relaxed allowing to use BTRFS_IOC_DEV_INFO even to not root user (
> I don't think that there is any sensitive data exported by BTRFS_IOC_DEV_INFO); but this will
> be done as separate patch.
Agreed, I think that's a reasonable thing, and yes separately please.
This is all good, thanks Goffredo!
Josef
prev parent reply other threads:[~2022-03-04 14:57 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 20:32 [PATCH 0/7][V11] btrfs: allocation_hint Goffredo Baroncelli
2022-01-26 20:32 ` [PATCH 1/7] btrfs: add flags to give an hint to the chunk allocator Goffredo Baroncelli
2022-01-26 20:32 ` [PATCH 2/7] btrfs: export the device allocation_hint property in sysfs Goffredo Baroncelli
2022-01-26 20:32 ` [PATCH 3/7] btrfs: change the device allocation_hint property via sysfs Goffredo Baroncelli
2022-01-26 20:32 ` [PATCH 4/7] btrfs: add allocation_hint mode Goffredo Baroncelli
2022-01-26 20:32 ` [PATCH 5/7] btrfs: rename dev_item->type to dev_item->flags Goffredo Baroncelli
2022-01-26 20:32 ` [PATCH 6/7] btrfs: add major and minor to sysfs Goffredo Baroncelli
2022-01-26 20:32 ` [PATCH 7/7] Add /sys/fs/btrfs/features/allocation_hint Goffredo Baroncelli
2022-02-15 18:49 ` [PATCH 0/7][V11] btrfs: allocation_hint Goffredo Baroncelli
2022-02-16 0:22 ` Qu Wenruo
2022-02-16 3:28 ` Zygo Blaxell
2022-02-16 4:43 ` Paul Jones
2022-02-25 20:18 ` Boris Burkov
2022-02-28 17:04 ` Josef Bacik
2022-02-28 21:01 ` Goffredo Baroncelli
2022-03-01 15:07 ` Josef Bacik
2022-03-01 18:55 ` Goffredo Baroncelli
2022-03-01 21:43 ` Josef Bacik
2022-03-02 19:30 ` Goffredo Baroncelli
2022-03-02 21:23 ` Josef Bacik
2022-03-03 19:01 ` Goffredo Baroncelli
2022-03-04 14:56 ` Josef Bacik [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=YiIoqhq4uVfa1oyf@localhost.localdomain \
--to=josef@toxicpanda.com \
--cc=boris@bur.io \
--cc=ce3g8jdj@umail.furryterror.org \
--cc=dsterba@suse.cz \
--cc=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
--cc=paul@pauljones.id.au \
--cc=shafeeqs@panasas.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).