[sheepdog] [PATCH 1/2] recovery: don't update_epoch for gateway_only node
Liu Yuan
namei.unix at gmail.com
Fri May 31 14:16:42 CEST 2013
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
sheep/recovery.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sheep/recovery.c b/sheep/recovery.c
index dba89fb..ffb43c5 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -445,7 +445,8 @@ static inline bool run_next_rw(void)
free_recovery_info(cur);
- sd_store->update_epoch(nrinfo->tgt_epoch);
+ if (!node_is_gateway_only())
+ sd_store->update_epoch(nrinfo->tgt_epoch);
main_thread_set(current_rinfo, nrinfo);
wakeup_all_requests();
@@ -805,7 +806,8 @@ int start_recovery(struct vnode_info *cur_vinfo, struct vnode_info *old_vinfo,
rinfo->cur_vinfo = grab_vnode_info(cur_vinfo);
rinfo->old_vinfo = grab_vnode_info(old_vinfo);
- sd_store->update_epoch(rinfo->tgt_epoch);
+ if (!node_is_gateway_only())
+ sd_store->update_epoch(rinfo->tgt_epoch);
if (main_thread_get(current_rinfo) != NULL) {
/* skip the previous epoch recovery */
--
1.7.9.5
More information about the sheepdog
mailing list