Subject: Re: lseek() extension for spare files
To: Jason Thorpe <thorpej@shagadelic.org>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: tech-kern
Date: 09/21/2006 23:15:04
--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Dear folks,

On Thu, Sep 21, 2006 at 01:51:28PM -0700, Jason Thorpe wrote:
> >as can be found in Solaris 10. Linux aparently has already
> >adopted/implented it also.
> >
> >It adds the SEEK_DATA and SEEK_HOLE `whence' arguments to lseek().  
> >For a
> >more detailed look see the solaris 10 man page :
> >
> >http://tinyurl.com/fk6we
> 
> So, it looks like these new whence arguments are essentially designed  
> to enumerate the holes or filled regions of the file.
> 
> I don't see anything particularly wrong with having it (note I have  
> not yet reviewed the actual patch), but what's the application usage?

Most common usage i'd think is archiving/backing up sparce files with say 
adapted versions of tar(1), but also cp(1) could preserve sparse files when 
copying them.

Auto-sparsing files by a file system would be nice but i dont know how to 
do that other than scanning written/read sectors... wich might take a small 
hit on performance when activated but i don't think its a very common 
situation.

With regards,
Reinoud


--dDRMvlgZJXvWKvBx
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (NetBSD)

iQEVAwUBRRMA0IKcNwBDyKpoAQI0awf+P7bKioXSBPbh5tFsrfA7m6pNxvBx5W3N
eAIhUBtRrTb23Xm+vDa9uHSUiuasYQMGZUi/sh06zYQAeS7ohxYV5+FI81FWLsqs
gn6e8zmxWbdBTjL3tHB3WxaqJdgYTNwSLrHSNG3zEH74PVYevhRFDrCyIuGMif8o
2KTyPn17EFMhrvbn+hOljMSHQciHDOur2kl+TF/mRucTMNBfOXdHYbP2b66IjESk
cwzZQ4NVV6wNKCTO+HRV6YHHr83nXVT7HCqQNk6tB8vn6Wv9xxNc8Wgjkeg2Uf8z
5p+XWiRv2DfXOBoAkiRTd8DowL/nJDINCHl/mw46eHOLo6jSXHJ2Sg==
=xdKK
-----END PGP SIGNATURE-----

--dDRMvlgZJXvWKvBx--