Coda File System

venus_fsync ?


Date: Thu, 25 Nov 2004 17:11:01 -0500
Hi folks.

I'm still trying to push forward the coda kernel extension for MacOS, 
but this has shown to be more troublesome than I expected. I have been 
struggling quite a while with the problem of losing all my vnodes when 
copying lots of files, making the system hang or crash.

Loking at the FreeBSD code in coda_fsync, I see that whoever wrote this 
was unsure if it was wise to do an upcall into venus_fsync or not. The 
code goes like this:


    /*
850      * We can expect fsync on any vnode at all if venus is pruging 
it.
851      * Venus can't very well answer the fsync request, now can it?
852      * Hopefully, it won't have to, because hopefully, venus 
preserves
853      * the (possibly untrue) invariant that it never purges an open
854      * vnode.  Hopefully.
855      */
856     if (cp->c_flags & C_PURGING) {
857         return(0);
858     }
859
860     /* needs research */
861     return 0;
862     error = venus_fsync(vtomi(vp), &cp->c_fid, cred, p);
863
864     CODADEBUG(CODA_FSYNC, myprintf(("in fsync result %d\n",error)); 
);
865     return(error);
866 }

Note the return(0) before calling venus_fsync.

Can anybody explain this to me. Do we still need research ? Is is safe 
to do the upcall or not?
The linux code seems to do the upcall.


-- Christer
Received on 2004-11-25 20:34:30
Binary file ./codalist-2004/7045.html matches