News for hackers. Stuff that matters.
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.