Subject: Re: RFC: lseek() extension for sparse files version 3 + UFS implementation
To: Reinoud Zandijk <>
From: Klaus Klein <>
List: tech-kern
Date: 09/26/2006 22:38:23
On Tuesday 26 September 2006 21:36, Reinoud Zandijk wrote:

> -#define	spec_seek	genfs_nullop		/* XXX should query device */
> +#define	spec_seek	genfs_seek		/* XXX should query device */

I'm pretty sure this will break certain cases such as kvm on 64-bit
platforms, where you need all of off_t's 64 bits to represent the
valid file offsets into /dev/mem.  (Been there, made that mistake
before. :-)

POSIX requires failure to lseek() to negative offsets only for
regular files, block devices, and directories (the latter two were
introduced after .1-1990), and the sole point of spec_seek's current
incarnation is to skip the newoff < 0 check.

- Klaus