Subject: Re: What is /hdr/ subdirectory?

From: Sergey Matveev <[email-masked]>
Date: Wed, 11 Mar 2026 10:36:20 +0300

Greetings!

*** Hadmut Danisch [2026-03-11 00:28]:
>and I'm hunting the problem, why they do have different ownerships, the hdr
>file is owned by root and silently skipped by the daemon.

Maybe different toss/daemon processes running at different times with
different permissions/owners.

>So my question is: What is the /hdr/ file? On what occasion is it generated?

It is just a "cached" version of encrypted packet's header. Just its
stripped part. There are options to disable its generation entirely.

That feature was created to speed up process of listing/searching in big
spools on ZFS. ZFS uses by default rather big records: 128KiB. So
reading even a single byte of the packet, will lead to at least reading
of the single block, which is up to 128KiB (before compression). That
leads to big read-amplification during searching for packets in the
spool with acceptable niceness. Those hdr files is just a hack to
prevent that read-amplification.

-- 
Sergey Matveev (http://www.stargrave.org/)
LibrePGP: 12AD 3268 9C66 0D42 6967  FD75 CB82 0563 2107 AD8A