Module Name: src
Committed By: hannken
Date: Wed Jan 4 17:06:13 UTC 2017
Modified Files:
src/sys/sys: vnode_impl.h
Log Message:
Comment the fields of struct vnode_impl.
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/vnode_impl.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/vnode_impl.h
diff -u src/sys/sys/vnode_impl.h:1.5 src/sys/sys/vnode_impl.h:1.6
--- src/sys/sys/vnode_impl.h:1.5 Mon Jan 2 10:33:28 2017
+++ src/sys/sys/vnode_impl.h Wed Jan 4 17:06:13 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode_impl.h,v 1.5 2017/01/02 10:33:28 hannken Exp $ */
+/* $NetBSD: vnode_impl.h,v 1.6 2017/01/04 17:06:13 hannken Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -42,20 +42,31 @@ enum vnode_state {
VS_RECLAIMING, /* Intermediate, detaching the fs node. */
VS_RECLAIMED /* Stable, no fs node attached. */
};
+
TAILQ_HEAD(vnodelst, vnode_impl);
typedef struct vnodelst vnodelst_t;
+
struct vcache_key {
struct mount *vk_mount;
const void *vk_key;
size_t vk_key_len;
};
+
+/*
+ * Reading or writing any of these items requires holding the appropriate
+ * lock. Field markings and the corresponding locks:
+ *
+ * c vcache_lock
+ * d vdrain_lock
+ * i v_interlock
+ */
struct vnode_impl {
struct vnode vi_vnode;
- enum vnode_state vi_state;
- struct vnodelst *vi_lrulisthd;
- TAILQ_ENTRY(vnode_impl) vi_lrulist;
- SLIST_ENTRY(vnode_impl) vi_hash;
- struct vcache_key vi_key;
+ enum vnode_state vi_state; /* i: current state */
+ struct vnodelst *vi_lrulisthd; /* d: current lru list head */
+ TAILQ_ENTRY(vnode_impl) vi_lrulist; /* d: lru list */
+ SLIST_ENTRY(vnode_impl) vi_hash; /* c: vnode cache list */
+ struct vcache_key vi_key; /* c: vnode cache key */
};
typedef struct vnode_impl vnode_impl_t;