tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: VOP_CREATE hanging



On Wed, Aug 13, 2008 at 04:16:03AM -0700, Adam Burkepile wrote:
>> What does '..' point to in such a directory? Isn't that going to make
>> fsck angry?
>
> Yeah, the plan was to make . and .. point to the subfile directory. fsck is 
> throwing a hissy fit right now but another part of the plan was to make 
> fsck realize that it should treat nodes that were these special subfile 
> directories differently, which is another problem that I will have to 
> tackle.

That's probably reasonable, but it won't be entirely trivial. :-/

>                 /* set namedata with namei */
>                 error = namei(&sfnd);
>                 printf("namei error = %d\n",error);
>
>                 sfnd.ni_cnd.cn_nameiop = CREATE;
>                 sfnd.ni_cnd.cn_flags |= LOCKPARENT | LOCKLEAF;

Don't change these *after* calling namei. In particular, changing
nameiop is likely to buy you undefined behavior, which could easily
explain the other problems you're seeing.

The closer to ordinary namei interaction you can make your stuff, the
more likely it is to work.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index