@@ -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,
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@gmx.com> --- fs/ceph/mds_client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)