mirror of
https://github.com/XTXMarkets/ternfs.git
synced 2025-12-21 10:40:04 -06:00
Set s_maxbytes in superblock
By default it is
s->s_maxbytes = MAX_NON_LFS;
that is to say `((1UL<<31) - 1)`. This tripped us in `sendfile`,
when the upper bound is set to `s_maxbytes`:
if (!max)
max = min(in_inode->i_sb->s_maxbytes, out_inode->i_sb->s_maxbytes);
See <https://elixir.bootlin.com/linux/v5.4.249/source/fs/read_write.c#L1443>
This commit is contained in:
@@ -341,6 +341,7 @@ static struct dentry* eggsfs_mount(struct file_system_type* fs_type, int flags,
|
||||
sb->s_time_gran = 1;
|
||||
sb->s_time_min = 0;
|
||||
sb->s_time_max = U64_MAX/1000000000ull;
|
||||
sb->s_maxbytes= MAX_LFS_FILESIZE;
|
||||
|
||||
struct inode* root = eggsfs_get_inode(sb, NULL, EGGSFS_ROOT_INODE);
|
||||
if (IS_ERR(root)) { err = PTR_ERR(root); goto out_sb; }
|
||||
|
||||
Reference in New Issue
Block a user