aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2008-02-08 23:15:36 +0000
committerRobert Watson <rwatson@FreeBSD.org>2008-02-08 23:15:36 +0000
commit7a246a6314f0d6fd9a34eda7f8e48468e2fac165 (patch)
tree9a6abebe8d72eed5d22a53baaba0e55cd62c59ee /sys
parent8a4313c59ca9e79036153483b32ad37693a0bb86 (diff)
downloadsrc-7a246a6314f0d6fd9a34eda7f8e48468e2fac165.tar.gz
src-7a246a6314f0d6fd9a34eda7f8e48468e2fac165.zip
The Coda module was originally ported to NetBSD from Mach by rvb, and
then later to FreeBSD. Update various NetBSD-related comments: in some cases delete them because they don't appply, in others update to say FreeBSD as they still apply but in FreeBSD (and might for that matter no longer apply on NetBSD), and flag one case where I'm not sure whether it applies. MFC after: 1 month
Notes
Notes: svn path=/head/; revision=176120
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/coda/coda_psdev.c2
-rw-r--r--sys/fs/coda/coda_subr.c4
-rw-r--r--sys/fs/coda/coda_venus.c2
-rw-r--r--sys/fs/coda/coda_vfsops.c2
-rw-r--r--sys/fs/coda/coda_vnops.c17
-rw-r--r--sys/fs/coda/coda_vnops.h2
6 files changed, 16 insertions, 13 deletions
diff --git a/sys/fs/coda/coda_psdev.c b/sys/fs/coda/coda_psdev.c
index 0321bb1f9c39..4f9b42e65253 100644
--- a/sys/fs/coda/coda_psdev.c
+++ b/sys/fs/coda/coda_psdev.c
@@ -116,7 +116,7 @@ vc_nb_open(dev, flag, mode, td)
struct cdev *dev;
int flag;
int mode;
- struct thread *td; /* NetBSD only */
+ struct thread *td;
{
struct vcomm *vcp;
struct coda_mntinfo *mnt;
diff --git a/sys/fs/coda/coda_subr.c b/sys/fs/coda/coda_subr.c
index 59e8c875f1a0..c49309a6b8e0 100644
--- a/sys/fs/coda/coda_subr.c
+++ b/sys/fs/coda/coda_subr.c
@@ -99,7 +99,7 @@ coda_alloc(void)
}
else {
CODA_ALLOC(cp, struct cnode *, sizeof(struct cnode));
- /* NetBSD vnodes don't have any Pager info in them ('cause there are
+ /* FreeBSD vnodes don't have any Pager info in them ('cause there are
no external pagers, duh!) */
#define VNODE_VM_INFO_INIT(vp) /* MT */
VNODE_VM_INFO_INIT(CTOV(cp));
@@ -278,7 +278,7 @@ coda_testflush(void)
/*
* First, step through all cnodes and mark them unmounting.
- * NetBSD kernels may try to fsync them now that venus
+ * FreeBSD kernels may try to fsync them now that venus
* is dead, which would be a bad thing.
*
*/
diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c
index baea20a218e7..746436e864df 100644
--- a/sys/fs/coda/coda_venus.c
+++ b/sys/fs/coda/coda_venus.c
@@ -355,7 +355,7 @@ venus_access(void *mdp, CodaFid *fid, int mode,
INIT_IN(&inp->ih, CODA_ACCESS, cred, p);
inp->Fid = *fid;
/* NOTE:
- * NetBSD and Venus internals use the "data" in the low 3 bits.
+ * FreeBSD and Venus internals use the "data" in the low 3 bits.
* Hence, the conversion.
*/
inp->flags = mode>>6;
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c
index 3b69944b5a2e..078350bee6df 100644
--- a/sys/fs/coda/coda_vfsops.c
+++ b/sys/fs/coda/coda_vfsops.c
@@ -290,7 +290,7 @@ coda_root(vfsp, flags, vpp, td)
*vpp = mi->mi_rootvp;
mi->mi_started = 1;
- /* On Mach, this is vref. On NetBSD, VOP_LOCK */
+ /* On Mach, this is vref. On FreeBSD, vref + vn_lock. */
vref(*vpp);
vn_lock(*vpp, LK_EXCLUSIVE);
MARK_INT_SAT(CODA_ROOT_STATS);
diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c
index 8e1e49d8d7ed..6cb184da3378 100644
--- a/sys/fs/coda/coda_vnops.c
+++ b/sys/fs/coda/coda_vnops.c
@@ -95,10 +95,9 @@ int coda_vnop_print_entry = 0;
static int coda_lockdebug = 0;
/*
- * Some NetBSD details:
+ * Some FreeBSD details:
*
- * coda_start is called at the end of the mount syscall.
- * coda_init is called at boot time.
+ * codadev_modevent is called at boot time or module load time.
*/
#define ENTRY if(coda_vnop_print_entry) myprintf(("Entered %s\n",__func__))
@@ -184,7 +183,7 @@ int
coda_open(struct vop_open_args *ap)
{
/*
- * NetBSD can pass the O_EXCL flag in mode, even though the check
+ * FreeBSD can pass the O_EXCL flag in mode, even though the check
* has already happened. Venus defensively assumes that if open
* is passed the EXCL, it must be a bug. We strip the flag here.
*/
@@ -682,7 +681,11 @@ coda_fsync(struct vop_fsync_args *ap)
MARK_ENTRY(CODA_FSYNC_STATS);
/* Check for fsync on an unmounting object */
- /* The NetBSD kernel, in it's infinite wisdom, can try to fsync
+ /*
+ * XXX: Is this comment true on FreeBSD? It seems likely, since
+ * unmounting is fairly non-atomic.
+ *
+ * The NetBSD kernel, in it's infinite wisdom, can try to fsync
* after an unmount has been initiated. This is a Bad Thing,
* which we have to avoid. Not a legitimate failure for stats.
*/
@@ -797,7 +800,7 @@ coda_inactive(struct vop_inactive_args *ap)
*/
/*
- * It appears that in NetBSD, lookup is supposed to return the vnode locked
+ * In FreeBSD, lookup returns the vnode locked.
*/
int
coda_lookup(struct vop_lookup_args *ap)
@@ -884,7 +887,7 @@ coda_lookup(struct vop_lookup_args *ap)
* If we are creating, and this was the last name to be looked up,
* and the error was ENOENT, then there really shouldn't be an
* error and we can make the leaf NULL and return success. Since
- * this is supposed to work under Mach as well as NetBSD, we're
+ * this is supposed to work under Mach as well as FreeBSD, we're
* leaving this fn wrapped. We also must tell lookup/namei that
* we need to save the last component of the name. (Create will
* have to free the name buffer later...lucky us...)
diff --git a/sys/fs/coda/coda_vnops.h b/sys/fs/coda/coda_vnops.h
index 5ea009183319..75c3316a44d0 100644
--- a/sys/fs/coda/coda_vnops.h
+++ b/sys/fs/coda/coda_vnops.h
@@ -46,7 +46,7 @@
*/
-/* NetBSD interfaces to the vnodeops */
+/* FreeBSD interfaces to the vnodeops */
vop_open_t coda_open;
vop_close_t coda_close;
vop_read_t coda_read;