]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: add fsconfig() btrfs workaround
authorKarel Zak <kzak@redhat.com>
Thu, 16 Feb 2023 12:44:24 +0000 (13:44 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 16 Feb 2023 12:44:24 +0000 (13:44 +0100)
commit77bc38ced48a4e098e18546e456029731ea0588e
treec1c70d77fe18ed940452870fba295c089824518a
parente84f01c1a6ec76ccaac35a1cd253ff6f535626e5
libmount: add fsconfig() btrfs workaround

The new kernel mount API is not properly implemented in all FS
drivers. See strace output:

fsconfig(3, FSCONFIG_SET_STRING, "source", "/dev/sda", 0) = 0
fsconfig(3, FSCONFIG_SET_STRING, "context", "system_u:object_r:root_t:s0", 0) = 0
fsconfig(3, FSCONFIG_CMD_CREATE, NULL, NULL, 0) = -1 EINVAL (Invalid argument)

Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context.c
libmount/src/context_mount.c
libmount/src/hook_mount.c
libmount/src/mountP.h