From owner-freebsd-bugs Thu Mar 16 5:30: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id E49AD37BF28 for ; Thu, 16 Mar 2000 05:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id FAA02995; Thu, 16 Mar 2000 05:30:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 7AE8337BA4F for ; Thu, 16 Mar 2000 05:23:50 -0800 (PST) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id FAA02112; Thu, 16 Mar 2000 05:23:50 -0800 (PST) (envelope-from nobody@FreeBSD.org) Message-Id: <200003161323.FAA02112@freefall.freebsd.org> Date: Thu, 16 Mar 2000 05:23:50 -0800 (PST) From: peter.edwards@ireland.com To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/17405: one more fstat patch Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 17405 >Category: bin >Synopsis: one more fstat patch >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: Thu Mar 16 05:30:00 PST 2000 >Closed-Date: >Last-Modified: >Originator: Peter Edwards >Release: rapidly ageing -current >Organization: >Environment: FreeBSD rocklobster 4.0-CURRENT FreeBSD 4.0-CURRENT #3: Fri Jan 21 09:42:06 GMT 2000 petere@rocklobster:/usr/src/sys/compile/PME2 i386 >Description: fstat "file", where file is on an NFS volume, is still broken. The problem is that the fsid is made up of a type and a dev_t. the nfs_filestat() doesn't drop the type (to produce a udev_t) by &ing with 0xffff. All the other filesystem types do this already. >How-To-Repeat: $ cd /net/rover/export/home $ fstat . USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME $ cd /usr/src/usr.bin/fstat $ patch fstat.c < patch $ make all install $ cd - $ fstat . USER CMD PID FD MOUNT INUM MODE SZ|DV R/W NAME root fstat 3232 wd /a/rover/host/export/home 2 drwxr-xr-x 512 r . root bash 3045 wd /a/rover/host/export/home 2 drwxr-xr-x 512 r . >Fix: *** fstat.c Thu Mar 16 02:02:33 2000 --- fstat.pme.c Thu Mar 16 13:05:09 2000 *************** *** 508,514 **** (void *)VTONFS(vp), Pid); return 0; } ! fsp->fsid = nfsnode.n_vattr.va_fsid; fsp->fileid = nfsnode.n_vattr.va_fileid; fsp->size = nfsnode.n_size; fsp->rdev = nfsnode.n_vattr.va_rdev; --- 508,514 ---- (void *)VTONFS(vp), Pid); return 0; } ! fsp->fsid = nfsnode.n_vattr.va_fsid & 0xffff; fsp->fileid = nfsnode.n_vattr.va_fileid; fsp->size = nfsnode.n_size; fsp->rdev = nfsnode.n_vattr.va_rdev; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message