DragonFlyBSD/src 6d9d83dsbin/newfs_hammer2 newfs_hammer2.8, sys/vfs/hammer2 hammer2_chain.c hammer2_disk.h

hammer2 - Adjust blockref to create an embedded area, start dirent work

* Create a type-specific embedded area in the blockref structure.  Move
  data_count and inode_count into the new area.  The blockref structure
  size does not change.

* Adjust code to access data_count and inode_count conditionally for
  BREF_TYPE_INODE, DATA, and INDIRECT types only.

* Now that we have abandoned embedding inodes directly in directories for
  normal operation, start working on removing HAMMER2_OBJTYPE_HARDLINK and
  creating a real directory entry abstraction.

  The real directory entry abstraction will allow directory entries to be
  directly embedded in blockref structures, without requiring a data
  reference for any filename <= 64 bytes.  This will be accomplished by
  using the new embedded area in the blockref for the directory entry
  header and the check area for the filename (up to 64 bytes).

  This will significantly improve directory compactness and I/O efficiency
  by reducing the directory entry overhead from 1152 bytes (1024 + 128) to
  just 128 bytes and guaranteeing locality since the blockrefs are
  collected together in indirect blocks.  Another nice facet is that since
  inodes can embed up to four direct blockrefs, any directory with <=
  4 entries in it can embed those entries in the directory inode itself.
  So small directories will wind up being VERY compact.

  We haven't entirely abandoned embedding inodes in directories as
  directory entries.  In fact, the feature is still used for superroot
  entries, and may be allowed in the future mixed into normal directories
  for 'special' non-hardlinkable directory inodes for quota control,
  subdirectory
  snapshot, and (NFS) export purposes.
DeltaFile
+37-15sys/vfs/hammer2/hammer2_chain.c
+42-2sys/vfs/hammer2/hammer2_disk.h
+16-10sbin/newfs_hammer2/newfs_hammer2.8
+2-16sys/vfs/hammer2/hammer2_vfsops.c
+10-4sys/vfs/hammer2/hammer2_ioctl.c
+5-2sys/vfs/hammer2/hammer2_vnops.c
+112-496 files

UnifiedSplitRaw