Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 May 2007 10:37:34 -0500
From:      "Scot Hetzel" <swhetzel@gmail.com>
To:        "Bruce Evans" <bde@zeta.org.au>
Cc:        emulation@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>
Subject:   Re: linuxolator: LTP lseek03 failure
Message-ID:  <790a9fff0705090837x3fe2ae7t15d5ceec21a39f40@mail.gmail.com>
In-Reply-To: <20070509223211.O6076@delplex.bde.org>
References:  <790a9fff0705021345j2ad9ae98o56aaf357d556fe27@mail.gmail.com> <790a9fff0705040004oab16ed8q1a1c476386379ea9@mail.gmail.com> <20070504190007.Y37951@besplex.bde.org> <790a9fff0705040819u24e4c2f0s5c9fc34b93770e13@mail.gmail.com> <790a9fff0705061005v1a1a883ehc155bac7f747c3eb@mail.gmail.com> <20070507124848.S47783@besplex.bde.org> <790a9fff0705080724o1039c405g1cfa1b31ba6a91be@mail.gmail.com> <20070509223211.O6076@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
------=_Part_117604_11761428.1178725054190
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 5/9/07, Bruce Evans <bde@zeta.org.au> wrote:
> On Tue, 8 May 2007, Scot Hetzel wrote:
> > On 5/6/07, Bruce Evans <bde@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.

------=_Part_117604_11761428.1178725054190
Content-Type: text/x-diff; name=vfs_vnops.patch; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: base64
X-Attachment-Id: f_f1hy5j4y
Content-Disposition: attachment; filename="vfs_vnops.patch"

SW5kZXg6IHZmc192bm9wcy5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21lL25jdnMvc3JjL3N5
cy9rZXJuL3Zmc192bm9wcy5jLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjI0OApkaWZmIC11IC1y
MS4yNDggdmZzX3Zub3BzLmMKLS0tIHZmc192bm9wcy5jCTEyIEZlYiAyMDA3IDIyOjUzOjAxIC0w
MDAwCTEuMjQ4CisrKyB2ZnNfdm5vcHMuYwk5IE1heSAyMDA3IDEzOjEyOjA1IC0wMDAwCkBAIC03
NTUsNiArNzU1LDkgQEAKIAkJZWxzZQogCQkJZXJyb3IgPSBWT1BfSU9DVEwodnAsIGNvbSwgZGF0
YSwgZnAtPmZfZmxhZywKIAkJCSAgICBhY3RpdmVfY3JlZCwgdGQpOworCQkJaWYgKGVycm9yID09
IEVOT1RUWSAmJgorCQkJICAgIChjb20gPSBGSU9TRUVLREFUQSB8fCBjb20gPT0gRklPU0VFS0hP
TEUpKQorCQkJCWVycm9yID0gRUlOVkFMOwogCQlicmVhazsKIAogCWRlZmF1bHQ6Cg==
------=_Part_117604_11761428.1178725054190--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0705090837x3fe2ae7t15d5ceec21a39f40>