summaryrefslogtreecommitdiff
path: root/fs/ext2
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2023-03-01 12:02:08 +0100
committerJan Kara <jack@suse.cz>2023-03-06 16:42:10 +0100
commite9cd1d9a34131fb56bef469d4e1cd31bd1b515e2 (patch)
tree436565241ddb6692141331a7cf976dca4426f2e6 /fs/ext2
parent63bceed808c5cafbac4e20b5a40012a0ec6c6529 (diff)
downloadlinux-next-e9cd1d9a34131fb56bef469d4e1cd31bd1b515e2.tar.gz
ext2: Correct maximum ext2 filesystem block size
Ext2 has traditionally supported filesystem block sizes upto page size or upto 65536. Macro EXT2_MAX_BLOCK_SIZE is set to 4096, however that is never used in ext2 so practically we always allowed whatever sb_set_blocksize() accepted. Fix value of EXT2_MAX_BLOCK_SIZE because it will be used in the next patch. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/ext2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index cb78d7dcfb95..6c8e838bb278 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -178,7 +178,7 @@ static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb)
* Macro-instructions used to manage several block sizes
*/
#define EXT2_MIN_BLOCK_SIZE 1024
-#define EXT2_MAX_BLOCK_SIZE 4096
+#define EXT2_MAX_BLOCK_SIZE 65536
#define EXT2_MIN_BLOCK_LOG_SIZE 10
#define EXT2_BLOCK_SIZE(s) ((s)->s_blocksize)
#define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))