sys/vfs/hammer: Change/Fix ioctl API for HAMMERIOC_PFS_ITERATE
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sat, 13 Aug 2016 05:52:29 +0000 (14:52 +0900)
committerTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Sun, 14 Aug 2016 07:03:37 +0000 (16:03 +0900)
commite0f42079306350f7daca49530c8efcbfbe5febf2
tree3a52a2e6de3e74cee200d20c7b927f98a0910616
parent420829c2f1adedad6a71c9519c61a172bc189a89
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.
lib/libhammer/info.c
sys/vfs/hammer/hammer.h
sys/vfs/hammer/hammer_ioctl.c
sys/vfs/hammer/hammer_ioctl.h
sys/vfs/hammer/hammer_pfs.c