tech-kern archive

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

Re: fixing coda in -current



On Sun, Nov 25, 2018 at 08:33:53PM +0000, David Holland wrote:
> 
> So I have no immediate comment on the patch but I'd like to understand
> better what it's doing -- the last time I crawled around in it
> (probably 7-8 years ago) it appeared to among other things have an
> incestuous relationship with ufs_readdir such that if you tried to use
> anything under than ffs as the local container it would detonate
> violently. But I never did figure out exactly what the deal was other
> than it was confusing and seemed to violate a lot of abstractions.
> 

The tricky thing about coda is that a lot of the processing that is
usually done within the VFS kernel code is actually processed in
userland the the coda daemon venus.  What happens is a userland
processes the coda fs, the coda kernel code "upcalls" that requests to
the venus daemon which processess it and may ask the kernel module for
information before returning results via the kernel module to the
userlan process.  So the FS sort of hangs half in and half out of the
kernel - if both do not agree on structures and other details then nasal
demons ensue.

I haven't looked at how the VFS ops structure is filled in but I can
easily see if the kernel module simply takes the underlying file system
ops then things will lose because venus expects ufs style dirents.  This
is really the only thing at the moment that I can think of that would
cause explosions.... IIRC the coda fs data is just kept in a single file
blob sitting on the host fs (venus does the work to track writes that
are pending server reconnection).

> Can you clarify? It would be nice to have it working properly and
> stuff like the above is only going to continue to fail in the future...
> 

Now that you have made me think about this more I am thinking that the
fix that has gone in is more or less a bandaid - I should track this
back a bit further as it is more than likely that a more correct fix
exists inside venus instead of the kernel code.  What we have now won't
hurt and at least stops the super annoying KASSERT when I touch /coda.
I need to have a look at the coda pkgsrc anyway, my patches to support
mount_coda are conflicting which I need to sort out.

-- 
Brett Lymn
Let go, or be dragged - Zen proverb.


Home | Main Index | Thread Index | Old Index