| Summary: | one more fstat patch | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | peter.edwards <peter.edwards> | ||||
| Component: | bin | Assignee: | dwmalone | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
peter.edwards
2000-03-16 13:30:00 UTC
On Thu, 16 Mar 2000 peter.edwards@ireland.com wrote: > >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. This is backwards. &ing with 0xffff is a bug. The bug is fixed for ufs in PR 16320. Bruce Hi, With getfname &ing 0xffff, and nfs_filestat() not doing it, you'll never find the filesystem for an NFS inode. I guess I picked adding one 0xffff rather than removing the rest, 'cause it seemed more likely the single omission was in error rather than the two or three uses of 0xffff. I suppose my bug is that the 0xffff is being applied inconsistently, while the quoted PR's bug is that the 0xffff is incorrect :) Is the 0xffff is some historical artifact, then? If someone removes the 0xffff's, a la bin/16320, be sure to catch the new ones in msdosfs.c and cd9660.c Cheers, Peter. ---- Begin Original Message ---- From: Bruce Evans <bde@zeta.org.au> Sent: Fri, 17 Mar 2000 03:31:46 +1100 (EST) To: peter.edwards@ireland.com CC: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: bin/17405: one more fstat patch On Thu, 16 Mar 2000 peter.edwards@ireland.com wrote: > >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. This is backwards. &ing with 0xffff is a bug. The bug is fixed for ufs in PR 16320. Bruce ---- End Original Message ---- On Wed, 22 Mar 2000, Peter Edwards wrote: > Hi, > With getfname &ing 0xffff, and nfs_filestat() not doing it, you'll > never find the filesystem for an NFS inode. I guess I picked adding > one 0xffff rather than removing the rest, 'cause it seemed more likely > the single omission was in error rather than the two or three uses > of 0xffff. Well, until about 6 months ago, the nfs fsid was makedev(128 + mtype, xxxfs_mntid) (see kern_conf.c:getnewfsid()), so nfs fsids were <= 0xffff in the usual case where there have been <= 256 mount(2) calls for non-disk filesystems. > I suppose my bug is that the 0xffff is being applied inconsistently, > while the quoted PR's bug is that the 0xffff is incorrect :) > Is the 0xffff is some historical artifact, then? I think it is just a wrong fix for bogus sign extension caused by dev_t being (signed) short. Bruce Can someone drop all the "& 0xffff"'s from the files in src/usr.bin/fstat? It fixes this bug, and I've been running with it for the last year, locally. Responsible Changed From-To: freebsd-bugs->dwmalone I'll try to have a look at this. State Changed From-To: open->closed Fix committed to -current and -stable. Thanks! |