git: sys/vfs/hammer: Change/Fix ioctl API for HAMMERIOC_PFS_ITERATE

Tomohiro Kusumi tkusumi at crater.dragonflybsd.org
Sun Aug 14 00:27:12 PDT 2016


commit e0f42079306350f7daca49530c8efcbfbe5febf2
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date:   Sat Aug 13 14:52:29 2016 +0900

    sys/vfs/hammer: Change/Fix ioctl API for HAMMERIOC_PFS_ITERATE
    
    Rewrite hammer_ioc_iterate_pseudofs() as a proper hammer ioctl.
    This commit requires buildworld, but it only affects libhammer and
    hammer info command.
    
    This ioctl has had lots of design issues as mentioned in 898f9540
    and d8c56f70 in 2015. This ioctl is also just a variant of the
    existing HAMMER_IOC_GET_PSEUDOFS which originally existed before
    HAMMERIOC_PFS_ITERATE was added.
    
    (It can't be replaced with HAMMER_IOC_GET_PSEUDOFS at the moment,
    because of the difference in handling ondisk PFS data with deleted
    flag set, but it should be replaced or removed in the future.
    This interface is too tightly coupled with libhammer that no one
    else really needs this, and there is a way to do the same thing
    without using this ioctl. There is also a possible bug that comes
    from the way this ioctl and libhammer is assuming about PFS data
    with deleted flag set)
    
    This commit breaks userspace that's been directly using this ioctl,
    but I doubt anyone has done except for libhammer, as the existence
    of such an ioctl has never been mentioned in DragonFly manpages or
    other documents. Also note that this ioctl was added for libhammer,
    so no one else is likely to really care about it.

Summary of changes:
 lib/libhammer/info.c          | 21 ++++++++++++---------
 sys/vfs/hammer/hammer.h       |  2 +-
 sys/vfs/hammer/hammer_ioctl.c |  2 +-
 sys/vfs/hammer/hammer_ioctl.h | 12 ++----------
 sys/vfs/hammer/hammer_pfs.c   | 38 +++++++++++++++++---------------------
 5 files changed, 33 insertions(+), 42 deletions(-)

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


-- 
DragonFly BSD source repository


More information about the Commits mailing list