linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ext4: Question about directory entry minor hash usage (documentation error?)
@ 2025-09-24 16:04 Zeno Endemann
  2025-09-24 19:37 ` Theodore Ts'o
  0 siblings, 1 reply; 3+ messages in thread
From: Zeno Endemann @ 2025-09-24 16:04 UTC (permalink / raw)
  To: linux-ext4

Hello,

The documentation of hash tree directories claims that interior nodes are
"indexed by a minor hash".

However from my current understanding of the code, it seems to me the node
splitting works somewhat like regular B-trees, and there is no re-sorting
with a minor hash going on. The minor hash doesn't influence at all the
on-disk data structure, and is only used for sorting in a kernel internal
rb-tree. Is this correct? If so, I could offer to write up a patch for the
documentation.

As a side question, I was wondering a bit why the kernel differentiates
between htree-indexed dirs and others when simply iterating over it (as in
e.g. ext4_readdir), and what the point of that rb-tree there is, i.e. why one
would want to iterate over the entries in hash tree order.


Thanks and cheers,
Zeno Endemann

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

end of thread, other threads:[~2025-09-25 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-24 16:04 ext4: Question about directory entry minor hash usage (documentation error?) Zeno Endemann
2025-09-24 19:37 ` Theodore Ts'o
2025-09-25 15:58   ` Zeno Endemann

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).