Re: [PATCH v2 0/4] fix sb->s_maxbytes related checks in cephfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 19, 2018 at 10:18 PM Chengguang Xu <cgxu519@xxxxxxx> wrote:
>
> cephfs allows dynamically changing(increase or decrease) maximum file
> size (sb->s_maxbytes). So in some cases(e.g. decrease s_maxbytes to a
> relatively small size), the size of existing file may become larger
> than current sb->s_maxbytes, in this case, blocking exceeded data range
> will cause file incomplete.
>
> This patch series tries to fix the issue by comparing real file size
> and max file size limit, and in order to not bother to VFS and other
> specific filesystems we just simply set sb->s_maxbytes to
> MAX_LFS_FILESIZE so that we can pass all checks in VFS successfully.
> We add new field max_file_size in struct ceph_fs_client to store
> max file size limit and doing additional proper checks based on it
> in cephfs code.
>
> v1->v2:
> - delete unnecessary fix in ceph_read_iter().
>
> Chengguang Xu (4):
>   ceph: add new field max_file_size in ceph_fs_client
>   ceph: add additional range check in ceph_fallocate()
>   ceph: add additional offset check in ceph_write_iter()
>   ceph: compare fsc->max_file_size and inode->i_size for max file size
>     limit
>
>  fs/ceph/file.c       | 18 +++++++++++++++++-
>  fs/ceph/mds_client.c |  3 ++-
>  fs/ceph/super.c      |  3 ++-
>  fs/ceph/super.h      |  1 +
>  4 files changed, 22 insertions(+), 3 deletions(-)
>
> --
> 2.17.1
>
applied, thanks

Yan, Zheng

> --
> 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
--
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



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux