]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/missing.h
btrfs: beef-up btrfs support with a limited understanding of quota
authorLennart Poettering <lennart@poettering.net>
Wed, 21 Oct 2015 17:38:21 +0000 (19:38 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 21 Oct 2015 23:59:25 +0000 (01:59 +0200)
commit5bcd08db289cd02aad8a89b37b2a46244a7bd473
treea34bbcc4df2824efe169bf041572b0f78dc2620a
parent16597ac3903ddb68d5ef75e6aaa37e43866a376d
btrfs: beef-up btrfs support with a limited understanding of quota

With this change we understand more than just leaf quota groups for
btrfs file systems. Specifically:

- When we create a subvolume we can now optionally add the new subvolume
  to all qgroups its parent subvolume was member of too. Alternatively
  it is also possible to insert an intermediary quota group between the
  parent's qgroups and the subvolume's leaf qgroup, which is useful for
  a concept of "subtree" qgroups, that contain a subvolume and all its
  children.

- The remove logic for subvolumes has been updated to optionally remove
  any leaf qgroups or "subtree" qgroups, following the logic above.

- The snapshot logic for subvolumes has been updated to replicate the
  original qgroup setup of the source, if it follows the "subtree"
  design described above. It will not cover qgroup setups that introduce
  arbitrary qgroups, especially those orthogonal to the subvolume
  hierarchy.

This also tries to be more graceful when setting up /var/lib/machines as
btrfs. For example, if mkfs.btrfs is missing we don't even try to set it
up as loopback device.

Fixes #1559
Fixes #1129
14 files changed:
src/basic/btrfs-util.c
src/basic/btrfs-util.h
src/basic/missing.h
src/basic/path-util.c
src/basic/path-util.h
src/basic/rm-rf.c
src/import/export-tar.c
src/import/pull-common.c
src/import/pull-dkr.c
src/machine/machined-dbus.c
src/nspawn/nspawn.c
src/shared/machine-image.c
src/shared/machine-pool.c
src/test/test-btrfs.c