]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
removed some junk..
authorPatience Warnick <patience@cranium.pelton.net>
Mon, 7 Apr 2008 17:26:19 +0000 (10:26 -0700)
committerPatience Warnick <patience@cranium.pelton.net>
Mon, 7 Apr 2008 17:26:19 +0000 (10:26 -0700)
src/kernel/mon_client.c

index f853873739851a731c49260a47819b723dfa23eb..f3df29c13c69088b19ab77a8fa5d056145a78391 100644 (file)
@@ -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 {