From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH multiple] btrfs, file system for the brave
Date: Wed, 9 Jun 2021 15:18:44 +0200 [thread overview]
Message-ID: <20210609131852.167416-1-w.bumiller@proxmox.com> (raw)
This is another take at btrfs storage support.
I wouldn't exactly call it great, but I guess it works (although I did
manage to break a few... Then again I also manged to do that with ZFS
(it just took a few years longer there...)).
This one's spread over quite a few repositories, so let's go through
them in apply-order:
* pve-common:
One nice improvement since the last go around is that by now btrfs
supports renameat2's `RENAME_EXCHANGE` flag.
* PATCH 1/1: Syscalls/Tools: add renameat2
The idea here is to have a more robust "rollback" implementation,
since "snapshots" in btrfs are really just losely connected
subvolumes, and there is no direct rollback functionality. Instead,
we simply clone the snapshot we want to roll back to (by making a
writable snapshot), and then rotate the clone into place before
cleaning up the now-old version.
Without `RENAME_EXCHANGE` this rotation required 2 syscalls
creating a small window where, if the process is stopped/killed,
the volume we're working on would not live in its designated place,
making it somewhat nasty to deal with. Now, the worst that happens
is an extra left-over snapshot lying around.
* pve-storage:
* PATCH 1/4: fix find_free_disk_name invocations
Just a non-issue I ran into (the parameter isn't actually used by
our implementors currently, but it confused me ;-) ).
* PATCH 2/4: add BTRFS storage plugin
The main implementation with btrfs send/recv saved up for patch 4.
(There's a note about `mkdir` vs `populate` etc., I intend to clean
this up later, we had some off-list discussion about this
already...)
Currently, container subvolumes are only allowed to be unsized
(size zero, like with our plain directory storage subvols), though
we *could* enable quota support with little effort, but quota
information is lost in send/recv operations, so we need to cover
this in our import/export format separately, if we want to.
(Although I have a feeling it wouldn't be nice for performance
anyway...)
* PATCH 3/4: update import/export storage API
_Technically_ I *could* do without, but it would be quite
inconvenient, and the information it adds to the methods is usually
readily available, so I think this makes sense.
* PATCH 4/4: btrfs: add 'btrfs' import/export format
This requires a bit more elbow grease than ZFS, though, so I split
this out into a separate patch.
* pve-container:
* PATCH 1/2: migration: fix snapshots boolean accounting
(The `with_snapshots` parameter is otherways not set correctly
since we handle the base volume last)
* PATCH 2/2: enable btrfs support via subvolumes
Some of this stuff should probably become a storage property...
For container volumes which aren't _unsized_ this still allocates
an ext4 formatted raw image. For size=0 volumes we'll have an
actual btrfs subvolume.
* qemu-server:
* PATCH 1/1: allow migrating raw btrfs volumes
Like in pve-container, some of this stuff should probably become a
storage property...
--
Big Terrifying Risky File System
next reply other threads:[~2021-06-09 13:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 13:18 Wolfgang Bumiller [this message]
2021-06-09 13:18 ` [pve-devel] [PATCH common] Syscalls/Tools: add renameat2 Wolfgang Bumiller
2021-06-15 12:35 ` [pve-devel] applied: " Thomas Lamprecht
2021-06-09 13:18 ` [pve-devel] [PATCH storage 1/4] fix find_free_disk_name invocations Wolfgang Bumiller
2021-06-15 12:36 ` [pve-devel] applied: " Thomas Lamprecht
2021-06-09 13:18 ` [pve-devel] [PATCH storage 2/4] add BTRFS storage plugin Wolfgang Bumiller
2021-06-10 12:40 ` Fabian Grünbichler
2021-06-10 12:59 ` Wolfgang Bumiller
2021-06-11 12:11 ` Fabian Ebner
2021-06-09 13:18 ` [pve-devel] [PATCH storage 3/4] update import/export storage API Wolfgang Bumiller
2021-06-10 12:30 ` Fabian Grünbichler
2021-06-09 13:18 ` [pve-devel] [PATCH storage 4/4] btrfs: add 'btrfs' import/export format Wolfgang Bumiller
2021-06-09 13:18 ` [pve-devel] [PATCH container 1/2] migration: fix snapshots boolean accounting Wolfgang Bumiller
2021-06-09 13:18 ` [pve-devel] [PATCH container 2/2] enable btrfs support via subvolumes Wolfgang Bumiller
2021-06-10 12:35 ` Fabian Grünbichler
2021-06-09 13:18 ` [pve-devel] [PATCH qemu-server] allow migrating raw btrfs volumes Wolfgang Bumiller
2021-06-10 12:35 ` Fabian Grünbichler
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=20210609131852.167416-1-w.bumiller@proxmox.com \
--to=w.bumiller@proxmox.com \
--cc=pve-devel@lists.proxmox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal