From: David Sterba <dsterba@suse.cz>
To: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Cc: dsterba@suse.cz, linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: About 'key type for persistent [...] items'
Date: Tue, 28 Nov 2017 20:32:44 +0100 [thread overview]
Message-ID: <20171128193244.GF3553@twin.jikos.cz> (raw)
In-Reply-To: <18237846-01f0-3177-a7ee-b254cd69e262@mendix.com>
On Tue, Nov 28, 2017 at 08:28:58PM +0100, Hans van Kranenburg wrote:
> >> E.g. if I wanted to (just a random idea) add per device statistics, and
> >> use this, I'd need to use the key also with objectid 1, 2, 3, etc... if
> >> I have multiple devices. That's already a no go if there's anyone in any
> >> other tree that is doing anything with any objectid in the range of
> >> valid device numbers.
> >
> > In that case there would be a new objectid PER_DEVICE_OBJECTID, with the
> > persistent key, and all the device ids can go to the offset field. The
> > objectid field should not be dynamic, by design.
>
> Ok, didn't think of that yet, clear.
>
> So... just a random idea...
You're not the first one to have that idea :)
> How cool would it be to have the block group items being done this
> way... PER_CHUNK_OBJECTID.
>
> Imagine the time to mount a large btrfs filesystem going down from
> minutes or tens of minutes to just a few seconds...
Exactly for that reason, but in such case we're allowed to grab a new
key type and set objectid to a value that would group all the bg items,
mayb also moving the to the beginning of the key space.
The slightly tricky part would be the backward compatibility when we'd
have to keep the existing bg and new-bg in sync, but there are no
fundamental obstacles.
prev parent reply other threads:[~2017-11-28 19:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-24 19:16 About 'key type for persistent [...] items' Hans van Kranenburg
2017-11-25 1:12 ` Qu Wenruo
2017-11-25 1:44 ` Qu Wenruo
2017-11-28 17:40 ` David Sterba
2017-11-28 17:34 ` David Sterba
2017-11-28 18:00 ` Hans van Kranenburg
2017-11-28 19:12 ` David Sterba
2017-11-28 19:28 ` Hans van Kranenburg
2017-11-28 19:32 ` 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=20171128193244.GF3553@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=hans.van.kranenburg@mendix.com \
--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).