Subject: Re: buffer starvation & the vnd driver
To: Erik E. Fair <fair@clock.org>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-kern
Date: 09/04/1999 12:37:46
On Sat, 4 Sep 1999, Erik E. Fair wrote:

> I'm interested in seeing this fixed because I'd like to do something
> similar to Roland for Power Macintosh, assuming we can get some HFS/HFS+
> support written.

For HFS/HFS+, I think our best bet is to port the Darwin HFS module. We'd
then be bug-for-bug compatibility w/ MacOS X. :-)

The other thing we'll need is for libsa to handle HFS & HFS+ partitions.
I'm working on it in my spare time, but someone else is perfectly welcome
to beat me to it. :-)

Take care,

Bill
op == RENAME)) > > if (!error && lockparent && (flags & ISLASTCN)) > > if (!lockparent || error || !(flags & ISLASTCN)) > > if (lockparent && pdp != vdp && (flags & ISLASTCN)) > > if ((nameiop == CREATE || nameiop == RENAME) && > (flags & ISLASTCN)) { > > if ((nameiop == CREATE || nameiop == RENAME || > (nameiop == DELETE && > (ap->a_cnp->cn_flags & DOWHITEOUT) && > (ap->a_cnp->cn_flags & ISWHITEOUT))) && > (flags & ISLASTCN) && dp->i_ffs_nlink != 0) { > > if (nameiop == DELETE && (flags & ISLASTCN)) { > > if (nameiop == RENAME && wantparent && (flags & ISLASTCN)) { > > if (lockparent && (flags & ISLASTCN) && > > if (!lockparent || !(flags & ISLASTCN)) > > would not need to test ISLASTCN. Thanks! That's exactly the explanation I was asking for. > Amusingly, there's even a bug related to this right now. In > cache_lookup(), we have: > > if (cnp->cn_nameiop != CREATE) { > > With the current interface, this should test ISLASTCN. The effect of > not doing so is that negative hits on intermediate directories are > ignored (and force a linear search of the entire parent directory) > during a create operation. My two concerns are: we'd break portal, and we're drifting away from the other *BSD's, which is a concern for folks supporting multiple OS's with a filesystem module. I think the drift's fine for what we'd gain, but I'd like to suggest a slight change: As you suggested, have all VOP_LOOKUP calls except for the last be LOOKUP, and only the last one gets the passed-in lookup type (LOOKUP, RENAME, etc.) as all the intermediate ones really are just lookups. But instead of hiding *PARENT, we change how lockparent and wantparent are initialized. From lockparent = flags & LOCKPARENT; wantparent = flags & (LOCKPARENT|WANTPARENT); to lockparent = (flags & ISLASTCN) ? (flags & LOCKPARENT) : 0; wantparent = (flags & ISLASTCN) ? flags & (LOCKPARENT|WANTPARENT) \ : 0; Then we'd only test ISLASTCN once with respect to *PARENT, and all the ISLASTCN tests could go. But portal would keep working fine. So everything still works, and the code's a lot easier to look at. :-) Take care, Bill