Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Jul 2003 19:00:00 -0700
From:      Alfred Perlstein <bright@mu.org>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/coda coda_fbsd.c coda_vnops.c src/sys/compat/linux linux_misc.c src/sys/dev/raidframe rf_freebsdkintf.c src/sys/fs/hpfs hpfs_vfsops.c src/sys/fs/msdosfs msdosfs_vfsops.c src/sys/fs/ntfs ntfs_vfsops.c src/sys/fs/nwfs ...
Message-ID:  <20030727020000.GA10457@elvis.mu.org>
In-Reply-To: <56216.1059251485@critter.freebsd.dk>
References:  <20030726091651.GB42924@elvis.mu.org> <56216.1059251485@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
* Poul-Henning Kamp <phk@phk.freebsd.dk> [030726 13:31] wrote:
> In message <20030726091651.GB42924@elvis.mu.org>, Alfred Perlstein writes:
> >* Poul-Henning Kamp <phk@FreeBSD.org> [030726 00:32] wrote:
> >> phk         2003/07/26 00:32:23 PDT
> >>   Log:
> >>   Add a "int fd" argument to VOP_OPEN() which in the future will
> >>   contain the filedescriptor number on opens from userland.
> >>   
> >>   The index is used rather than a "struct file *" since it conveys a bit
> >>   more information, which may be useful to in particular fdescfs and /dev/fd/*
> >>   
> >>   For now pass -1 all over the place.
> >
> >This seems like a mistake, it forces one to have a struct filedesc instead
> >of merely faking up a struct file.
> >
> >What if one wants to have a cookie without a filedesc?
> >
> >Am I mistaken?
> 
> I'm afraid that I totally fail to even understand your question...
> 
> The objective here is to improve the situation where a vnode open
> results in a non-vnode method vector on the file, /dev/fd[0-2],
> /dev/stream etc.  The index can be used with the (already) passed
> thread pointer to access the relevant file entry.
> 
> BTW: I am not done with this change, the next commit adds the
> identical argument to vn_open().

I was mistaken as to what I thought you were trying to accomplish
here.

I thought you were doing the "each device open gets a cookie" thing
from linux via some hack.  But instead it appears to be some weird
optimization.  Nevermind I guess.

-- 
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030727020000.GA10457>