]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: add X-mount.nocanonicalize[=source|target]
authorKarel Zak <kzak@redhat.com>
Thu, 19 Sep 2024 09:13:22 +0000 (11:13 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 24 Sep 2024 10:40:19 +0000 (12:40 +0200)
commita904aefe307359700dc64e3ad524baa6ee19e82a
tree5d6d0eaf4f7e22a1035da741884ada2055886ea2
parent466ed6db5fb7e976cae8e0ab8fd45dc505070e99
libmount: add X-mount.nocanonicalize[=source|target]

The new kernel mount API can bind-mount over a symlink. However, this
feature does not work with libmount because it canonicalizes all paths
by default. A possible workaround is to use the --no-canonicalize
option on the mount(8) command line, but this is a heavy-handed
solution as it disables all conversions for all paths and tags (such
as LABEL=) and fstab processing.

This commit introduces the X-mount.nocanonicalize userspace mount
option to control canonicalization. It only affects paths used for
mounting and does not affect tags and searching in fstab. Additionally,
this setting possible to use in fstab.

If the optional argument [=source|target] is not specified, then paths
canonicalization is disabled for both the source and target paths.

Adresses: https://github.com/util-linux/util-linux/issues/2370
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context.c
libmount/src/context_mount.c
libmount/src/mountP.h
sys-utils/mount.8.adoc