From e2c84823ede8fdfbb6a6e06233070a68f81af676 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 14 Sep 2026 14:35:46 +0200 Subject: [PATCH] mountpoint-util: improve logging when kernel lacks support for a certain fs type Inspired by #43752 --- src/basic/mountpoint-util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c index 4db4d8162f..49808cc962 100644 --- a/src/basic/mountpoint-util.c +++ b/src/basic/mountpoint-util.c @@ -678,8 +678,12 @@ int mount_option_supported(const char *fstype, const char *key, const char *valu assert(key); fd = fsopen(fstype, FSOPEN_CLOEXEC); - if (fd < 0) + if (fd < 0) { + if (errno == ENODEV) + return log_debug_errno(errno, "Kernel does not support file system type '%s'.", fstype); + return log_debug_errno(errno, "Failed to open superblock context for '%s': %m", fstype); + } /* Various file systems support fs context only in recent kernels (e.g. btrfs). For older kernels * fsconfig() with FSCONFIG_SET_STRING/FSCONFIG_SET_FLAG never fail. Which sucks, because we want to