Comment 5 for bug 1878340

Revision history for this message
In , alecfeldman (alecfeldman-linux-kernel-bugs) wrote :

I followed the directions to get a swap file working on btrfs, including using resume=swap_device and resume_offset=swap_file_offset. The physical offset was retrieved using this script: https://github.com/osandov/osandov-linux/blob/master/scripts/btrfs_map_physical.c. I then divided the physical offset by the page size to get the resume offset. Hibernating into a swap file only works the first time after creation. Every subsequent hibernation leads my system to boot as if it were not resuming. Hibernating can also cause the backing device to unattach from the caching device, leading to an unbootable system. I then have to forcefully recreate the cache in order to fix it. Eventually, the above happens, but the filesystem also becomes corrupted as I can no longer reattatch the cache. This can be reproduced on any setup with bcache, btrfs on the cache, and a swap file on the btrfs system. I am not sure if this affects other filesystems.