git: sys/vfs/hammer: Add vol_no field to struct hammer_ioc_volume

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sat Apr 2 20:57:04 PDT 2016


commit ea32fae4e76648969a69cc4eb674d70f9240998a
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Sun Apr 3 04:05:44 2016 +0900

    sys/vfs/hammer: Add vol_no field to struct hammer_ioc_volume
    
    The problem with interface/commands HAMMER provides is that there
    is no way to know what the volume# is for each block device once
    newfs_hammer is done, while error messages and manpages, etc talk
    about the root volume without explaining what that really is.
    In order to clearly show what the root volume is, userspace hammer
    commands need to be able to retrieve relation between HAMMER
    volume# and block device path, and then print the block device
    with volume# 0.
    
    e914c91d which added hammer volume-list command should have added
    volume# field to the ioctl structure or at least assign reserved
    space for future extension. This is basically the only ioctl that
    can retrieve block device paths, but all it does is get the paths
    without any other related information. This commit adds volume#
    field to struct hammer_ioc_volume.
    
    This commit affects HAMMERIOC_ADD_VOLUME, HAMMERIOC_DEL_VOLUME,
    and HAMMERIOC_LIST_VOLUMES ioctls. These are only used by hammer
    volume-add, volume-del, volume-list and volume-blkdevs commands.
    This commit requires both /sbin/hammer and kernel rebuild.
    
    Also see 7aee7a8b and dae8f186.

Summary of changes:
 sys/vfs/hammer/hammer_ioctl.h  | 2 ++
 sys/vfs/hammer/hammer_volume.c | 1 +
 2 files changed, 3 insertions(+)

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


-- 
DragonFly BSD source repository



More information about the Commits mailing list