Dirhash
   HOME

TheInfoList



OR:

Dirhash is a feature of
FreeBSD FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
that improves the speed of finding files in a directory. Rather than finding a file in a directory using a
linear search In computer science, a linear search or sequential search is a method for finding an element within a list. It sequentially checks each element of the list until a match is found or the whole list has been searched. A linear search runs in at ...
algorithm, FreeBSD uses a hash table. 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. An in-memory of space for new entries is also maintained, allowing addition of new entries without having to scan the directory to find free space. 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.Commit message for dirhash
/ref> It was subsequently imported into
OpenBSD OpenBSD is a security-focused, free and open-source, Unix-like operating system based on the Berkeley Software Distribution (BSD). Theo de Raadt created OpenBSD in 1995 by forking NetBSD 1.0. According to the website, the OpenBSD project em ...
in December 2003 and
NetBSD NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is a ...
in January 2005.


References

Disk file systems Hashing FreeBSD {{compu-stub