From owner-freebsd-bugs Fri Nov 10 14:30: 7 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1AA7637B4C5 for ; Fri, 10 Nov 2000 14:30:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id OAA19438; Fri, 10 Nov 2000 14:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from venus.drwilco.net (10dyn125.dh.casema.net [212.64.31.125]) by hub.freebsd.org (Postfix) with ESMTP id B927E37B479 for ; Fri, 10 Nov 2000 14:23:28 -0800 (PST) Received: (from drwilco@localhost) by venus.drwilco.net (8.11.1/8.11.1) id eAAMK5J04953; Fri, 10 Nov 2000 23:20:05 +0100 (CET) (envelope-from drwilco) Message-Id: <200011102220.eAAMK5J04953@venus.drwilco.net> Date: Fri, 10 Nov 2000 23:20:05 +0100 (CET) From: drwilco@drwilco.nl Reply-To: drwilco@drwilco.nl To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/22756: ntfs filesystems can be listed, but no files can be read Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 22756 >Category: kern >Synopsis: ntfs filesystems can be listed, but no files can be read >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 10 14:30:00 PST 2000 >Closed-Date: >Last-Modified: >Originator: Rogier R. Mulhuijzen >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD venus.drwilco.net 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Thu Nov 9 12:00:08 CET 2000 root@venus.drwilco.net:/usr/src/sys/compile/VENUS i386 >Description: Since somewhere in October (on 5.0-CURRENT) files on a NTFS filesystem cannot be read, although directory listings can be made. The error returned is "Inappropriate ioctl for device" >How-To-Repeat: Mount a NTFS partition, try to cat(1) a file. >Fix: ntfs_bypass() always returns ENOTTY (Inappropriate ioctl for device), and is only used for vop_default_desc. Looking at other fs's I came to the conclusion that they almost all use vop_defaultop() for vop_default_desc, or code that is exactly the same. Hence the following patch, which works fine for me. --- ntfs/ntfs_vnops.c.old Wed Nov 1 18:57:24 2000 +++ ntfs/ntfs_vnops.c Fri Nov 10 22:56:32 2000 @@ -847,7 +847,7 @@ #if defined(__FreeBSD__) static struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = { - { &vop_default_desc, (vop_t *)ntfs_bypass }, + { &vop_default_desc, (vop_t *)vop_defaultop }, { &vop_getattr_desc, (vop_t *)ntfs_getattr }, { &vop_inactive_desc, (vop_t *)ntfs_inactive }, @@ -887,7 +887,7 @@ #else /* !FreeBSD */ struct vnodeopv_entry_desc ntfs_vnodeop_entries[] = { - { &vop_default_desc, (vop_t *) ntfs_bypass }, + { &vop_default_desc, (vop_t *) vop_defaultop }, { &vop_lookup_desc, (vop_t *) ntfs_lookup }, /* lookup */ { &vop_create_desc, genfs_eopnotsupp }, /* create */ { &vop_mknod_desc, genfs_eopnotsupp }, /* mknod */ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message