News for hackers. Stuff that matters.
Re:A Deep Dive into Debian 13 /tmp: What's New, and What to ... by yjftsjthsd-h on Friday August 29, 2025 @02:34AM (#45060900)
ZFS /tmp is probably fine, but swapping to ZFS on Linux is dicey AIUI; there's an unfortunate possibility of deadlock https://github.com/openzfs/zfs/issues/7734
Re:A Deep Dive into Debian 13 /tmp: What's New, and What to ... by abrookewood on Friday August 29, 2025 @03:39AM (#45061284)
Ah, thanks for pointing that out - wasn't aware.
Re:A Deep Dive into Debian 13 /tmp: What's New, and What to ... by cromka on Friday August 29, 2025 @04:46AM (#45061712)
So maybe another filesystem with heavy checksums could be used? Btrfs or dm-crypt with integrity over ext4?
Re:A Deep Dive into Debian 13 /tmp: What's New, and What to ... by Vogtinator on Friday August 29, 2025 @07:58AM (#45062874)
swapfile on linux must be directly mapped, bypassing any filesystem level checksums (see https://btrfs.readthedocs.io/en/latest/Swapfile.html)
Re:A Deep Dive into Debian 13 /tmp: What's New, and What to ... by tatref on Friday August 29, 2025 @04:58AM (#45061804)
Why not dm-integrity?
Re:A Deep Dive into Debian 13 /tmp: What's New, and What to ... by yjftsjthsd-h on Friday August 29, 2025 @11:47AM (#45065608)
https://wiki.archlinux.org/title/Dm-integrity

> It uses journaling for guaranteeing write atomicity by default, which effectively halves the write speed.

That seems like a poor fit for swap IMO.

https://www.kernel.org/doc/html/latest/admin-guide/device-ma... says,

> There’s an alternate mode of operation where dm-integrity uses a bitmap instead of a journal. If a bit in the bitmap is 1, the corresponding region’s data and integrity tags are not synchronized - if the machine crashes, the unsynchronized regions will be recalculated. The bitmap mode is faster than the journal mode, because we don’t have to write the data twice, but it is also less reliable, because if data corruption happens when the machine crashes, it may not be detected.

It's not clear to me if that would be okay for swap (as long as you don't hibernate, maybe) or if it's sufficiently protected from corruption.