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

Stefan Bader stefan.bader at canonical.com
Thu Nov 7 16:24:29 UTC 2019


On 23.10.19 14:22, 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: Stefan Bader <stefan.bader 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;
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20191107/8eb033f4/attachment.sig>


More information about the kernel-team mailing list