Skip to content

Commit b485275

Browse files
Marc Dionnetorvalds
authored andcommitted
afs: Fix large file support
By default s_maxbytes is set to MAX_NON_LFS, which limits the usable file size to 2GB, enforced by the vfs. Commit b9b1f8d ("AFS: write support fixes") added support for the 64-bit fetch and store server operations, but did not change this value. As a result, attempts to write past the 2G mark result in EFBIG errors: $ dd if=/dev/zero of=foo bs=1M count=1 seek=2048 dd: error writing 'foo': File too large Set s_maxbytes to MAX_LFS_FILESIZE. Fixes: b9b1f8d ("AFS: write support fixes") Signed-off-by: Marc Dionne <[email protected]> Signed-off-by: David Howells <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent cd34070 commit b485275

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/afs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ static int afs_fill_super(struct super_block *sb, struct afs_fs_context *ctx)
435435
/* fill in the superblock */
436436
sb->s_blocksize = PAGE_SIZE;
437437
sb->s_blocksize_bits = PAGE_SHIFT;
438+
sb->s_maxbytes = MAX_LFS_FILESIZE;
438439
sb->s_magic = AFS_FS_MAGIC;
439440
sb->s_op = &afs_super_ops;
440441
if (!as->dyn_root)

0 commit comments

Comments
 (0)