public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* btrfs and hibernation to swap file on it?
@ 2022-09-27 15:45 Christoph Anton Mitterer
  2022-09-28 19:12 ` Andrei Borzenkov
  2022-09-30 12:12 ` Forza
  0 siblings, 2 replies; 5+ messages in thread
From: Christoph Anton Mitterer @ 2022-09-27 15:45 UTC (permalink / raw)
  To: linux-btrfs

Hey.

Maybe someone could help me with that question:

I'd like to set up hibernation, using a swapfile on btrfs (which itself
is on dm-crypt).

Now I'm aware of the section on swaptfiles in btrfs(5) and their
restrictions... and I think these should be fine for me.


What I don't quite get is:

a) Hibernate seems to want an offset parameter for the swapfile. How is
that used respectively why is it needed.

Does that mean that hibernation directly writes/reads to/from the block
device?
And wouldn't that be kind of fragile (if something internally moves in
the fs... or if it's split in several extents and not one big
contiguous space)?

Guess I would be kinda scared to get some corruptions if something
writes directly to the btrfs' block device - other than btrfs.

Are there any suggestions with respect to btrfs? Like not using a
swapfile for hibernation, or is it considered safe?


b) Internet resources say that for btrfs one cannot use filefrag to get
the offset.
I found Omar's tool, but wondered whether the same had been directly
integrated into btrfs-progs in the meantime?



Thanks,
Chris.

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

end of thread, other threads:[~2022-10-23 21:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-27 15:45 btrfs and hibernation to swap file on it? Christoph Anton Mitterer
2022-09-28 19:12 ` Andrei Borzenkov
2022-10-23 21:19   ` Christoph Anton Mitterer
2022-09-30 12:12 ` Forza
2022-10-23 21:25   ` Christoph Anton Mitterer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox