Subject: Re: lseek() extension for spare files
To: None <tech-kern@NetBSD.org>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 09/21/2006 11:19:14
Content-Type: text/plain; charset=us-ascii
On Thu, Sep 21, 2006 at 03:44:20AM +0200, Reinoud Zandijk wrote:
> Dear folks,
> attached is a patch that implements the lseek() extension for sparse file=
> as can be found in Solaris 10. Linux aparently has already=20
> 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 :
> Although its pretty complete and smoothed out it might need some fine=20
> tuning. Note that in this patch no file system has yet implemented sparse=
> area reporting and the genfs implementation, that allmost all use,=20
> implements the basic functionality.
How will we implement the guts of SEEK_DATA and SEEK_HOLE? If we've handed=
the whole VOP off to genfs, we don't have an fs-specific callback.
I think what we should do is have each fs have its own seek routine, which=
calls a genfs routine with the vop info plus a callback to handle finding=
regions. Either that, or to the extent we have genfs-ops, we need another=
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)
-----END PGP SIGNATURE-----