mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-26 08:55:18 +03:00
swap: tell swapon to reinitialize swap if needed
If the page size of a swap space doesn't match the page size of the currently running kernel, swapon will fail. Let's instruct it to reinitialize the swap space instead. (cherry picked from commitcc137d53e3
) (cherry picked from commita0ac79bce9
) (cherry picked from commit8be5a12c71
)
This commit is contained in:
parent
0e96d07e8c
commit
f8201271fd
@ -834,7 +834,7 @@ static void swap_enter_activating(Swap *s) {
|
||||
}
|
||||
}
|
||||
|
||||
r = exec_command_set(s->control_command, "/sbin/swapon", NULL);
|
||||
r = exec_command_set(s->control_command, "/sbin/swapon", "--fixpgsz", NULL);
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user