Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys Comment the fields of struct vnode_impl.
details: https://anonhg.NetBSD.org/src/rev/5db832a612e7
branches: trunk
changeset: 350105:5db832a612e7
user: hannken <hannken%NetBSD.org@localhost>
date: Wed Jan 04 17:06:13 2017 +0000
description:
Comment the fields of struct vnode_impl.
No functional change.
diffstat:
sys/sys/vnode_impl.h | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r e18a7e555175 -r 5db832a612e7 sys/sys/vnode_impl.h
--- a/sys/sys/vnode_impl.h Wed Jan 04 16:11:20 2017 +0000
+++ b/sys/sys/vnode_impl.h Wed Jan 04 17:06:13 2017 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index