The reason this is pertinent to ZFS is because you can do things with a ZFS file that you can't with other file systems. In particular, with ZFS you can use fcntl to free space from the file. For example, a zfs file can be used quite nicely to implement a circular queue. Instead of having to worry about wrap conditions, one can simply keep writing to the end and punching increasingly larger holes starting at the beginning. This assumes, of course, that 2**64 is large enough to never worry about a real wrap. Just seeking and writing does not give you the ability to change the size of an existing hole.
Chuck -----Original Message----- From: Bart Smaalders [mailto:[EMAIL PROTECTED] Sent: Monday, May 15, 2006 10:13 AM To: Gehr, Chuck R Subject: Re: [zfs-discuss] Sparse file support in Java? Gehr, Chuck R wrote: > Does anyone know if there is support in Java for creating holes in a > sparse file (like one can do via fcntl(F_FREESP) in C)? Would like to > avoid writing JNI code if there is already support for this somewhere > in the JDK. > > Chuck Not sure why this is on the zfs list.... just seek to where you wish to write; block-sized & aligned areas will be "holey". - Bart -- Bart Smaalders Solaris Kernel Performance [EMAIL PROTECTED] http://blogs.sun.com/barts _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss