DragonFly-2.3.1.329.g5a64ef master sys/vfs/hammer hammer.h hammer_inode.c hammer_transaction.c hammer_vnops.c

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Jun 20 19:42:18 PDT 2009


commit 5a64efa13fd54a45eec98cf4f8a8ee56842bf811
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sat Jun 20 19:29:57 2009 -0700

    HAMMER VFS - Implement inode number matching against the directory hash
    
    Change hammer_create_inode() and hammer_alloc_objid() to take the upper
    10 bits of the filename hash and attempt to use them as the lower 10 bits
    of the inode number.
    
    hammer_alloc_objid() now utilizes a small two-level 1024-bit bitmap to
    assign the low 10 bits of the inode number, on a per-directory basis.
    If a collision occurs a nearby value is used instead.
    
    The idea is for inode numbers to have approximately the same linearity
    as the directory read scan order, so programs such as cpio, tar, cpdup,
    find, and ls which do recursive scans of the directory tree get much
    better locality of reference for stat() and other related system calls.
    
    Based-on: Numerous discussions with people, esp corecode.

Summary of changes:
 sys/vfs/hammer/hammer.h             |   13 +++++-
 sys/vfs/hammer/hammer_inode.c       |   14 +++++--
 sys/vfs/hammer/hammer_transaction.c |   76 ++++++++++++++++++++++++++++++----
 sys/vfs/hammer/hammer_vnops.c       |   13 ++++--
 4 files changed, 95 insertions(+), 21 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5a64efa13fd54a45eec98cf4f8a8ee56842bf811


-- 
DragonFly BSD source repository





More information about the Commits mailing list