[sheepdog] [PATCH] sheep: remove unused sys->recovered_epoch
Liu Yuan
namei.unix at gmail.com
Fri Mar 29 14:31:47 CET 2013
From: Liu Yuan <tailai.ly at taobao.com>
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/ops.c | 1 -
sheep/recovery.c | 5 ++---
sheep/sheep_priv.h | 2 --
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/sheep/ops.c b/sheep/ops.c
index 204befd..84cb79b 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -275,7 +275,6 @@ static int cluster_make_fs(const struct sd_req *req, struct sd_rsp *rsp,
memset(sys->vdi_inuse, 0, sizeof(sys->vdi_inuse));
sys->epoch = 1;
- sys->recovered_epoch = 1;
ret = log_current_epoch();
if (ret)
diff --git a/sheep/recovery.c b/sheep/recovery.c
index 1877b74..e3a60f4 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -339,8 +339,8 @@ static void notify_recovery_completion_main(struct work *work)
static inline void finish_recovery(struct recovery_work *rw)
{
+ uint32_t recovered_epoch = rw->epoch;
recovering_work = NULL;
- sys->recovered_epoch = rw->epoch;
if (sd_store->end_recover)
sd_store->end_recover(sys->epoch - 1, rw->old_vinfo);
@@ -352,8 +352,7 @@ static inline void finish_recovery(struct recovery_work *rw)
rw->work.done = notify_recovery_completion_main;
queue_work(sys->recovery_wqueue, &rw->work);
- sd_dprintf("recovery complete: new epoch %"PRIu32,
- sys->recovered_epoch);
+ sd_dprintf("recovery complete: new epoch %"PRIu32, recovered_epoch);
}
static inline bool oid_in_prio_oids(struct recovery_work *rw, uint64_t oid)
diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h
index 32cf682..a067347 100644
--- a/sheep/sheep_priv.h
+++ b/sheep/sheep_priv.h
@@ -101,8 +101,6 @@ struct cluster_info {
struct list_head req_wait_queue;
int nr_outstanding_reqs;
- uint32_t recovered_epoch;
-
bool gateway_only;
bool disable_recovery;
bool nosync;
--
1.7.9.5
More information about the sheepdog
mailing list