Re: [zfs-discuss] test for holes in a file?

2012-03-27 Thread Bob Friesenhahn
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 po

Re: [zfs-discuss] test for holes in a file?

2012-03-27 Thread Casper . Dik
>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+ year

Re: [zfs-discuss] test for holes in a file?

2012-03-26 Thread Richard Elling
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 w

Re: [zfs-discuss] test for holes in a file?

2012-03-26 Thread Mike Gerdts
On Mon, Mar 26, 2012 at 6: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 programmer

Re: [zfs-discuss] test for holes in a file?

2012-03-26 Thread Bob Friesenhahn
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

Re: [zfs-discuss] test for holes in a file?

2012-03-26 Thread Andrew Gabriel
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 #include #include #include #include #include int main(int argc, char **argv) { int i; for (i = 1; i

Re: [zfs-discuss] test for holes in a file?

2012-03-26 Thread Joerg Schilling
? 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 defined for star in September 2

Re: [zfs-discuss] test for holes in a file?

2012-03-26 Thread ольга крыжановская
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 : > 2012/3/26 ольга крыжановская : >> 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 lse

Re: [zfs-discuss] test for holes in a file?

2012-03-26 Thread Mike Gerdts
2012/3/26 ольга крыжановская : > 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 zfs-discuss@opensolaris.org http:/

[zfs-discuss] test for holes in a file?

2012-03-26 Thread ольга крыжановская
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   \-`\-'.  `'-..-| /       http://twitter.com/fleyt

Re: [zfs-discuss] test

2011-04-17 Thread Tuomas Leikola
It's been quiet, seems. On Fri, Apr 15, 2011 at 5:09 PM, Jerry Kemp wrote: > I have not seen any email from this list in a couple of days. > ___ > zfs-discuss mailing list > zfs-discuss@opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-

[zfs-discuss] test

2011-04-15 Thread Jerry Kemp
I have not seen any email from this list in a couple of days. ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss