[OpenAFS-port-darwin] ufs_abortop

Chaskiel M Grundman cg2v@andrew.cmu.edu
Thu, 25 Sep 2003 12:55:52 -0400


--On Thursday, September 25, 2003 14:25:18 +0200 Sebastian Hagedorn
<Hagedorn@uni-koeln.de> wrote:

> how about engaging in a thought experiment ... imagine there were a new
> version of the Darwin kernel that didn't have ufs_abortop any more, so
> that the following message would appear if you tried to kextload afs.kext:

The implimentation of the abort op for every filesystem that impliments it
seems to boil down to:

int
xxx_abortop(ap)
        struct vop_abortop_args /* {
                struct vnode *a_dvp;
                struct componentname *a_cnp;
        } */ *ap;
{

        if ((ap->a_cnp->cn_flags & (HASBUF | SAVESTART)) == HASBUF)
                FREE_ZONE(ap->a_cnp->cn_pnbuf, ap->a_cnp->cn_pnlen,M_NAMEI);
        return (0);
}

Unfortunately, nop_abortop *doesn't* do that, so we cannot just use that.
IIRC, The reference to ufs_abortop was used because that's what nfs did at
the time the afs port to darwin was done. It has nothing to do with afs
using a ufs backend. if you create an afs_vop_abortop based on the above
and use it instead, you should be ok.