summaryrefslogtreecommitdiffstats
path: root/debian/patches/upstream/libmount-do-not-canonicalize-ZFS-source-dataset.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 13:14:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 13:14:45 +0000
commit1ceecc69711e82bee12203b95ac8fccfaad58b2d (patch)
treeef6b46cbd3d743073ea886c5d1eea074a0a2e295 /debian/patches/upstream/libmount-do-not-canonicalize-ZFS-source-dataset.patch
parentAdding upstream version 2.36.1. (diff)
downloadutil-linux-debian.tar.xz
util-linux-debian.zip
Adding debian version 2.36.1-8+deb11u1.debian/2.36.1-8+deb11u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--debian/patches/upstream/libmount-do-not-canonicalize-ZFS-source-dataset.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/upstream/libmount-do-not-canonicalize-ZFS-source-dataset.patch b/debian/patches/upstream/libmount-do-not-canonicalize-ZFS-source-dataset.patch
new file mode 100644
index 0000000..6dd2fe4
--- /dev/null
+++ b/debian/patches/upstream/libmount-do-not-canonicalize-ZFS-source-dataset.patch
@@ -0,0 +1,37 @@
+From: Karel Zak <kzak@redhat.com>
+Date: Thu, 14 Jan 2021 12:45:28 +0100
+Subject: libmount: do not canonicalize ZFS source dataset
+
+Fixes: https://github.com/karelzak/util-linux/issues/1231
+Addresses: https://github.com/systemd/systemd/issues/18188
+Addresses: https://github.com/openzfs/zfs/pull/11295
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ libmount/src/context.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/libmount/src/context.c b/libmount/src/context.c
+index 6196c71..46e2010 100644
+--- a/libmount/src/context.c
++++ b/libmount/src/context.c
+@@ -1764,7 +1764,7 @@ int mnt_context_prepare_srcpath(struct libmnt_context *cxt)
+ {
+ const char *path = NULL;
+ struct libmnt_cache *cache;
+- const char *t, *v, *src;
++ const char *t, *v, *src, *type;
+ int rc = 0;
+ struct libmnt_ns *ns_old;
+
+@@ -1786,6 +1786,11 @@ int mnt_context_prepare_srcpath(struct libmnt_context *cxt)
+ if (!src || mnt_fs_is_netfs(cxt->fs))
+ return 0;
+
++ /* ZFS source is always "dataset", not a real path */
++ type = mnt_fs_get_fstype(cxt->fs);
++ if (type && strcmp(type, "zfs") == 0)
++ return 0;
++
+ DBG(CXT, ul_debugobj(cxt, "srcpath '%s'", src));
+
+ ns_old = mnt_context_switch_target_ns(cxt);