mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
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.
This commit is contained in:
parent
72192b6cc9
commit
055b465a3f
@ -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";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user