[PATCH][SRU][DISCO][EOAN] UBUNTU: SAUCE: shiftfs: setup correct s_maxbytes limit
Christian Brauner
christian.brauner at ubuntu.com
Wed Oct 23 12:22:28 UTC 2019
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>
---
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;
--
2.23.0
More information about the kernel-team
mailing list