ACK: [PATCH][SRU][DISCO][EOAN] UBUNTU: SAUCE: shiftfs: setup correct s_maxbytes limit

Connor Kuehl connor.kuehl at canonical.com
Thu Oct 31 21:49:35 UTC 2019


On 10/23/19 5:22 AM, Christian Brauner wrote:
> BugLink: https://bugs.launchpad.net/bugs/1849482
> 
> Set the s_maxbytes limit to MAX_LFS_FILESIZE.
> Currently shiftfs limits the maximum size for fallocate() needlessly
> causing calls such as fallocate --length 2GB ./file to fail. This
> limitation is arbitrary since it's not caused by the underlay but
> rather by shiftfs itself capping the s_maxbytes. This causes bugs such
> as the one reported in [1].
> 
> [1]: https://github.com/lxc/lxd/issues/6333
> Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>

Acked-by: Connor Kuehl <connor.kuehl at canonical.com>

> ---
>   fs/shiftfs.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/fs/shiftfs.c b/fs/shiftfs.c
> index 55bb32b611f2..ac22a5bf5b1f 100644
> --- a/fs/shiftfs.c
> +++ b/fs/shiftfs.c
> @@ -2057,6 +2057,7 @@ static int shiftfs_fill_super(struct super_block *sb, void *raw_data,
>   	inode->i_private = dentry->d_inode;
>   
>   	sb->s_magic = SHIFTFS_MAGIC;
> +	sb->s_maxbytes = MAX_LFS_FILESIZE;
>   	sb->s_op = &shiftfs_super_ops;
>   	sb->s_xattr = shiftfs_xattr_handlers;
>   	sb->s_d_op = &shiftfs_dentry_ops;
> 




More information about the kernel-team mailing list