sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget./translations/zh_CN/filesystems/ext4/directorymodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/zh_TW/filesystems/ext4/directorymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/it_IT/filesystems/ext4/directorymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ja_JP/filesystems/ext4/directorymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/ko_KR/filesystems/ext4/directorymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget./translations/sp_SP/filesystems/ext4/directorymodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhH/var/lib/git/docbuild/linux/Documentation/filesystems/ext4/directory.rsthKubhsection)}(hhh](htitle)}(hDirectory Entriesh]hDirectory Entries}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXIn an ext4 filesystem, a directory is more or less a flat file that maps an arbitrary byte string (usually ASCII) to an inode number on the filesystem. There can be many directory entries across the filesystem that reference the same inode number--these are known as hard links, and that is why hard links cannot reference files on other filesystems. As such, directory entries are found by reading the data block(s) associated with a directory file for the particular directory entry that is desired.h]hXIn an ext4 filesystem, a directory is more or less a flat file that maps an arbitrary byte string (usually ASCII) to an inode number on the filesystem. There can be many directory entries across the filesystem that reference the same inode number--these are known as hard links, and that is why hard links cannot reference files on other filesystems. As such, directory entries are found by reading the data block(s) associated with a directory file for the particular directory entry that is desired.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hLinear (Classic) Directoriesh]hLinear (Classic) Directories}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hX`By default, each directory lists its entries in an “almost-linear” array. I write “almost” because it's not a linear array in the memory sense because directory entries are not split across filesystem blocks. Therefore, it is more accurate to say that a directory is a series of data blocks and that each block contains a linear array of directory entries. The end of each per-block array is signified by reaching the end of the block; the last entry in the block has a record length that takes it all the way to the end of the block. The end of the entire directory is of course signified by reaching the end of the file. Unused directory entries are signified by inode = 0. By default the filesystem uses ``struct ext4_dir_entry_2`` for directory entries unless the “filetype” feature flag is not set, in which case it uses ``struct ext4_dir_entry``.h](hXBy default, each directory lists its entries in an “almost-linear” array. I write “almost” because it’s not a linear array in the memory sense because directory entries are not split across filesystem blocks. Therefore, it is more accurate to say that a directory is a series of data blocks and that each block contains a linear array of directory entries. The end of each per-block array is signified by reaching the end of the block; the last entry in the block has a record length that takes it all the way to the end of the block. The end of the entire directory is of course signified by reaching the end of the file. Unused directory entries are signified by inode = 0. By default the filesystem uses }(hhhhhNhNubhliteral)}(h``struct ext4_dir_entry_2``h]hstruct ext4_dir_entry_2}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh` for directory entries unless the “filetype” feature flag is not set, in which case it uses }(hhhhhNhNubh)}(h``struct ext4_dir_entry``h]hstruct ext4_dir_entry}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThe original directory entry format is ``struct ext4_dir_entry``, which is at most 263 bytes long, though on disk you'll need to reference ``dirent.rec_len`` to know for sure.h](h'The original directory entry format is }(hjhhhNhNubh)}(h``struct ext4_dir_entry``h]hstruct ext4_dir_entry}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhM, which is at most 263 bytes long, though on disk you’ll need to reference }(hjhhhNhNubh)}(h``dirent.rec_len``h]hdirent.rec_len}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh to know for sure.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jZhjWubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjWubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjWubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK(uh1jZhjWubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(hOffseth]hOffset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hSizeh]hSize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hNameh]hName}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjWubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hinodeh]hinode}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hj+ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h8Number of the inode that this directory entry points to.h]h8Number of the inode that this directory entry points to.}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjBubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjbubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h)}(h__le16h]h__le16}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjyubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h)}(hrec_lenh]hrec_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hjubah}(h]h ]h"]h$]h&]uh1jhj_ubj)}(hhh]h)}(h8Length of this directory entry. Must be a multiple of 4.h]h8Length of this directory entry. Must be a multiple of 4.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jhj_ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x6h]h0x6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le16h]h__le16}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hname_lenh]hname_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLength of the file name.h]hLength of the file name.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK7hj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x8h]h0x8}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hj,ubah}(h]h ]h"]h$]h&]uh1jhj)ubj)}(hhh]h)}(hcharh]hchar}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjCubah}(h]h ]h"]h$]h&]uh1jhj)ubj)}(hhh]h)}(hname[EXT4_NAME_LEN]h]hname[EXT4_NAME_LEN]}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjZubah}(h]h ]h"]h$]h&]uh1jhj)ubj)}(hhh]h)}(h File name.h]h File name.}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hjqubah}(h]h ]h"]h$]h&]uh1jhj)ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjWubeh}(h]h ]h"]h$]h&]colsKuh1jUhjRubah}(h]h ]colwidths-givenah"]h$]h&]uh1jPhhhhhNhNubh)}(hXvSince file names cannot be longer than 255 bytes, the new directory entry format shortens the name_len field and uses the space for a file type flag, probably to avoid having to load every inode during directory tree traversal. This format is ``ext4_dir_entry_2``, which is at most 263 bytes long, though on disk you'll need to reference ``dirent.rec_len`` to know for sure.h](hSince file names cannot be longer than 255 bytes, the new directory entry format shortens the name_len field and uses the space for a file type flag, probably to avoid having to load every inode during directory tree traversal. This format is }(hjhhhNhNubh)}(h``ext4_dir_entry_2``h]hext4_dir_entry_2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhM, which is at most 263 bytes long, though on disk you’ll need to reference }(hjhhhNhNubh)}(h``dirent.rec_len``h]hdirent.rec_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh to know for sure.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK=hhhhubjQ)}(hhh]jV)}(hhh](j[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK(uh1jZhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hOffseth]hOffset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKHhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hSizeh]hSize}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hNameh]hName}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKJhj2ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhjIubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjrubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKMhjubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(hhh]h)}(hinodeh]hinode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhjubah}(h]h ]h"]h$]h&]uh1jhjoubj)}(hhh]h)}(h8Number of the inode that this directory entry points to.h]h8Number of the inode that this directory entry points to.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjubah}(h]h ]h"]h$]h&]uh1jhjoubeh}(h]h ]h"]h$]h&]uh1jhjlubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKPhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le16h]h__le16}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKQhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hrec_lenh]hrec_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLength of this directory entry.h]hLength of this directory entry.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjlubj)}(hhh](j)}(hhh]h)}(h0x6h]h0x6}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThj<ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(hhh]h)}(h__u8h]h__u8}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKUhjSubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(hhh]h)}(hname_lenh]hname_len}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjjubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(hhh]h)}(hLength of the file name.h]hLength of the file name.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jhjlubj)}(hhh](j)}(hhh]h)}(h0x7h]h0x7}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__u8h]h__u8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h file_typeh]h file_type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h'File type code, see ftype_ table below.h](hFile type code, see }(hjhhhNhNubh reference)}(hftype_h]hftype}(hjhhhNhNubah}(h]h ]h"]h$]h&]nameftyperefidftypeuh1jhjresolvedKubh table below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK[hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjlubj)}(hhh](j)}(hhh]h)}(h0x8h]h0x8}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK\hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hcharh]hchar}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hj6ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hname[EXT4_NAME_LEN]h]hname[EXT4_NAME_LEN]}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hjMubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h File name.h]h File name.}(hjghhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hjdubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjlubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jUhjubah}(h]h ]jah"]h$]h&]uh1jPhhhhhNhNubhtarget)}(h .. _ftype:h]h}(h]h ]h"]h$]h&]jjuh1jhKahhhhhh referencedKubh)}(h7The directory file type is one of the following values:h]h7The directory file type is one of the following values:}(hjhhhNhNubah}(h]jah ]h"]ftypeah$]h&]uh1hhhhKchhhhexpect_referenced_by_name}jjsexpect_referenced_by_id}jjsjKubjQ)}(hhh]jV)}(hhh](j[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK@uh1jZhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hValueh]hValue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKjhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hUnknown.h]hUnknown.}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKlhj)ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h0x1h]h0x1}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjIubah}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh]h)}(h Regular file.h]h Regular file.}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhj`ubah}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h0x2h]h0x2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1jhj}ubj)}(hhh]h)}(h Directory.h]h Directory.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h0x3h]h0x3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hCharacter device file.h]hCharacter device file.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hBlock device file.h]hBlock device file.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h0x5h]h0x5}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhj%ubah}(h]h ]h"]h$]h&]uh1jhj"ubj)}(hhh]h)}(hFIFO.h]hFIFO.}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhj<ubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h0x6h]h0x6}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj\ubah}(h]h ]h"]h$]h&]uh1jhjYubj)}(hhh]h)}(hSocket.h]hSocket.}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjsubah}(h]h ]h"]h$]h&]uh1jhjYubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h0x7h]h0x7}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKyhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hSymbolic link.h]hSymbolic link.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jUhjubah}(h]h ]jah"]h$]h&]uh1jPhhhhhNhNubh)}(hXTo support directories that are both encrypted and casefolded directories, we must also include hash information in the directory entry. We append ``ext4_extended_dir_entry_2`` to ``ext4_dir_entry_2`` except for the entries for dot and dotdot, which are kept the same. The structure follows immediately after ``name`` and is included in the size listed by ``rec_len`` If a directory entry uses this extension, it may be up to 271 bytes.h](hTo support directories that are both encrypted and casefolded directories, we must also include hash information in the directory entry. We append }(hjhhhNhNubh)}(h``ext4_extended_dir_entry_2``h]hext4_extended_dir_entry_2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh to }(hjhhhNhNubh)}(h``ext4_dir_entry_2``h]hext4_dir_entry_2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhm except for the entries for dot and dotdot, which are kept the same. The structure follows immediately after }(hjhhhNhNubh)}(h``name``h]hname}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh' and is included in the size listed by }(hjhhhNhNubh)}(h ``rec_len``h]hrec_len}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhE If a directory entry uses this extension, it may be up to 271 bytes.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK|hhhhubjQ)}(hhh]jV)}(hhh](j[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhj3 ubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhj3 ubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhj3 ubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK(uh1jZhj3 ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hOffseth]hOffset}(hjc hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj` ubah}(h]h ]h"]h$]h&]uh1jhj] ubj)}(hhh]h)}(hSizeh]hSize}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjw ubah}(h]h ]h"]h$]h&]uh1jhj] ubj)}(hhh]h)}(hNameh]hName}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj] ubj)}(hhh]h)}(h Descriptionh]h Description}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj] ubeh}(h]h ]h"]h$]h&]uh1jhjZ ubah}(h]h ]h"]h$]h&]uh1jhj3 ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h__le32h]h__le32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hhashh]hhash}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hThe hash of the directory nameh]hThe hash of the directory name}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hj6 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj3 ubah}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh]h)}(h__le32h]h__le32}(hjM hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjJ ubah}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh]h)}(h minor_hashh]h minor_hash}(hjd hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhja ubah}(h]h ]h"]h$]h&]uh1jhj0 ubj)}(hhh]h)}(h$The minor hash of the directory nameh]h$The minor hash of the directory name}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjx ubah}(h]h ]h"]h$]h&]uh1jhj0 ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj3 ubeh}(h]h ]h"]h$]h&]colsKuh1jUhj0 ubah}(h]h ]jah"]h$]h&]uh1jPhhhhhNhNubh)}(hXIn order to add checksums to these classic directory blocks, a phony ``struct ext4_dir_entry`` is placed at the end of each leaf block to hold the checksum. The directory entry is 12 bytes long. The inode number and name_len fields are set to zero to fool old software into ignoring an apparently empty directory entry, and the checksum is stored in the place where the name normally goes. The structure is ``struct ext4_dir_entry_tail``:h](hEIn order to add checksums to these classic directory blocks, a phony }(hj hhhNhNubh)}(h``struct ext4_dir_entry``h]hstruct ext4_dir_entry}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhX9 is placed at the end of each leaf block to hold the checksum. The directory entry is 12 bytes long. The inode number and name_len fields are set to zero to fool old software into ignoring an apparently empty directory entry, and the checksum is stored in the place where the name normally goes. The structure is }(hj hhhNhNubh)}(h``struct ext4_dir_entry_tail``h]hstruct ext4_dir_entry_tail}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubjQ)}(hhh]jV)}(hhh](j[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhj ubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhj ubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhj ubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK(uh1jZhj ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hOffseth]hOffset}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hSizeh]hSize}(hj$ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj! ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hNameh]hName}(hj; hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj8 ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h Descriptionh]h Description}(hjR hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjO ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hj{ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjx ubah}(h]h ]h"]h$]h&]uh1jhju ubj)}(hhh]h)}(h__le32h]h__le32}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhju ubj)}(hhh]h)}(hdet_reserved_zero1h]hdet_reserved_zero1}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhju ubj)}(hhh]h)}(h!Inode number, which must be zero.h]h!Inode number, which must be zero.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhju ubeh}(h]h ]h"]h$]h&]uh1jhjr ubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h__le16h]h__le16}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h det_rec_lenh]h det_rec_len}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h1Length of this directory entry, which must be 12.h]h1Length of this directory entry, which must be 12.}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj" ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjr ubj)}(hhh](j)}(hhh]h)}(h0x6h]h0x6}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjB ubah}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh]h)}(h__u8h]h__u8}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjY ubah}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh]h)}(hdet_reserved_zero2h]hdet_reserved_zero2}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjp ubah}(h]h ]h"]h$]h&]uh1jhj? ubj)}(hhh]h)}(h,Length of the file name, which must be zero.h]h,Length of the file name, which must be zero.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj? ubeh}(h]h ]h"]h$]h&]uh1jhjr ubj)}(hhh](j)}(hhh]h)}(h0x7h]h0x7}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h__u8h]h__u8}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hdet_reserved_fth]hdet_reserved_ft}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hFile type, which must be 0xDE.h]hFile type, which must be 0xDE.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjr ubj)}(hhh](j)}(hhh]h)}(h0x8h]h0x8}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h__le32h]h__le32}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj# ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h det_checksumh]h det_checksum}(hj= hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj: ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hDirectory leaf block checksum.h]hDirectory leaf block checksum.}(hjT hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjQ ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjr ubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]colsKuh1jUhj ubah}(h]h ]jah"]h$]h&]uh1jPhhhhhNhNubh)}(hThe leaf directory block checksum is calculated against the FS UUID, the directory's inode number, the directory's inode generation number, and the entire directory entry block up to (but not including) the fake directory entry.h]hThe leaf directory block checksum is calculated against the FS UUID, the directory’s inode number, the directory’s inode generation number, and the entire directory entry block up to (but not including) the fake directory entry.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]linear-classic-directoriesah ]h"]linear (classic) directoriesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hHash Tree Directoriesh]hHash Tree Directories}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hXA linear array of directory entries isn't great for performance, so a new feature was added to ext3 to provide a faster (but peculiar) balanced tree keyed off a hash of the directory entry name. If the EXT4_INDEX_FL (0x1000) flag is set in the inode, this directory uses a hashed btree (htree) to organize and find directory entries. For backwards read-only compatibility with ext2, this tree is actually hidden inside the directory file, masquerading as “empty” directory data blocks! It was stated previously that the end of the linear directory entry table was signified with an entry pointing to inode 0; this is (ab)used to fool the old linear-scan algorithm into thinking that the rest of the directory block is empty so that it moves on.h]hXA linear array of directory entries isn’t great for performance, so a new feature was added to ext3 to provide a faster (but peculiar) balanced tree keyed off a hash of the directory entry name. If the EXT4_INDEX_FL (0x1000) flag is set in the inode, this directory uses a hashed btree (htree) to organize and find directory entries. For backwards read-only compatibility with ext2, this tree is actually hidden inside the directory file, masquerading as “empty” directory data blocks! It was stated previously that the end of the linear directory entry table was signified with an entry pointing to inode 0; this is (ab)used to fool the old linear-scan algorithm into thinking that the rest of the directory block is empty so that it moves on.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hXThe root of the tree always lives in the first data block of the directory. By ext2 custom, the '.' and '..' entries must appear at the beginning of this first block, so they are put here as two ``struct ext4_dir_entry_2`` s and not stored in the tree. The rest of the root node contains metadata about the tree and finally a hash->block map to find nodes that are lower in the htree. If ``dx_root.info.indirect_levels`` is non-zero then the htree has two levels; the data block pointed to by the root node's map is an interior node, which is indexed by a minor hash. Interior nodes in this tree contains a zeroed out ``struct ext4_dir_entry_2`` followed by a minor_hash->block map to find leafe nodes. Leaf nodes contain a linear array of all ``struct ext4_dir_entry_2``; all of these entries (presumably) hash to the same value. If there is an overflow, the entries simply overflow into the next leaf node, and the least-significant bit of the hash (in the interior node map) that gets us to this next leaf node is set.h](hThe root of the tree always lives in the first data block of the directory. By ext2 custom, the ‘.’ and ‘..’ entries must appear at the beginning of this first block, so they are put here as two }(hj hhhNhNubh)}(h``struct ext4_dir_entry_2``h]hstruct ext4_dir_entry_2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh s and not stored in the tree. The rest of the root node contains metadata about the tree and finally a hash->block map to find nodes that are lower in the htree. If }(hj hhhNhNubh)}(h ``dx_root.info.indirect_levels``h]hdx_root.info.indirect_levels}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh is non-zero then the htree has two levels; the data block pointed to by the root node’s map is an interior node, which is indexed by a minor hash. Interior nodes in this tree contains a zeroed out }(hj hhhNhNubh)}(h``struct ext4_dir_entry_2``h]hstruct ext4_dir_entry_2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhc followed by a minor_hash->block map to find leafe nodes. Leaf nodes contain a linear array of all }(hj hhhNhNubh)}(h``struct ext4_dir_entry_2``h]hstruct ext4_dir_entry_2}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh; all of these entries (presumably) hash to the same value. If there is an overflow, the entries simply overflow into the next leaf node, and the least-significant bit of the hash (in the interior node map) that gets us to this next leaf node is set.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hXTo traverse the directory as a htree, the code calculates the hash of the desired file name and uses it to find the corresponding block number. If the tree is flat, the block is a linear array of directory entries that can be searched; otherwise, the minor hash of the file name is computed and used against this second block to find the corresponding third block number. That third block number will be a linear array of directory entries.h]hXTo traverse the directory as a htree, the code calculates the hash of the desired file name and uses it to find the corresponding block number. If the tree is flat, the block is a linear array of directory entries that can be searched; otherwise, the minor hash of the file name is computed and used against this second block to find the corresponding third block number. That third block number will be a linear array of directory entries.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hX To traverse the directory as a linear array (such as the old code does), the code simply reads every data block in the directory. The blocks used for the htree will appear to have no entries (aside from '.' and '..') and so only the leaf nodes will appear to have any interesting content.h]hX(To traverse the directory as a linear array (such as the old code does), the code simply reads every data block in the directory. The blocks used for the htree will appear to have no entries (aside from ‘.’ and ‘..’) and so only the leaf nodes will appear to have any interesting content.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hYThe root of the htree is in ``struct dx_root``, which is the full length of a data block:h](hThe root of the htree is in }(hj(hhhNhNubh)}(h``struct dx_root``h]hstruct dx_root}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj(ubh+, which is the full length of a data block:}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjQ)}(hhh]jV)}(hhh](j[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjKubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjKubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjKubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK(uh1jZhjKubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hOffseth]hOffset}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjxubah}(h]h ]h"]h$]h&]uh1jhjuubj)}(hhh]h)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjuubj)}(hhh]h)}(hNameh]hName}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjuubj)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjuubeh}(h]h ]h"]h$]h&]uh1jhjrubah}(h]h ]h"]h$]h&]uh1jhjKubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dot.inodeh]h dot.inode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hinode number of this directory.h]hinode number of this directory.}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjKubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(hhh]h)}(h__le16h]h__le16}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjbubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(hhh]h)}(h dot.rec_lenh]h dot.rec_len}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjyubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(hhh]h)}(hLength of this record, 12.h]hLength of this record, 12.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x6h]h0x6}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dot.name_lenh]h dot.name_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLength of the name, 1.h]hLength of the name, 1.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x7h]h0x7}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hu8h]hu8}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dot.file_typeh]h dot.file_type}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjCubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hFFile type of this entry, 0x2 (directory) (if the feature flag is set).h]hFFile type of this entry, 0x2 (directory) (if the feature flag is set).}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjZubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x8h]h0x8}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjzubah}(h]h ]h"]h$]h&]uh1jhjwubj)}(hhh]h)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjwubj)}(hhh]h)}(h dot.name[4]h]h dot.name[4]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjwubj)}(hhh]h)}(h “.\0\0\0”h]h “.000”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjwubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0xCh]h0xC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dotdot.inodeh]h dotdot.inode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h!inode number of parent directory.h]h!inode number of parent directory.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj$ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x10h]h0x10}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjDubah}(h]h ]h"]h$]h&]uh1jhjAubj)}(hhh]h)}(h__le16h]h__le16}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj[ubah}(h]h ]h"]h$]h&]uh1jhjAubj)}(hhh]h)}(hdotdot.rec_lenh]hdotdot.rec_len}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjrubah}(h]h ]h"]h$]h&]uh1jhjAubj)}(hhh]h)}(hJblock_size - 12. The record length is long enough to cover all htree data.h]hJblock_size - 12. The record length is long enough to cover all htree data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjAubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x12h]h0x12}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hdotdot.name_lenh]hdotdot.name_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLength of the name, 2.h]hLength of the name, 2.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x13h]h0x13}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hu8h]hu8}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hdotdot.file_typeh]hdotdot.file_type}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj<ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hFFile type of this entry, 0x2 (directory) (if the feature flag is set).h]hFFile type of this entry, 0x2 (directory) (if the feature flag is set).}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjSubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x14h]h0x14}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjsubah}(h]h ]h"]h$]h&]uh1jhjpubj)}(hhh]h)}(hcharh]hchar}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjpubj)}(hhh]h)}(hdotdot_name[4]h]hdotdot_name[4]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjpubj)}(hhh]h)}(h “..\0\0”h]h “..00”}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjpubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x18h]h0x18}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM!hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h!struct dx_root_info.reserved_zeroh]h!struct dx_root_info.reserved_zero}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM"hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hZero.h]hZero.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x1Ch]h0x1C}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM$hj=ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(hu8h]hu8}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM%hjTubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(h struct dx_root_info.hash_versionh]h struct dx_root_info.hash_version}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM&hjkubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(h$Hash type, see dirhash_ table below.h](hHash type, see }(hjhhhNhNubj)}(hdirhash_h]hdirhash}(hjhhhNhNubah}(h]h ]h"]h$]h&]namedirhashjdirhashuh1jhjjKubh table below.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM'hjubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x1Dh]h0x1D}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM(hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM)hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hstruct dx_root_info.info_lengthh]hstruct dx_root_info.info_length}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM*hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h$Length of the tree information, 0x8.h]h$Length of the tree information, 0x8.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM+hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x1Eh]h0x1E}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM,hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hu8h]hu8}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM-hj3ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h#struct dx_root_info.indirect_levelsh]h#struct dx_root_info.indirect_levels}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM.hjJubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hwDepth of the htree. Cannot be larger than 3 if the INCOMPAT_LARGEDIR feature is set; cannot be larger than 2 otherwise.h]hwDepth of the htree. Cannot be larger than 3 if the INCOMPAT_LARGEDIR feature is set; cannot be larger than 2 otherwise.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM/hjaubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x1Fh]h0x1F}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM1hjubah}(h]h ]h"]h$]h&]uh1jhj~ubj)}(hhh]h)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM2hjubah}(h]h ]h"]h$]h&]uh1jhj~ubj)}(hhh]h)}(h struct dx_root_info.unused_flagsh]h struct dx_root_info.unused_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM3hjubah}(h]h ]h"]h$]h&]uh1jhj~ubj)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x20h]h0x20}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM5hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le16h]h__le16}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM6hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hlimith]hlimit}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM7hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hWMaximum number of dx_entries that can follow this header, plus 1 for the header itself.h]hWMaximum number of dx_entries that can follow this header, plus 1 for the header itself.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM8hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x22h]h0x22}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM:hj=ubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(h__le16h]h__le16}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM;hjTubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(hcounth]hcount}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM<hjkubah}(h]h ]h"]h$]h&]uh1jhj:ubj)}(hhh]h)}(hRActual number of dx_entries that follow this header, plus 1 for the header itself.h]hRActual number of dx_entries that follow this header, plus 1 for the header itself.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1jhj:ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x24h]h0x24}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM?hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM@hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMAhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hCThe block number (within the directory file) that goes with hash=0.h]hCThe block number (within the directory file) that goes with hash=0.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMBhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x28h]h0x28}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMChjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hstruct dx_entryh]hstruct dx_entry}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMDhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h entries[0]h]h entries[0]}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMEhj5ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hIAs many 8-byte ``struct dx_entry`` as fits in the rest of the data block.h](hAs many 8-byte }(hjOhhhNhNubh)}(h``struct dx_entry``h]hstruct dx_entry}(hjWhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjOubh' as fits in the rest of the data block.}(hjOhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMFhjLubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjKubeh}(h]h ]h"]h$]h&]colsKuh1jUhjHubah}(h]h ]jah"]h$]h&]uh1jPhj hhhNhNubj)}(h .. _dirhash:h]h}(h]h ]h"]h$]h&]jjuh1jhMHhj hhhhjKubh)}(h2The directory hash is one of the following values:h]h2The directory hash is one of the following values:}(hjhhhNhNubah}(h]jah ]h"]dirhashah$]h&]uh1hhhhMJhj hhj}jjsj}jjsjKubjQ)}(hhh]jV)}(hhh](j[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK@uh1jZhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hValueh]hValue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLegacy.h]hLegacy.}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x1h]h0x1}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj>ubah}(h]h ]h"]h$]h&]uh1jhj;ubj)}(hhh]h)}(h Half MD4.h]h Half MD4.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjUubah}(h]h ]h"]h$]h&]uh1jhj;ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x2h]h0x2}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMVhjuubah}(h]h ]h"]h$]h&]uh1jhjrubj)}(hhh]h)}(hTea.h]hTea.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhjubah}(h]h ]h"]h$]h&]uh1jhjrubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x3h]h0x3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hLegacy, unsigned.h]hLegacy, unsigned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMYhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMZhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hHalf MD4, unsigned.h]hHalf MD4, unsigned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM[hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x5h]h0x5}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM\hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hTea, unsigned.h]hTea, unsigned.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM]hj1ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h0x6h]h0x6}(hjThhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM^hjQubah}(h]h ]h"]h$]h&]uh1jhjNubj)}(hhh]h)}(hSiphash.h]hSiphash.}(hjkhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM_hjhubah}(h]h ]h"]h$]h&]uh1jhjNubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jUhjubah}(h]h ]jah"]h$]h&]uh1jPhj hhhNhNubh)}(hmInterior nodes of an htree are recorded as ``struct dx_node``, which is also the full length of a data block:h](h+Interior nodes of an htree are recorded as }(hjhhhNhNubh)}(h``struct dx_node``h]hstruct dx_node}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh0, which is also the full length of a data block:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMahj hhubjQ)}(hhh]jV)}(hhh](j[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK(uh1jZhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hOffseth]hOffset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMihjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hNameh]hName}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMjhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMkhj-ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hjYhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMlhjVubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hhh]h)}(h__le32h]h__le32}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMmhjmubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hhh]h)}(h fake.inodeh]h fake.inode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMnhjubah}(h]h ]h"]h$]h&]uh1jhjSubj)}(hhh]h)}(h4Zero, to make it look like this entry is not in use.h]h4Zero, to make it look like this entry is not in use.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMohjubah}(h]h ]h"]h$]h&]uh1jhjSubeh}(h]h ]h"]h$]h&]uh1jhjPubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMphjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le16h]h__le16}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMqhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h fake.rec_lenh]h fake.rec_len}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMrhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h@The size of the block, in order to hide all of the dx_node data.h]h@The size of the block, in order to hide all of the dx_node data.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMshjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjPubj)}(hhh](j)}(hhh]h)}(h0x6h]h0x6}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMthj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hu8h]hu8}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMuhj7ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hname_lenh]hname_len}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMvhjNubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h=Zero. There is no name for this “unused” directory entry.h]h=Zero. There is no name for this “unused” directory entry.(?}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMwhjeubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjPubj)}(hhh](j)}(hhh]h)}(h0x7h]h0x7}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMxhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hu8h]hu8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMyhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h file_typeh]h file_type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMzhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hBZero. There is no file type for this “unused” directory entry.h]hBZero. There is no file type for this “unused” directory entry.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM{hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjPubj)}(hhh](j)}(hhh]h)}(h0x8h]h0x8}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM|hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le16h]h__le16}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM}hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hlimith]hlimit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM~hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hWMaximum number of dx_entries that can follow this header, plus 1 for the header itself.h]hWMaximum number of dx_entries that can follow this header, plus 1 for the header itself.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj/ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjPubj)}(hhh](j)}(hhh]h)}(h0xAh]h0xA}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjOubah}(h]h ]h"]h$]h&]uh1jhjLubj)}(hhh]h)}(h__le16h]h__le16}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjfubah}(h]h ]h"]h$]h&]uh1jhjLubj)}(hhh]h)}(hcounth]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj}ubah}(h]h ]h"]h$]h&]uh1jhjLubj)}(hhh]h)}(hRActual number of dx_entries that follow this header, plus 1 for the header itself.h]hRActual number of dx_entries that follow this header, plus 1 for the header itself.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1jhjPubj)}(hhh](j)}(hhh]h)}(h0xEh]h0xE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hThe block number (within the directory file) that goes with the lowest hash value of this block. This value is stored in the parent block.h]hThe block number (within the directory file) that goes with the lowest hash value of this block. This value is stored in the parent block.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjPubj)}(hhh](j)}(hhh]h)}(h0x12h]h0x12}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hstruct dx_entryh]hstruct dx_entry}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj0ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h entries[0]h]h entries[0]}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjGubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hIAs many 8-byte ``struct dx_entry`` as fits in the rest of the data block.h](hAs many 8-byte }(hjahhhNhNubh)}(h``struct dx_entry``h]hstruct dx_entry}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhjaubh' as fits in the rest of the data block.}(hjahhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj^ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjPubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jUhjubah}(h]h ]jah"]h$]h&]uh1jPhj hhhNhNubh)}(hThe hash maps that exist in both ``struct dx_root`` and ``struct dx_node`` are recorded as ``struct dx_entry``, which is 8 bytes long:h](h!The hash maps that exist in both }(hjhhhNhNubh)}(h``struct dx_root``h]hstruct dx_root}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh and }(hjhhhNhNubh)}(h``struct dx_node``h]hstruct dx_node}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh are recorded as }(hjhhhNhNubh)}(h``struct dx_entry``h]hstruct dx_entry}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh, which is 8 bytes long:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubjQ)}(hhh]jV)}(hhh](j[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK(uh1jZhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hOffseth]hOffset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hTypeh]hType}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj+ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hNameh]hName}(hjEhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjBubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjYubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hhashh]hhash}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Hash code.h]h Hash code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj|ubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hblockh]hblock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h^Block number (within the directory file, not filesystem blocks) of the next node in the htree.h]h^Block number (within the directory file, not filesystem blocks) of the next node in the htree.}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj,ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj|ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jUhjubah}(h]h ]jah"]h$]h&]uh1jPhj hhhNhNubh)}(hI(If you think this is all quite clever and peculiar, so does the author.)h]hI(If you think this is all quite clever and peculiar, so does the author.)}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubh)}(hXIf metadata checksums are enabled, the last 8 bytes of the directory block (precisely the length of one dx_entry) are used to store a ``struct dx_tail``, which contains the checksum. The ``limit`` and ``count`` entries in the dx_root/dx_node structures are adjusted as necessary to fit the dx_tail into the block. If there is no space for the dx_tail, the user is notified to run e2fsck -D to rebuild the directory index (which will ensure that there's space for the checksum. The dx_tail structure is 8 bytes long and looks like this:h](hIf metadata checksums are enabled, the last 8 bytes of the directory block (precisely the length of one dx_entry) are used to store a }(hjjhhhNhNubh)}(h``struct dx_tail``h]hstruct dx_tail}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjubh#, which contains the checksum. The }(hjjhhhNhNubh)}(h ``limit``h]hlimit}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjubh and }(hjjhhhNhNubh)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjjubhXG entries in the dx_root/dx_node structures are adjusted as necessary to fit the dx_tail into the block. If there is no space for the dx_tail, the user is notified to run e2fsck -D to rebuild the directory index (which will ensure that there’s space for the checksum. The dx_tail structure is 8 bytes long and looks like this:}(hjjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj hhubjQ)}(hhh]jV)}(hhh](j[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeKuh1jZhjubj[)}(hhh]h}(h]h ]h"]h$]h&]jeK(uh1jZhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hOffseth]hOffset}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hTypeh]hType}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hNameh]hName}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Descriptionh]h Description}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(h0x0h]h0x0}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjLubah}(h]h ]h"]h$]h&]uh1jhjIubj)}(hhh]h)}(hu32h]hu32}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjcubah}(h]h ]h"]h$]h&]uh1jhjIubj)}(hhh]h)}(h dt_reservedh]h dt_reserved}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjzubah}(h]h ]h"]h$]h&]uh1jhjIubj)}(hhh]h)}(hZero.h]hZero.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh](j)}(hhh]h)}(h0x4h]h0x4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h__le32h]h__le32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h dt_checksumh]h dt_checksum}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h&Checksum of the htree directory block.h]h&Checksum of the htree directory block.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jUhjubah}(h]h ]jah"]h$]h&]uh1jPhj hhhNhNubh)}(hThe checksum is calculated against the FS UUID, the htree index header (dx_root or dx_node), all of the htree indices (dx_entry) that are in use, and the tail block (dx_tail).h]hThe checksum is calculated against the FS UUID, the htree index header (dx_root or dx_node), all of the htree indices (dx_entry) that are in use, and the tail block (dx_tail).}(hj& hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj hhubeh}(h]hash-tree-directoriesah ]h"]hash tree directoriesah$]h&]uh1hhhhhhhhKubeh}(h]directory-entriesah ]h"]directory entriesah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjf error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(ftype]jadirhash]jaurefids}(j]jaj]jaunameids}(jA j> j j jjj9 j6 jju nametypes}(jA j jj9 juh}(j> hj hjjj6 j jju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.