]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r287103 (by avg): 5692 expose the number of hole blocks in a file
authormav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 3 Oct 2015 11:21:50 +0000 (11:21 +0000)
committermav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 3 Oct 2015 11:21:50 +0000 (11:21 +0000)
commit5d5fc50186bee4964d3d998af1ebfd3e8b47f402
tree0b461427b45aea26d66f6fab9537af061d356cc4
parent0d32c89d26ffc0c79d61b04828108009885ff1c7
MFC r287103 (by avg): 5692 expose the number of hole blocks in a file

FreeBSD porting notes:
- only kernel-side changes are merged
- the new ioctl is not actually implemented yet
- thus, the goal is to synchronize DMU code

illumos/illumos-gate@2bcf0248e992f292c7b814458bcdce2f004925d6

https://www.illumos.org/issues/5692
we would like to expose the number of hole (sparse) blocks in a file.
this can be useful to for example if you want to fill in the holes with
some data; knowing the number of holes in advances allows you to report
progress on hole filling. We could use SEEK_HOLE to do that but it would
be O(n) where n is the number of holes present in the file.

Author: Max Grossman <max.grossman@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Boris Protopopov <bprotopopov@hotmail.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

git-svn-id: svn://svn.freebsd.org/base/stable/10@288590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c