linuxolator: LTP lseek03 failure

Scot Hetzel swhetzel at gmail.com
Wed May 9 15:37:36 UTC 2007


On 5/9/07, Bruce Evans <bde at zeta.org.au> wrote:
> On Tue, 8 May 2007, Scot Hetzel wrote:
> > On 5/6/07, Bruce Evans <bde at zeta.org.au> wrote:
> > I then created a patch to kern/vfs_vnops.c:vn_ioctl that checked if
> > com was either SEEK_DATA or SEEK_HOLE and return EINVAL.  While this
> > worked for UFS, it disabled SEEK_[DATA,HOLE] for ZFS.
>
> I meant to just translate ENOTTY to EINVAL after calling VOP_IOCTL().
> The vop must be called to see what it wants to do.
>
The attached patch to kern/vfs_vnops.c translates ENOTTY to EINVAL
after calling VOP_IOCTL for the SEEK_[DATA,HOLE] cases only.

With this patch applied, the lseek03 test now returns with ENXIO on
zfs filesystems, and EINVAL on non-zfs filesystems.

Should all ENOTTY cases be changed to EINVAL, or just the
SEEK_[DATA,HOLE] cases.

Scot
-- 
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vfs_vnops.patch
Type: text/x-diff
Size: 504 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20070509/9c70d98a/vfs_vnops.bin


More information about the freebsd-emulation mailing list