Date: Thu, 16 Mar 2000 05:23:50 -0800 (PST) From: peter.edwards@ireland.com To: freebsd-gnats-submit@FreeBSD.org Subject: bin/17405: one more fstat patch Message-ID: <200003161323.FAA02112@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003161323.FAA02112>
