diff options
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/mds_client.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 509339ceef72..a6949cc7c69a 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c | |||
@@ -693,9 +693,11 @@ static int __choose_mds(struct ceph_mds_client *mdsc, | |||
693 | dout("choose_mds %p %llx.%llx " | 693 | dout("choose_mds %p %llx.%llx " |
694 | "frag %u mds%d (%d/%d)\n", | 694 | "frag %u mds%d (%d/%d)\n", |
695 | inode, ceph_vinop(inode), | 695 | inode, ceph_vinop(inode), |
696 | frag.frag, frag.mds, | 696 | frag.frag, mds, |
697 | (int)r, frag.ndist); | 697 | (int)r, frag.ndist); |
698 | return mds; | 698 | if (ceph_mdsmap_get_state(mdsc->mdsmap, mds) >= |
699 | CEPH_MDS_STATE_ACTIVE) | ||
700 | return mds; | ||
699 | } | 701 | } |
700 | 702 | ||
701 | /* since this file/dir wasn't known to be | 703 | /* since this file/dir wasn't known to be |
@@ -708,7 +710,9 @@ static int __choose_mds(struct ceph_mds_client *mdsc, | |||
708 | dout("choose_mds %p %llx.%llx " | 710 | dout("choose_mds %p %llx.%llx " |
709 | "frag %u mds%d (auth)\n", | 711 | "frag %u mds%d (auth)\n", |
710 | inode, ceph_vinop(inode), frag.frag, mds); | 712 | inode, ceph_vinop(inode), frag.frag, mds); |
711 | return mds; | 713 | if (ceph_mdsmap_get_state(mdsc->mdsmap, mds) >= |
714 | CEPH_MDS_STATE_ACTIVE) | ||
715 | return mds; | ||
712 | } | 716 | } |
713 | } | 717 | } |
714 | } | 718 | } |