git: sys/vfs/hammer: Add HAMMER_ROOT_VOLNO

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Mar 19 14:27:40 PDT 2016


commit 7a39af79b9dad7576da61478f1919db10a6ff00e
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Sun Mar 6 02:47:55 2016 +0900

    sys/vfs/hammer: Add HAMMER_ROOT_VOLNO
    
    The root volume# is always 0, so hammer userspace can use 0
    instead of having a global variable RootVolNo that needs to
    be set from -1 to 0 (and only 0).
    
    Ondisk volume header even has fields whose name start with
    vol0_xxx. This implies the root volume# is designed to be 0,
    but nothing else.

Summary of changes:
 sbin/hammer/blockmap.c           | 10 ++++------
 sbin/hammer/cmd_blockmap.c       |  5 ++---
 sbin/hammer/cmd_show.c           |  4 ++--
 sbin/hammer/hammer_util.h        |  1 -
 sbin/hammer/ondisk.c             | 18 +++++++-----------
 sbin/newfs_hammer/newfs_hammer.c | 15 +++++++--------
 sys/vfs/hammer/hammer_disk.h     |  2 ++
 7 files changed, 24 insertions(+), 31 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/7a39af79b9dad7576da61478f1919db10a6ff00e


-- 
DragonFly BSD source repository



More information about the Commits mailing list