aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ceph/addr.c4
-rw-r--r--fs/ceph/mds_client.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 9cd0c0ea7cdb..e4b066cd912a 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -502,9 +502,9 @@ static struct ceph_snap_context *get_oldest_context(struct inode *inode,
502 dout(" head snapc %p has %d dirty pages\n", 502 dout(" head snapc %p has %d dirty pages\n",
503 snapc, ci->i_wrbuffer_ref_head); 503 snapc, ci->i_wrbuffer_ref_head);
504 if (truncate_size) 504 if (truncate_size)
505 *truncate_size = capsnap->truncate_size; 505 *truncate_size = ci->i_truncate_size;
506 if (truncate_seq) 506 if (truncate_seq)
507 *truncate_seq = capsnap->truncate_seq; 507 *truncate_seq = ci->i_truncate_seq;
508 } 508 }
509 spin_unlock(&ci->i_ceph_lock); 509 spin_unlock(&ci->i_ceph_lock);
510 return snapc; 510 return snapc;
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 4f49253387a0..ec6b35e9f966 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2106,6 +2106,11 @@ static int __do_request(struct ceph_mds_client *mdsc,
2106 dout("do_request mdsmap err %d\n", err); 2106 dout("do_request mdsmap err %d\n", err);
2107 goto finish; 2107 goto finish;
2108 } 2108 }
2109 if (mdsc->mdsmap->m_epoch == 0) {
2110 dout("do_request no mdsmap, waiting for map\n");
2111 list_add(&req->r_wait, &mdsc->waiting_for_map);
2112 goto finish;
2113 }
2109 if (!(mdsc->fsc->mount_options->flags & 2114 if (!(mdsc->fsc->mount_options->flags &
2110 CEPH_MOUNT_OPT_MOUNTWAIT) && 2115 CEPH_MOUNT_OPT_MOUNTWAIT) &&
2111 !ceph_mdsmap_is_cluster_available(mdsc->mdsmap)) { 2116 !ceph_mdsmap_is_cluster_available(mdsc->mdsmap)) {