Seems like here is a bug related to activating old swapspace file. If swap file already enabled (service restarted) then I got a error message:
Error: Could not enable swapfile '1': Device or resource busy
Checking source code in 'activate_old_swaps' method, looks like swapspace trying to activate already enabled swapfile because it does not check 'observed_in_wild':
if (valid_swapfile(d->d_name, &seqno) && !swapfiles[seqno].size)
Please double check, but it seems swapspace missing the following:
@@ -590,7 +604,7 @@ bool activate_old_swaps(void)
for (struct dirent *d = readdir(dir); d; d = readdir(dir))
{
int seqno;
- if (valid_swapfile(d->d_name, &seqno) && !swapfiles[seqno].size)
+ if (valid_swapfile(d->d_name, &seqno) && !swapfiles[seqno].size && !swapfiles[seqno].observed_in_wild)
{
#ifndef NO_CONFIG
if (!quiet) logm(LOG_INFO, "Found old swapfile '%d'", seqno);
Hello!
Seems like here is a bug related to activating old swapspace file. If swap file already enabled (service restarted) then I got a error message:
Error: Could not enable swapfile '1': Device or resource busy
Checking source code in 'activate_old_swaps' method, looks like swapspace trying to activate already enabled swapfile because it does not check 'observed_in_wild':
if (valid_swapfile(d->d_name, &seqno) && !swapfiles[seqno].size)
Please double check, but it seems swapspace missing the following: