Coda File System

Re: Coda newbie

From: Robert Watson <rwatson_at_FreeBSD.org>
Date: Tue, 02 Sep 2008 15:34:58 -0400
On Tue, 2 Sep 2008, Greg Troxel wrote:

> Robert Watson <rwatson_at_FreeBSD.org> writes:
>
>> I have made significant improvements to the kernel module that will be 
>> shipped with FreeBSD 7.1 in a couple of months.  It should be possible to 
>> compile the new version of the kernel module on a 7.0 system as they have 
>> basically the same KPI for VFS.  It may even be possible to simply use the 
>> 7.1 Coda kernel module on 7.0, although I would discourage that.
>
> Thanks for mentioning it here - I should take a look and see what of those 
> changes I should port to NetBSD.

A quick summary of the changes since 7.0, almost entirely bug fixes, cleanup, 
and general infrastructure improvement:

- TODO list updated
- Remove unused code
- Revise (improve?) vnode locking of cache nodes
- Trim old NetBSD- or Mach-specific comments
- Remove implementations of UFS-internal VOPs
- Remove devtomp()
- Maintain statfs() stats
- Style, comment, namespace cleanups throughout, except coda.h
- Remove Coda-specific name cache, use global FreeBSD name cache
- Implement rudimentary access cache along the lines of the NFS and smbfs
   access caches, and not unlike the access cache in the Linux coda module; we
   do slightly more granular invalidation than the Linux one though, since that
   existed in the previous Coda-specific name cache.  Note that this is a
   single-uid access cache, which has its limitations, but is better than none
   at all.
- Don't flush the namecache on CODA_PURGEUSER, just access control state
- Don't need to flush the name cache on reintegrated files due to fid
   renumber, since name cache no longer knows about fids
- Do flush the cnode attribute cache when a fid is renumbered, so that the new
   inode number will be generated on next stat()
- Remove unused OLD_DIAGNOSTIC code
- Fix up make_coda_node(), but there are still race conditions under load
- Disable interruption of coda_call() sleep, as it's not done right (still) --
   need to look more at the Linux coda module to see how it handles this
- Use queue(9) instead of custom queue macros

Your review of these changes would be most welcome :-).  These changes were 
pretty much all made to the 7.x branch in March, but I'm not sure if that 
means they're getting much exercise.  I should probably add a copyright claim 
somewher,e I suppose.

>> I've been thinking about removing support for older Coda versions in the 
>> FreeBSD module, since they're done at compile-time, and this list is 
>> probably a good a list as any to ask about it.
>
> I have not yet removed support for the old venus protocol from NetBSD, but I 
> think it's time.

OK.  I'll make that change in FreeBSD as well then.

>> Finally, as Rune reports, there is a reported issue with the Linux ABI 
>> emulation and the Coda kernel modules.  It's unclear to me whether this is 
>> a bug in the ABI emulation layer or the Coda kernel module, and 
>> unfortunately I've not had time to track down that issue.  It would be good 
>> to get that fixed before FreeBSD 7.1 ships.
>
> That's interesting - there is a directory reading problem with linux 
> programs on NetBSD, and it seems to be a disagreement about how directories 
> do or don't cross 4K boundaries, but I'm not clear on what's going on.

OK.  I probably won't have a chance to look at this for a bit, but if someone 
else figures something out I'm happy to merge the results into FreeBSD.  If it 
were in the next two weeks, then that would make it pretty likely we could 
include the fix in 7.1, which would be great.

Robert N M Watson
Computer Laboratory
University of Cambridge
Received on 2008-09-03 13:25:55