On Mar 26, 2012, at 4:18 PM, Bob Friesenhahn wrote:
> On Mon, 26 Mar 2012, Andrew Gabriel wrote:
>> I just played and knocked this up (note the stunning lack of comments,
>> missing optarg processing, etc)...
>> Give it a list of files to check...
> This is a cool program, but programmers were asking (and answering) this same
> question 20+ years ago before there was anything like SEEK_HOLE.
> If file space usage is less than file directory size then it must contain a
> hole. Even for compressed files, I am pretty sure that Solaris reports the
> uncompressed space usage.
Also, prior to ZFS, you could look at the length of the file (ls -l or stat
struct st_size) and compare
to the size (ls -ls or stat struct st_blocks). If length > size (unit adjusted,
rounded up) then there are
In ZFS, this can be more difficult, because the size can be larger than the
due to copies. Also, if you have compression enabled, size can be < length.
DTrace Conference, April 3, 2012,
ZFS Performance and Training
zfs-discuss mailing list