Considering 32bit kernel client, set s_maxbytes to MAX_LFS_FILESIZE when m_max_file_size is larger than MAX_LFS_FILESIZE. Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx> --- fs/ceph/mds_client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index df0a3bb0f6a5..5b12da7ff277 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -4057,7 +4057,11 @@ void ceph_mdsc_handle_mdsmap(struct ceph_mds_client *mdsc, struct ceph_msg *msg) } else { mdsc->mdsmap = newmap; /* first mds map */ } - mdsc->fsc->sb->s_maxbytes = mdsc->mdsmap->m_max_file_size; + + if (mdsc->mdsmap->m_max_file_size <= MAX_LFS_FILESIZE) + mdsc->fsc->sb->s_maxbytes = mdsc->mdsmap->m_max_file_size; + else + mdsc->fsc->sb->s_maxbytes = MAX_LFS_FILESIZE; __wake_requests(mdsc, &mdsc->waiting_for_map); ceph_monc_got_map(&mdsc->fsc->client->monc, CEPH_SUB_MDSMAP, -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html