Subject: Re: lseek() extension for spare files
To: None <tech-kern@NetBSD.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 09/21/2006 11:19:14
--VywGB/WGlW4DM4P8
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Sep 21, 2006 at 03:44:20AM +0200, Reinoud Zandijk wrote:
> Dear folks,
>=20
> attached is a patch that implements the lseek() extension for sparse file=
s=20
> as can be found in Solaris 10. Linux aparently has already=20
> adopted/implented it also.
>=20
> It adds the SEEK_DATA and SEEK_HOLE `whence' arguments to lseek(). For a=
=20
> more detailed look see the solaris 10 man page :
>=20
> http://tinyurl.com/fk6we
>=20
> 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=
=20
> 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=
=20
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=
=20
calls a genfs routine with the vop info plus a callback to handle finding=
=20
regions. Either that, or to the extent we have genfs-ops, we need another=
=20
one.

Take care,

Bill

--VywGB/WGlW4DM4P8
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFFEteiWz+3JHUci9cRAmkUAJ90sAAMZ4pvO5UU0Pxk3JgViYCK1gCghg5L
jObZ2A3TlK9pfpWlutGs4uY=
=vY2C
-----END PGP SIGNATURE-----

--VywGB/WGlW4DM4P8--