]> git.ipfire.org Git - thirdparty/systemd.git/commit
repart: support "nodatacow" in btrfs subvolumes
authorAlberto Planas <aplanas@suse.com>
Wed, 4 Jun 2025 17:56:18 +0000 (19:56 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 2 Nov 2025 08:13:31 +0000 (17:13 +0900)
commitab1f4e506f3ea99e33563086c6477ded8e3f3f97
treee978d3226cb5af5527fa2ad4b74558e65cab1f59
parenteeedea94dabd3f4d3a48c3270ad05f00bf78f676
repart: support "nodatacow" in btrfs subvolumes

In btrfs-progs 6.15 it is planned to add a new parameter in mkfs.btrfs
--inode-flags, that can set attributes for subvolumes, directories, and
files.

The current supported attributes are "nodatacow", to disable CoW, and
"nodatasum", to disable the checksum.

This commit extend the "Subvolunes=" option to understand the
"nodatacow" flag for subvolums only.

If RepartOffline is enabled it will build the image without loopback
devices, using the correct --inode-flags parameters.

If RepartOffline is disabled it will use loopback devices and set the
btrfs attributes accordingly.

Signed-off-by: Alberto Planas <aplanas@suse.com>
man/repart.d.xml
src/basic/btrfs.h
src/basic/mkdir.c
src/basic/mkdir.h
src/repart/repart.c
src/shared/copy.c
src/shared/copy.h