git: sys/vfs/hammer: Use HAMMER_ENCODE() for hammer_mod_rb_compare()

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Tue Dec 8 10:26:28 PST 2015


commit b49481fb7d7b5a6212b585b2cabe115f00cb5bd5
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Tue Dec 8 16:55:09 2015 +0900

    sys/vfs/hammer: Use HAMMER_ENCODE() for hammer_mod_rb_compare()
    
    Try not to hardcode 8 for volume fields.
    
    The 60 bits offset format changes, but the change doesn't affect
    RB-Tree's elements comparison. It works as long as it has volume
    bits and 52 bits offset within that volume. Whether HAMMER_ENCODE()
    is used or not, io[12]_offset are not valid offsets anyway.
    These offset values just need to be unique for physical locations.
    
    (A) before this commit
    ----oooooooooooooooooooooooooooooooooooooooooooooooooooovvvvvvvv
    (B) this commit
    ----vvvvvvvvoooooooooooooooooooooooooooooooooooooooooooooooooooo

Summary of changes:
 sys/vfs/hammer/hammer_io.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b49481fb7d7b5a6212b585b2cabe115f00cb5bd5


-- 
DragonFly BSD source repository



More information about the Commits mailing list