git: sbin/hammer: Fix terminology of buf_offset

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Dec 17 11:28:49 PST 2016


commit 0942cbbcb0916b68533d8df4fad644f2021041d5
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Sat Dec 17 09:00:44 2016 +0900

    sbin/hammer: Fix terminology of buf_offset
    
    This commit just renames (local and struct field) variables.
    No functional difference.
    
    The way HAMMER userspace uses name "buf_offset" is misleading.
    In kernel space, "buf_offset" is for arbitrary zone offsets that
    are not limited to zone-2, however in userspace "buf_offset" is
    used for zone-2. It should be renamed to "zone2_offset" so the
    terminology being used in kernel and userspace are the same.
    
    This is important because the name implies what's stored in
    upper 4 bits of 64 bits offset, and having misleading variable
    names tends to be error-prone (see the next commit).

Summary of changes:
 sbin/hammer/hammer_util.h |  2 +-
 sbin/hammer/ondisk.c      | 68 ++++++++++++++++++++++++-----------------------
 2 files changed, 36 insertions(+), 34 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/0942cbbcb0916b68533d8df4fad644f2021041d5


-- 
DragonFly BSD source repository



More information about the Commits mailing list