[sheepdog] [PATCH 2/5] sheep: remove sys->req_wait_for_obj_list
Liu Yuan
namei.unix at gmail.com
Fri Jun 1 11:31:34 CEST 2012
From: Liu Yuan <tailai.ly at taobao.com>
Since now farm has a per-object lock, thus support concurrent access to
the same object, there is no need for sys->req_wait_for_obj_list
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/group.c | 1 -
sheep/recovery.c | 3 ---
sheep/sdnet.c | 18 ------------------
sheep/sheep_priv.h | 1 -
4 files changed, 23 deletions(-)
diff --git a/sheep/group.c b/sheep/group.c
index d597c8c..66906ca 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -1073,7 +1073,6 @@ int create_cluster(int port, int64_t zone, int nr_vnodes)
INIT_LIST_HEAD(&sys->leave_list);
INIT_LIST_HEAD(&sys->outstanding_req_list);
- INIT_LIST_HEAD(&sys->req_wait_for_obj_list);
INIT_LIST_HEAD(&sys->consistent_obj_list);
INIT_LIST_HEAD(&sys->blocking_conn_list);
diff --git a/sheep/recovery.c b/sheep/recovery.c
index fb8395f..0528019 100644
--- a/sheep/recovery.c
+++ b/sheep/recovery.c
@@ -389,7 +389,6 @@ static void do_recover_main(struct work *work)
suspended_recovery_work = rw;
return;
}
- resume_pending_requests();
queue_work(sys->recovery_wqueue, &rw->work);
return;
}
@@ -415,8 +414,6 @@ static void do_recover_main(struct work *work)
sd_store->end_recover(&iocb);
}
}
-
- resume_pending_requests();
}
static int request_obj_list(struct sd_node *e, uint32_t epoch,
diff --git a/sheep/sdnet.c b/sheep/sdnet.c
index b03903a..2014e1e 100644
--- a/sheep/sdnet.c
+++ b/sheep/sdnet.c
@@ -126,7 +126,6 @@ static void io_op_done(struct work *work)
leave_cluster();
}
- resume_pending_requests();
resume_recovery_work();
req_done(req);
@@ -166,7 +165,6 @@ static void gateway_op_done(struct work *work)
break;
}
- resume_pending_requests();
resume_recovery_work();
req_done(req);
@@ -243,11 +241,6 @@ static int check_request_busy(struct request *req)
return -1;
}
- if (is_access_to_busy_objects(req->local_oid)) {
- list_add_tail(&req->request_list, &sys->req_wait_for_obj_list);
- return -1;
- }
-
return 0;
}
@@ -259,17 +252,6 @@ static void requeue_request(struct request *req)
queue_request(req);
}
-void resume_pending_requests(void)
-{
- struct request *req, *n;
- LIST_HEAD(pending_list);
-
- list_splice_init(&sys->req_wait_for_obj_list, &pending_list);
-
- list_for_each_entry_safe(req, n, &pending_list, request_list)
- requeue_request(req);
-}
-
void resume_wait_epoch_requests(void)
{
struct request *req, *t;
diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h
index 0fbdbdb..91621be 100644
--- a/sheep/sheep_priv.h
+++ b/sheep/sheep_priv.h
@@ -120,7 +120,6 @@ struct cluster_info {
DECLARE_BITMAP(vdi_inuse, SD_NR_VDIS);
struct list_head outstanding_req_list;
- struct list_head req_wait_for_obj_list;
struct list_head consistent_obj_list;
struct list_head blocking_conn_list;
--
1.7.10.2
More information about the sheepdog
mailing list