From owner-freebsd-bugs@FreeBSD.ORG Sun May 2 14:30:10 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCBDD106564A for ; Sun, 2 May 2010 14:30:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id A196F8FC17 for ; Sun, 2 May 2010 14:30:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o42EU9C5037574 for ; Sun, 2 May 2010 14:30:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o42EU9LF037573; Sun, 2 May 2010 14:30:09 GMT (envelope-from gnats) Resent-Date: Sun, 2 May 2010 14:30:09 GMT Resent-Message-Id: <201005021430.o42EU9LF037573@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Marcos R. Gonzalez" Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BED511065675 for ; Sun, 2 May 2010 14:29:12 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id AECFA8FC0C for ; Sun, 2 May 2010 14:29:12 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o42ETCcq058363 for ; Sun, 2 May 2010 14:29:12 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o42ETCnD058362; Sun, 2 May 2010 14:29:12 GMT (envelope-from nobody) Message-Id: <201005021429.o42ETCnD058362@www.freebsd.org> Date: Sun, 2 May 2010 14:29:12 GMT From: "Marcos R. Gonzalez" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/146237: Linux binaries not reading directories mounted with fusefs-sshfs X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 May 2010 14:30:10 -0000 >Number: 146237 >Category: kern >Synopsis: Linux binaries not reading directories mounted with fusefs-sshfs >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun May 02 14:30:09 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Marcos R. Gonzalez >Release: FreeBSD 8.0-RELEASE-p2 >Organization: Casa de Pedra >Environment: FreeBSD freebsd-mobo.mrgz.org 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #8: Sat May 1 22:09:11 BRT 2010 root@freebsd-mobo.mrgz.org:/usr/obj/usr/src/sys/MYKERNEL i386 >Description: Linux binaries can't read directories mounted with fusefs-sshfs. They can read regular files but not directories. Native FreeBSD binaries are ok and linux binaries with smbfs are doing well too. The only problem is the combination fusefs-sshfs+linux+directories. >How-To-Repeat: With the modules "kldloaded": linux, linprocfs, fuse, mount a remote folder with sshfs: sshfs user@server:/home/user /home/user/remote Password: ****** Supose inside server's /home/user there is one regular file, file.txt. This command prints the expected output: $ /usr/compat/linux/bin/ls /home/user/remote/file.txt $ /home/user/remote/file.txt This one, does not: $ /usr/compat/linux/bin/ls /home/user/remote $ /usr/compat/linux/bin/ls: cannot open directory /mnt/smb/server/: Not a directory >Fix: Not a fix, but I inserted some debugging on /usr/src/sys/compat/linux/linux_file.c on linux_common_open (line 158) if (l_flags & LINUX_O_DIRECTORY) { if (fp->f_type != DTYPE_VNODE || fp->f_vnode->v_type != VDIR) { printf(LMSG("f_type: %d = %d, v_type: %d = %d"), fp->f_type, DTYPE_VNODE, fp->f_vnode->v_type,VDIR); error = ENOTDIR; } } /var/log/messages gave me this output: May 1 11:22:05 freebsd kernel: linux (1091): f_type: 0 = 1, v_type: 2 = 2 The file descriptor type (fp->f_type) is 0 (should be DTYPE_VNODE, I think). >Release-Note: >Audit-Trail: >Unformatted: