RELENG_7 Coda updates
Robert Watson
rwatson at FreeBSD.org
Fri Mar 14 17:27:22 UTC 2008
FYI to Coda users in the 7.x series -- I've MFC'd the last batch of
infrastructural cleanups and enhancements to RELENG_7 as of this afternoon.
The main goal was to reduce the size of the Coda kernel module implementation
by relying on native facilities, such as the namecache; along the way I picked
up an access cache similar to the one in the NFS client, smbfs client, and the
Linux version of the Coda kernel module.
The main remaining issues I'm aware of are:
- I still need to MFC the queue(9) conversion and a few other cleanups.
- There are known issues with signal handling interrupting upcalls to Venus,
and I've actually disabled that in HEAD for the time being, and will likely
MFC that disabling to RELENG_7. This code requires revisiting, especially
in light of threading, which the code doesn't really take into account
properly (taking a process-centric rather than thread-centric view of
signals).
- getcwd(3) and friends still don't work reliably with Coda, and there are
also occasional problems with ".." when going up the tree from one volume to
another.
- There are reports of issues with the Linux emulator and Coda, which likely
come from Coda returning directory data in a format not entirely expected by
the Linux emulation code.
- The Coda kernel module still requires the Giant lock, and a quick review of
the Coda module suggests that it would require some reworking in order to
remove that limitation.
All but the first are issues I won't be able to look at for some time, but I'm
happy to help test, review, and commit submitted patches relating to the Coda
kernel module.
FYI, I probably will go ahead and garbage collect support for the Coda 5
upcall/downcall protocol at some point before FreeBSD 8.0.
Robert N M Watson
Computer Laboratory
University of Cambridge
---------- Forwarded message ----------
Date: Fri, 14 Mar 2008 17:12:41 +0000 (UTC)
From: Robert Watson <rwatson at FreeBSD.org>
To: src-committers at FreeBSD.org, cvs-src at FreeBSD.org, cvs-all at FreeBSD.org
Subject: cvs commit: src/sys/fs/coda cnode.h coda_namecache.c
coda_namecache.h coda_psdev.c coda_subr.c coda_subr.h coda_vnops.c
coda_vnops.h src/sys/modules/coda Makefile
rwatson 2008-03-14 17:12:41 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7)
sys/fs/coda cnode.h coda_psdev.c coda_subr.c
coda_subr.h coda_vnops.c coda_vnops.h
sys/modules/coda Makefile
Removed files: (Branch: RELENG_7)
sys/fs/coda coda_namecache.c coda_namecache.h
Log:
Merge cnode.h:1.26, coda_psdev.c:1.44, coda_subr.c:1.36,
coda_subr.h:1.12, coda_vnops.c:1.94, coda_vnops.h:1.24,
coda_namecache.c:1.26, coda_namecache.h:1.15, Makefile:1.18,
from HEAD to RELENG_7:
Rather than having the Coda module use its own namecache, use the global
VFS namecache, as is done by the Coda module on Linux. Unlike the Coda
namecache, the global VFS namecache isn't tagged by credential, so use
ore conservative flushing behavior (for now) when CODA_PURGEUSER is
issued by Venus.
This improves overall integration with the FreeBSD VFS, including
allowing __getcwd() to work better, procfs/procstat monitoring, and so
on. This improves shell behavior in many cases, and improves ".."
handling. It may lead to some slowdown until we've implemented a
specific access cache, which should net improve performance, but in the
mean time, lookup access control now always goes to Venus, whereas
previously it didn't.
Revision Changes Path
1.21.2.5 +2 -1 src/sys/fs/coda/cnode.h
1.23.2.3 +0 -700 src/sys/fs/coda/coda_namecache.c (dead)
1.11.2.3 +0 -205 src/sys/fs/coda/coda_namecache.h (dead)
1.39.2.5 +5 -20 src/sys/fs/coda/coda_psdev.c
1.33.2.3 +30 -17 src/sys/fs/coda/coda_subr.c
1.10.2.2 +1 -1 src/sys/fs/coda/coda_subr.h
1.76.2.10 +75 -127 src/sys/fs/coda/coda_vnops.c
1.19.2.5 +1 -1 src/sys/fs/coda/coda_vnops.h
1.17.2.1 +2 -3 src/sys/modules/coda/Makefile
---------- Forwarded message ----------
Date: Fri, 14 Mar 2008 17:14:42 +0000 (UTC)
From: Robert Watson <rwatson at FreeBSD.org>
To: src-committers at FreeBSD.org, cvs-src at FreeBSD.org, cvs-all at FreeBSD.org
Subject: cvs commit: src/sys/conf files
rwatson 2008-03-14 17:14:42 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7)
sys/conf files
Log:
Merge files:1.1268 from HEAD to RELENG_7:
Remove coda_namecache from "options vcoda", it is no longer required.
Revision Changes Path
1.1243.2.5 +0 -1 src/sys/conf/files
---------- Forwarded message ----------
Date: Fri, 14 Mar 2008 17:15:12 +0000 (UTC)
From: Robert Watson <rwatson at FreeBSD.org>
To: src-committers at FreeBSD.org, cvs-src at FreeBSD.org, cvs-all at FreeBSD.org
Subject: cvs commit: src/sys/modules/coda5 Makefile
rwatson 2008-03-14 17:15:12 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7)
sys/modules/coda5 Makefile
Log:
Merge Makefile:1.9 from HEAD to RELENG_7:
Remove coda_namecache from coda5 as well. We should probably GC coda5
entirely at this point as coda6 is considered the supported branch.
Revision Changes Path
1.8.2.1 +1 -1 src/sys/modules/coda5/Makefile
---------- Forwarded message ----------
Date: Fri, 14 Mar 2008 17:17:01 +0000 (UTC)
From: Robert Watson <rwatson at FreeBSD.org>
To: src-committers at FreeBSD.org, cvs-src at FreeBSD.org, cvs-all at FreeBSD.org
Subject: cvs commit: src/sys/fs/coda cnode.h coda_subr.c coda_vnops.c
rwatson 2008-03-14 17:17:01 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7)
sys/fs/coda cnode.h coda_subr.c coda_vnops.c
Log:
Merge cnode.h:1.27, coda_subr.c:1.37, coda_vnops.c:1.95 from HEAD to
RELENG_7:
Implement a rudimentary access cache for the Coda kernel module,
modeled on the access cache found in NFS, smbfs, and the Linux coda
module. This is a positive access cache of a single entry per file,
tracking recently granted rights, but unlike NFS and smbfs,
supporting explicit invalidation by the distributed file system.
For each cnode, maintain a C_ACCCACHE flag indicating the validity
of the cache, and a cached uid and mode tracking recently granted
positive access control decisions.
Prefer the cache to venus_access() in VOP_ACCESS() if it is valid,
and when we must fall back to venus_access(), update the cache.
Allow Venus to clear the access cache, either the whole cache on
CODA_FLUSH, or just entries for a specific uid on CODA_PURGEUSER.
Unlike the Coda module on Linux, we don't flush all entries on a
user purge using a generation number, we instead walk present
cnodes and clear only entries for the specific user, meaning it is
somewhat more expensive but won't hit all users.
Since the Coda module is agressive about not keeping around
unopened cnodes, the utility of the cache is somewhat limited for
files, but works will for directories. We should make Coda less
agressive about GCing cnodes in VOP_INACTIVE() in order to improve
the effectiveness of in-kernel caching of attributes and access
rights.
Revision Changes Path
1.21.2.6 +4 -0 src/sys/fs/coda/cnode.h
1.33.2.4 +63 -8 src/sys/fs/coda/coda_subr.c
1.76.2.11 +51 -21 src/sys/fs/coda/coda_vnops.c
---------- Forwarded message ----------
Date: Fri, 14 Mar 2008 17:17:49 +0000 (UTC)
From: Robert Watson <rwatson at FreeBSD.org>
To: src-committers at FreeBSD.org, cvs-src at FreeBSD.org, cvs-all at FreeBSD.org
Subject: cvs commit: src/sys/fs/coda coda_subr.c
rwatson 2008-03-14 17:17:49 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_7)
sys/fs/coda coda_subr.c
Log:
Merge coda_subr.c:1.38 from HEAD to RELENG_7:
Update cache flushing behavior in light of recent namecache and
access cache improvements:
- Flush just access control state on CODA_PURGEUSER, not the full
namecache for /coda.
- When replacing a fid on a cnode as a result of, e.g.,
reintegration after offline operation, we no longer need to
purge the namecache entries associated with its vnode.
Revision Changes Path
1.33.2.5 +0 -7 src/sys/fs/coda/coda_subr.c
More information about the freebsd-fs
mailing list