dirhash

{{Multiple issues|

{{Notability|date=June 2024}}

{{Third-party|date=June 2024}}

}}

Dirhash is a feature of FreeBSD that improves the speed of finding files in a directory. Rather than finding a file in a directory using a linear search algorithm, FreeBSD uses a hash table.[http://www.maths.tcd.ie/~dwmalone/p/bsdcon01.pdf Recent Filesystem Optimisations in FreeBSD, by Ian Dowse and David Malone][http://static.usenix.org/events/usenix02/tech/freenix/dowse.html Recent Filesystem Optimisations in FreeBSD, by Ian Dowse and David Malone, 2002 FREENIX Track Technical Program] The feature is backwards-compatible because the hash table is built in memory when the directory is accessed, and it does not affect the on-disk format of the filesystem, in contrast to systems such as Htree. Free space for new entries is also tracked in-memory, allowing addition of new entries without having to scan the directory.

Dirhash was implemented by Ian Dowse early in 2001 as an addition to UFS, operating in parallel with higher-level file system caching. It was imported into FreeBSD in July 2001.[https://svnweb.freebsd.org/base?view=revision&revision=79561 Commit message for dirhash] It was subsequently imported into OpenBSD in December 2003 and NetBSD in January 2005.

References

{{FreeBSD}}

Category:Disk file systems

Category:Hashing

Category:FreeBSD

{{storage-software-stub}}