DragonFlyBSD/src da0cdd3lib/libstand hammer2.c, sbin/hammer2 cmd_debug.c subs.c

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.
DeltaFile
+155-56sys/vfs/hammer2/hammer2_chain.c
+170-22sys/vfs/hammer2/hammer2_inode.c
+99-81sys/vfs/hammer2/hammer2_xops.c
+107-27lib/libstand/hammer2.c
+39-43sys/vfs/hammer2/hammer2_vnops.c
+34-13sbin/hammer2/cmd_debug.c
+28-18sys/vfs/hammer2/hammer2_synchro.c
+19-6sys/vfs/hammer2/hammer2.h
+13-11sys/vfs/hammer2/hammer2_subr.c
+19-2sys/vfs/hammer2/hammer2_freemap.c
+8-7sys/vfs/hammer2/hammer2_disk.h
+3-8sys/vfs/hammer2/hammer2_ioctl.c
+10-0sys/vfs/hammer2/hammer2_flush.c
+2-2sys/vfs/hammer2/hammer2_strategy.c
+0-2sbin/hammer2/subs.c
+1-0sys/vfs/hammer2/hammer2_bulkfree.c
+1-0sys/vfs/hammer2/hammer2_vfsops.c
+1-0sys/vfs/hammer2/hammer2_io.c
+709-29818 files

UnifiedSplitRaw