From: Paul Jones <paul@pauljones.id.au>
To: Josef Bacik <josef@toxicpanda.com>,
"kreijack@inwind.it" <kreijack@inwind.it>
Cc: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>,
David Sterba <dsterba@suse.cz>,
Sinnamohideen Shafeeq <shafeeqs@panasas.com>,
"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: RE: [RFC][V8][PATCH 0/5] btrfs: allocation_hint mode
Date: Thu, 16 Dec 2021 02:30:50 +0000 [thread overview]
Message-ID: <SYXPR01MB191899ADCADD056A4FEB74A39E779@SYXPR01MB1918.ausprd01.prod.outlook.com> (raw)
In-Reply-To: <Ybn0aq548kQsQu+z@localhost.localdomain>
> -----Original Message-----
> From: Josef Bacik <josef@toxicpanda.com>
> Sent: Thursday, 16 December 2021 12:58 AM
> To: kreijack@inwind.it
> Cc: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>; David Sterba
> <dsterba@suse.cz>; Sinnamohideen Shafeeq <shafeeqs@panasas.com>;
> Paul Jones <paul@pauljones.id.au>; linux-btrfs@vger.kernel.org
> Subject: Re: [RFC][V8][PATCH 0/5] btrfs: allocation_hint mode
>
> On Tue, Dec 14, 2021 at 09:41:21PM +0100, Goffredo Baroncelli wrote:
> > On 12/14/21 21:34, Josef Bacik wrote:
> > > On Tue, Dec 14, 2021 at 03:04:32PM -0500, Zygo Blaxell wrote:
> > > > On Tue, Dec 14, 2021 at 08:03:45PM +0100, Goffredo Baroncelli wrote:
> >
> > > >
> > > > I don't have a strong preference for either sysfs or ioctl, nor am
> > > > I opposed to simply implementing both. I'll let someone who does
> > > > have such a preference make their case.
> > >
> > > I think echo'ing a name into sysfs is better than bits for sure.
> > > However I want the ability to set the device properties via a
> > > btrfs-progs command offline so I can setup the storage and then
> > > mount the file system. I want
> > >
> > > 1) The sysfs interface so you can change things on the fly. This stays
> > > persistent of course, so the way it works is perfect.
> > >
> > > 2) The btrfs-progs command sets it on offline devices. If you point it at a
> > > live mounted fs it can simply use the sysfs thing to do it live.
> >
> > #2 is currently not implemented. However I think that we should do.
> >
> > The problem is that we need to update both:
> >
> > - the superblock (simple)
> > - the dev_item item (not so simple...)
> >
> > What about using only bits from the superblock to store this property ?
>
> I'm looking at the patches and you only are updating the dev_item, am I
> missing something for the super block?
>
> For offline all you would need to do is do the normal open_ctree,
> btrfs_search_slot to the item and update the device item type, that's
> straightforward.
>
> For online if you use btrfs prop you can see if the fs is mounted and just find
> the sysfs file to modify and do it that way.
>
> But this also brings up another point, we're going to want a compat bit for
> this. It doesn't make the fs unusable for old kernels, so just a normal
> BTRFS_FS_COMPAT_<whatever> flag is fine. If the setting gets set you set
> the compat flag.
I don't think that is necessary - I've remounted my filesystems a few times with an unpatched kernel, and all that happens is new blocks get allocated without any hints - I like that simplicity and compatibility. As long as it's mentioned in the docs I think it's fine.
Having a balance filter that only rebalances wrongly allocated blocks would be a nice addition though.
Paul.
next prev parent reply other threads:[~2021-12-16 2:30 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-24 15:31 [RFC][V8][PATCH 0/5] btrfs: allocation_hint mode Goffredo Baroncelli
2021-10-24 15:31 ` [PATCH 1/4] btrfs: add flags to give an hint to the chunk allocator Goffredo Baroncelli
2021-10-24 15:31 ` [PATCH 2/4] btrfs: export dev_item.type in /sys/fs/btrfs/<uuid>/devinfo/<devid>/type Goffredo Baroncelli
2021-10-24 15:31 ` [PATCH 3/4] btrfs: change the DEV_ITEM 'type' field via sysfs Goffredo Baroncelli
2021-10-24 15:31 ` [PATCH 4/4] btrfs: add allocator_hint mode Goffredo Baroncelli
2021-12-17 15:58 ` Hans van Kranenburg
2021-12-17 18:28 ` Goffredo Baroncelli
2021-12-17 19:41 ` Zygo Blaxell
2021-12-18 9:07 ` Goffredo Baroncelli
2021-12-18 22:48 ` Zygo Blaxell
2021-12-19 0:03 ` Graham Cobb
2021-12-19 2:30 ` Zygo Blaxell
2021-12-13 9:39 ` [RFC][V8][PATCH 0/5] btrfs: allocation_hint mode Paul Jones
2021-12-13 19:54 ` Goffredo Baroncelli
2021-12-13 21:15 ` Josef Bacik
2021-12-13 22:49 ` Zygo Blaxell
2021-12-14 14:31 ` Josef Bacik
2021-12-14 19:03 ` Goffredo Baroncelli
2021-12-14 20:04 ` Zygo Blaxell
2021-12-14 20:34 ` Josef Bacik
2021-12-14 20:41 ` Goffredo Baroncelli
2021-12-15 13:58 ` Josef Bacik
2021-12-15 18:53 ` Goffredo Baroncelli
2021-12-16 0:56 ` Josef Bacik
2021-12-17 5:40 ` Zygo Blaxell
2021-12-17 14:48 ` Josef Bacik
2021-12-17 16:31 ` Zygo Blaxell
2021-12-17 18:08 ` Goffredo Baroncelli
2021-12-16 2:30 ` Paul Jones [this message]
2021-12-14 1:03 ` Sinnamohideen, Shafeeq
2021-12-14 18:53 ` Goffredo Baroncelli
2021-12-14 20:35 ` 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=SYXPR01MB191899ADCADD056A4FEB74A39E779@SYXPR01MB1918.ausprd01.prod.outlook.com \
--to=paul@pauljones.id.au \
--cc=ce3g8jdj@umail.furryterror.org \
--cc=dsterba@suse.cz \
--cc=josef@toxicpanda.com \
--cc=kreijack@inwind.it \
--cc=linux-btrfs@vger.kernel.org \
--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).