git: sys/vfs/hammer: Try to fix hammer_ioc_pfs_iterate() [2/2]
Tomohiro Kusumi
tkusumi at crater.dragonflybsd.org
Sat Apr 18 05:59:43 PDT 2015
commit 898f954026385a476a7b906cdf5450ca4bce0a93
Author: Tomohiro Kusumi <kusumi.tomohiro at gmail.com>
Date: Sat Apr 18 19:18:30 2015 +0900
sys/vfs/hammer: Try to fix hammer_ioc_pfs_iterate() [2/2]
- The ioctl HAMMERIOC_PFS_ITERATE added in commit 29d31c2d has
several design issues. This commit and the previous try to fix
them. Since it's been exposed to userspace, some of them are
left as it is with comments.
- Move hammer_ioc_pfs_iterate() to sys/vfs/hammer/hammer_pfs.c
and rename it to hammer_ioc_iterate_pseudofs().
- struct hammer_ioc_pfs_iterate was not necessary. The existing
struct hammer_ioc_pseudofs_rw which is being used by all other
pfs ioctls has everything HAMMERIOC_PFS_ITERATE needs given
that hammer_ioc_pfs_iterate::pos is just used as a pfs id.
Using the unique struct requires hammer_ioc_iterate_pseudofs()
extra conversion in order to make this ioctl behave like other
pfs ioctls using autodetect.
Summary of changes:
sys/vfs/hammer/hammer.h | 2 ++
sys/vfs/hammer/hammer_ioctl.c | 69 ++---------------------------------------
sys/vfs/hammer/hammer_pfs.c | 71 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 75 insertions(+), 67 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/898f954026385a476a7b906cdf5450ca4bce0a93
--
DragonFly BSD source repository
More information about the Commits
mailing list