diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2024-05-21 10:39:39 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-05-21 15:13:42 +0200 |
commit | 055b465a3f56f9d53370a47b91af9cc2ffad4470 (patch) | |
tree | 8c53621b45ea9b928ee6d4f248580e639da1b0b7 /src/basic/mountpoint-util.c | |
parent | Merge pull request #32869 from keszybz/dbus-release-session (diff) | |
download | systemd-055b465a3f56f9d53370a47b91af9cc2ffad4470.tar.xz systemd-055b465a3f56f9d53370a47b91af9cc2ffad4470.zip |
shared/mountpoint-util: for old kernels, assume "norecovery" is supported by btrfs
Fixup for e3828d7103a99a15a1e947ba3063294ead590631, as requested in
https://github.com/systemd/systemd/pull/32892#issuecomment-2117903328.
Diffstat (limited to '')
-rw-r--r-- | src/basic/mountpoint-util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c index 8e0dbb703a..66fa35b630 100644 --- a/src/basic/mountpoint-util.c +++ b/src/basic/mountpoint-util.c @@ -511,8 +511,12 @@ const char* fstype_norecovery_option(const char *fstype) { * old name if the new name doesn't work. */ if (streq(fstype, "btrfs")) { r = mount_option_supported(fstype, "rescue=nologreplay", NULL); + if (r == -EAGAIN) { + log_debug_errno(r, "Failed to check for btrfs 'rescue=nologreplay' option, assuming old kernel with 'norecovery': %m"); + return "norecovery"; + } if (r < 0) - log_debug_errno(r, "Failed to check for btrfs rescue=nologreplay option, assuming it is not supported: %m"); + log_debug_errno(r, "Failed to check for btrfs 'rescue=nologreplay' option, assuming it is not supported: %m"); if (r > 0) return "rescue=nologreplay"; } |