hammer2 - Initial HARDLINK -> DIRENT replacement code
* Initial removal of the vestiges of the old embedded inode code. Inodes
were moved to the root directory long ago but directories still contain
dummy OBJTYPE_HARDLINK inodes instead of real directory entries to point
to the moved inodes. These inodes ate 1024 bytes of disk space for each
directory entry.
* Remove the dummy OBJTYPE_HARDLINK inodes and replace with new
BREF_TYPE_DIRENT blockrefs. These blockrefs represent directory
entries, and the entire dirent will fit in the blockref (requiring
no data ref) if the filename is <= 64 bytes.
* This new DIRENT mechanic significantly improves performance and reduces
storage overage vs the previous mechanicn, for obvious reasons.
Directory entries are now 128 bytes instead of 1024 bytes, and since they
are collected together in indirect blocks or (if <= 4 entries) simply
placed in the 4 blockrefs embedded in the directory inode, the related
I/O tends to be fairly optimal.
Only directory entries whos filenames are > 64 bytes long require an
additional data block reference. For now, due to other constraints,
we use the minimum H2 allocation size of 1KB for these, so certainly
space is wasted. But in real life there aren't actually a whole lot
of filenames that are that long so it should be fine.
18 files changed: