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
On Mon, 26 Mar 2012, Mike Gerdts wrote:
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.
That's not the case.
You are right. I should have tested this prior to
How can I test if a file on ZFS has holes, i.e. is a sparse file,
using the C api?
Olga
--
, _ _ ,
{ \/`o;- Olga Kryzhanovska -;o`\/ }
.'-/`-/ olga.kryzhanov...@gmail.com \-`\-'.
`'-..-| /
2012/3/26 ольга крыжановская olga.kryzhanov...@gmail.com:
How can I test if a file on ZFS has holes, i.e. is a sparse file,
using the C api?
See SEEK_HOLE in lseek(2).
--
Mike Gerdts
http://mgerdts.blogspot.com/
___
zfs-discuss mailing list
Mike, I was hoping that some one has a complete example for a bool
has_file_one_or_more_holes(const char *path) function.
Olga
2012/3/26 Mike Gerdts mger...@gmail.com:
2012/3/26 ольга крыжановская olga.kryzhanov...@gmail.com:
How can I test if a file on ZFS has holes, i.e. is a sparse file,
? olga.kryzhanov...@gmail.com wrote:
How can I test if a file on ZFS has holes, i.e. is a sparse file,
using the C api?
See star .
ftp://ftp.berlios.de/pub/star/
or
http://hg.berlios.de/repos/schillix-on/file/e3829115a7a4/usr/src/cmd/star/hole.c
The interface was
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...
#define _FILE_OFFSET_BITS 64
#includesys/types.h
#includeunistd.h
#includestdio.h
#includesys/stat.h
#includefcntl.h
int
main(int argc, char
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
On Mon, Mar 26, 2012 at 6:18 PM, Bob Friesenhahn
bfrie...@simple.dallas.tx.us 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
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
10 matches
Mail list logo