diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2018-07-19 17:15:24 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-08-02 22:33:27 +0300 |
commit | 719784ba706cdbb47ef87483950f0a4594d36e87 (patch) | |
tree | 98ebbab08cb3fda315435011ad517effcc08956e /fs/ceph/super.c | |
parent | f1d10e04637924f2b00a0fecdd2ca4565f5cfc3f (diff) | |
download | linux-719784ba706cdbb47ef87483950f0a4594d36e87.tar.xz |
ceph: add new field max_file_size in ceph_fs_client
In order to not bother to VFS and other specific filesystems,
we decided to do offset validation inside ceph kernel client,
so just simply set sb->s_maxbytes to MAX_LFS_FILESIZE so that
it can successfully pass VFS check. We add new field max_file_size
in ceph_fs_client to store real file size limit and doing proper
check based on it.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/super.c')
-rw-r--r-- | fs/ceph/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 3d8a26b2944f..43ca3b763875 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -940,11 +940,12 @@ static int ceph_set_super(struct super_block *s, void *data) dout("set_super %p data %p\n", s, data); s->s_flags = fsc->mount_options->sb_flags; - s->s_maxbytes = 1ULL << 40; /* temp value until we get mdsmap */ + s->s_maxbytes = MAX_LFS_FILESIZE; s->s_xattr = ceph_xattr_handlers; s->s_fs_info = fsc; fsc->sb = s; + fsc->max_file_size = 1ULL << 40; /* temp value until we get mdsmap */ s->s_op = &ceph_super_ops; s->s_d_op = &ceph_dentry_ops; |