linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Hibernation into swap file
@ 2019-05-05  7:50 Maksim Fomin
  2019-05-05  9:08 ` Andrei Borzenkov
  2019-05-06 11:32 ` David Sterba
  0 siblings, 2 replies; 10+ messages in thread
From: Maksim Fomin @ 2019-05-05  7:50 UTC (permalink / raw)
  To: linux-btrfs

Good day.

Since 5.0 btrfs supports swap files. Does it support hibernation into a swap file?

With kernel version 5.0.10 (archlinux) and btrfs-progs 4.20.2 (unlikely to be relevant, but still) when I try to hibernate with systemctl or by directly manipulating '/sys/power/resume' and '/sys/power/resume_offset', the kernel logs:

PM: Cannot find swap device, try swapon -a
PM: Cannot get swap writer

After digging into this issue I suspect that currently btrfs does not support hibernation into swap file (or does it?). Furthermore, I suspect that kernel mechanism of accessing swap file via 'resume_offset' is unreliable in btrfs case because it is more likely (comparing to other fs) to move files across filesystem which invalidates swap file offset, so the whole idea is dubious. So,

1) does btrfs supports hibernation into swap file?
2) is there mechanism to lock swap file?

Best regards,
Maxim Fomin






^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-01-27 19:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-05  7:50 Hibernation into swap file Maksim Fomin
2019-05-05  9:08 ` Andrei Borzenkov
2019-05-06  5:40   ` Chris Murphy
2019-05-06 18:25     ` Maksim Fomin
2019-05-09  6:13       ` Andrei Borzenkov
2019-05-09 17:04         ` Maksim Fomin
2019-05-06 11:32 ` David Sterba
2020-01-23 17:20   ` Chris Murphy
2020-01-24  4:03     ` Andrei Borzenkov
2020-01-27 19:25     ` Omar Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).