From 7e03bd639e7d6fbb90340e2b61d104e67f1e1004 Mon Sep 17 00:00:00 2001 From: Patience Warnick Date: Mon, 7 Apr 2008 10:26:19 -0700 Subject: [PATCH] removed some junk.. --- src/kernel/mon_client.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/kernel/mon_client.c b/src/kernel/mon_client.c index f853873739851..f3df29c13c690 100644 --- a/src/kernel/mon_client.c +++ b/src/kernel/mon_client.c @@ -72,7 +72,7 @@ static int pick_mon(struct ceph_mon_client *monc, int notmon) void ceph_delayed_work(struct delayed_work *dwork, unsigned long *delay) { - dout(10, "ceph_delayed_work started\n"); + dout(5, "ceph_delayed_work started\n"); schedule_delayed_work(dwork, *delay); if (*delay < MAX_DELAY_INTERVAL) *delay *= 2; @@ -88,17 +88,14 @@ static void work_monc_request_mdsmap(struct work_struct *work) { struct ceph_mon_client *monc = container_of(work, struct ceph_mon_client, delayed_work.work); - static int count = 0; - dout(5, "work_monc_request_mdsmap send map request count %d\n", count); + dout(5, "work_monc_request_mdsmap send map request \n"); - if (count > 5) { ceph_msg_send(monc->client->msgr, monc->msg, 0); - } /* keep sending request until we receive mds map */ - ceph_delayed_work(&monc->delayed_work, &monc->delay); - ++count; + if(monc->want_mdsmap != 0) + ceph_delayed_work(&monc->delayed_work, &monc->delay); } int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) @@ -112,6 +109,7 @@ int ceph_monc_init(struct ceph_mon_client *monc, struct ceph_client *cl) spin_lock_init(&monc->lock); INIT_RADIX_TREE(&monc->statfs_request_tree, GFP_KERNEL); INIT_DELAYED_WORK(&monc->delayed_work, work_monc_request_mdsmap); + monc->delay = BASE_DELAY_INTERVAL; monc->last_tid = 0; monc->want_mdsmap = 0; return 0; @@ -140,6 +138,7 @@ int ceph_monc_got_mdsmap(struct ceph_mon_client *monc, __u32 have) dout(5, "ceph_monc_got_mdsmap have %u > wanted %u\n", have, monc->want_mdsmap); /* we got map so take map request out of queue */ + dout(5, "ceph_monc_got_mdsmap cancel_delayed_work_sync called\n"); cancel_delayed_work_sync(&monc->delayed_work); return 0; } else { -- 2.39.5