[sheepdog] [PATCH 1/2] sheep: get current nodes and vnodes from cache

yaohaiting.wujue at gmail.com yaohaiting.wujue at gmail.com
Fri May 25 10:28:28 CEST 2012


From: HaiTing Yao <wujue.yht at taobao.com>

When node does recovery, current nodes and vnodes have cache. There is
no need to read them from disk.

Use the field of the vnode_info, so move it to header file

Signed-off-by: HaiTing Yao <wujue.yht at taobao.com>
---
 include/sheep.h |    7 +++++++
 sheep/group.c   |    7 -------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/sheep.h b/include/sheep.h
index ac9179c..0933b48 100644
--- a/include/sheep.h
+++ b/include/sheep.h
@@ -162,6 +162,13 @@ struct sd_vnode {
 	uint32_t	zone;
 };
 
+struct vnode_info {
+	struct sd_vnode entries[SD_MAX_VNODES];
+	int nr_vnodes;
+	int nr_zones;
+	int refcnt;
+};
+
 struct epoch_log {
 	uint64_t ctime;
 	uint64_t time;
diff --git a/sheep/group.c b/sheep/group.c
index ac23661..d44b3dc 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -31,13 +31,6 @@ struct node {
 	struct list_head list;
 };
 
-struct vnode_info {
-	struct sd_vnode entries[SD_MAX_VNODES];
-	int nr_vnodes;
-	int nr_zones;
-	int refcnt;
-};
-
 struct join_message {
 	uint8_t proto_ver;
 	uint8_t nr_copies;
-- 
1.7.1




More information about the sheepdog mailing list