]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: only submit mds request if mds is active
authorSage Weil <sage@newdream.net>
Thu, 13 Nov 2008 20:42:00 +0000 (12:42 -0800)
committerSage Weil <sage@newdream.net>
Thu, 13 Nov 2008 20:45:37 +0000 (12:45 -0800)
Wait until we get a new map instead.

src/kernel/mds_client.c

index fddf2a00013e4a2486614a9346d574a20075d8ab..fad29b7d950e3127faaf056a6bcfff298a4e0a0b 100644 (file)
@@ -1235,8 +1235,9 @@ retry:
        }
 
        mds = __choose_mds(mdsc, req);
-       if (mds < 0) {
-               dout(30, "do_request waiting for new mdsmap\n");
+       if (mds < 0 ||
+           ceph_mdsmap_get_state(mdsc->mdsmap, mds) < CEPH_MDS_STATE_ACTIVE) {
+               dout(30, "do_request no mds or not active, waiting for map\n");
                err = wait_for_new_map(mdsc, req->r_timeout);
                if (err)
                        goto finish;