Skip to content

Commit 6d9033f

Browse files
committed
mke2fs: if the kernel supports bs > gt, skip the large blockize check
There are patches which alow ext4 to support file systems where the block size is larger than the page size. For such kernels, skip the test for large block sizes, which would require the user to explicitly answer give permission to proceed. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 337cae6 commit 6d9033f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

misc/mke2fs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2578,7 +2578,8 @@ static void PRS(int argc, char *argv[])
25782578
fs_param.s_desc_size = EXT2_MIN_DESC_SIZE_64BIT;
25792579

25802580
/* This check should happen beyond the last assignment to blocksize */
2581-
if (blocksize > sys_page_size) {
2581+
if (blocksize > sys_page_size &&
2582+
access("/sys/fs/ext4/features/blocksize_gt_pagesize", F_OK)) {
25822583
if (!force) {
25832584
com_err(program_name, 0,
25842585
_("%d-byte blocks too big for system (max %d)"),

0 commit comments

Comments
 (0)