Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ext4_for_linus-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:

- Fix fast commit checks for file systems with ea_inode enabled

- Don't drop the i_version mount option on a remount

- Fix FIEMAP reporting when there are holes in a bigalloc file system

- Don't fail when mounting read-only when there are inodes in the
orphan file

- Fix hole length overflow for indirect mapped files on file systems
with an 8k or 16k block file system

* tag 'ext4_for_linus-6.17-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
jbd2: prevent softlockup in jbd2_log_do_checkpoint()
ext4: fix incorrect function name in comment
ext4: use kmalloc_array() for array space allocation
ext4: fix hole length calculation overflow in non-extent inodes
ext4: don't try to clear the orphan_present feature block device is r/o
ext4: fix reserved gdt blocks handling in fsmap
ext4: fix fsmap end of range reporting with bigalloc
ext4: remove redundant __GFP_NOWARN
ext4: fix unused variable warning in ext4_init_new_dir
ext4: remove useless if check
ext4: check fast symlink for ea_inode correctly
ext4: preserve SB_I_VERSION on remount
ext4: show the default enabled i_version option

+37 -18
+20 -3
fs/ext4/fsmap.c
··· 393 393 /* Reserved GDT blocks */ 394 394 if (!ext4_has_feature_meta_bg(sb) || metagroup < first_meta_bg) { 395 395 len = le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks); 396 + 397 + /* 398 + * mkfs.ext4 can set s_reserved_gdt_blocks as 0 in some cases, 399 + * check for that. 400 + */ 401 + if (!len) 402 + return 0; 403 + 396 404 error = ext4_getfsmap_fill(meta_list, fsb, len, 397 405 EXT4_FMR_OWN_RESV_GDT); 398 406 if (error) ··· 534 526 ext4_group_t end_ag; 535 527 ext4_grpblk_t first_cluster; 536 528 ext4_grpblk_t last_cluster; 529 + struct ext4_fsmap irec; 537 530 int error = 0; 538 531 539 532 bofs = le32_to_cpu(sbi->s_es->s_first_data_block); ··· 618 609 goto err; 619 610 } 620 611 621 - /* Report any gaps at the end of the bg */ 612 + /* 613 + * The dummy record below will cause ext4_getfsmap_helper() to report 614 + * any allocated blocks at the end of the range. 615 + */ 616 + irec.fmr_device = 0; 617 + irec.fmr_physical = end_fsb + 1; 618 + irec.fmr_length = 0; 619 + irec.fmr_owner = EXT4_FMR_OWN_FREE; 620 + irec.fmr_flags = 0; 621 + 622 622 info->gfi_last = true; 623 - error = ext4_getfsmap_datadev_helper(sb, end_ag, last_cluster + 1, 624 - 0, info); 623 + error = ext4_getfsmap_helper(sb, info, &irec); 625 624 if (error) 626 625 goto err; 627 626
+2 -2
fs/ext4/indirect.c
··· 539 539 int indirect_blks; 540 540 int blocks_to_boundary = 0; 541 541 int depth; 542 - int count = 0; 542 + u64 count = 0; 543 543 ext4_fsblk_t first_block = 0; 544 544 545 545 trace_ext4_ind_map_blocks_enter(inode, map->m_lblk, map->m_len, flags); ··· 588 588 count++; 589 589 /* Fill in size of a hole we found */ 590 590 map->m_pblk = 0; 591 - map->m_len = min_t(unsigned int, map->m_len, count); 591 + map->m_len = umin(map->m_len, count); 592 592 goto cleanup; 593 593 } 594 594
+2 -2
fs/ext4/inode.c
··· 146 146 */ 147 147 int ext4_inode_is_fast_symlink(struct inode *inode) 148 148 { 149 - if (!(EXT4_I(inode)->i_flags & EXT4_EA_INODE_FL)) { 149 + if (!ext4_has_feature_ea_inode(inode->i_sb)) { 150 150 int ea_blocks = EXT4_I(inode)->i_file_acl ? 151 151 EXT4_CLUSTER_SIZE(inode->i_sb) >> 9 : 0; 152 152 ··· 3155 3155 folio_unlock(folio); 3156 3156 folio_put(folio); 3157 3157 /* 3158 - * block_write_begin may have instantiated a few blocks 3158 + * ext4_block_write_begin may have instantiated a few blocks 3159 3159 * outside i_size. Trim these off again. Don't need 3160 3160 * i_size_read because we hold inode lock. 3161 3161 */
-4
fs/ext4/namei.c
··· 2965 2965 struct inode *inode) 2966 2966 { 2967 2967 struct buffer_head *dir_block = NULL; 2968 - struct ext4_dir_entry_2 *de; 2969 2968 ext4_lblk_t block = 0; 2970 2969 int err; 2971 2970 ··· 2981 2982 dir_block = ext4_append(handle, inode, &block); 2982 2983 if (IS_ERR(dir_block)) 2983 2984 return PTR_ERR(dir_block); 2984 - de = (struct ext4_dir_entry_2 *)dir_block->b_data; 2985 2985 err = ext4_init_dirblock(handle, inode, dir_block, dir->i_ino, NULL, 0); 2986 - if (err) 2987 - goto out; 2988 2986 out: 2989 2987 brelse(dir_block); 2990 2988 return err;
+3 -2
fs/ext4/orphan.c
··· 589 589 } 590 590 oi->of_blocks = inode->i_size >> sb->s_blocksize_bits; 591 591 oi->of_csum_seed = EXT4_I(inode)->i_csum_seed; 592 - oi->of_binfo = kmalloc(oi->of_blocks*sizeof(struct ext4_orphan_block), 593 - GFP_KERNEL); 592 + oi->of_binfo = kmalloc_array(oi->of_blocks, 593 + sizeof(struct ext4_orphan_block), 594 + GFP_KERNEL); 594 595 if (!oi->of_binfo) { 595 596 ret = -ENOMEM; 596 597 goto out_put;
+1 -1
fs/ext4/page-io.c
··· 547 547 * first page of the bio. Otherwise it can deadlock. 548 548 */ 549 549 if (io->io_bio) 550 - gfp_flags = GFP_NOWAIT | __GFP_NOWARN; 550 + gfp_flags = GFP_NOWAIT; 551 551 retry_encrypt: 552 552 bounce_page = fscrypt_encrypt_pagecache_blocks(folio, 553 553 enc_bytes, 0, gfp_flags);
+8 -4
fs/ext4/super.c
··· 268 268 void ext4_sb_breadahead_unmovable(struct super_block *sb, sector_t block) 269 269 { 270 270 struct buffer_head *bh = bdev_getblk(sb->s_bdev, block, 271 - sb->s_blocksize, GFP_NOWAIT | __GFP_NOWARN); 271 + sb->s_blocksize, GFP_NOWAIT); 272 272 273 273 if (likely(bh)) { 274 274 if (trylock_buffer(bh)) ··· 1998 1998 fc->fs_private = ctx; 1999 1999 fc->ops = &ext4_context_ops; 2000 2000 2001 + /* i_version is always enabled now */ 2002 + fc->sb_flags |= SB_I_VERSION; 2003 + 2001 2004 return 0; 2002 2005 } 2003 2006 ··· 2978 2975 SEQ_OPTS_PRINT("min_batch_time=%u", sbi->s_min_batch_time); 2979 2976 if (nodefs || sbi->s_max_batch_time != EXT4_DEF_MAX_BATCH_TIME) 2980 2977 SEQ_OPTS_PRINT("max_batch_time=%u", sbi->s_max_batch_time); 2978 + if (nodefs && sb->s_flags & SB_I_VERSION) 2979 + SEQ_OPTS_PUTS("i_version"); 2981 2980 if (nodefs || sbi->s_stripe) 2982 2981 SEQ_OPTS_PRINT("stripe=%lu", sbi->s_stripe); 2983 2982 if (nodefs || EXT4_MOUNT_DATA_FLAGS & ··· 5319 5314 sb->s_flags = (sb->s_flags & ~SB_POSIXACL) | 5320 5315 (test_opt(sb, POSIX_ACL) ? SB_POSIXACL : 0); 5321 5316 5322 - /* i_version is always enabled now */ 5323 - sb->s_flags |= SB_I_VERSION; 5324 - 5325 5317 /* HSM events are allowed by default. */ 5326 5318 sb->s_iflags |= SB_I_ALLOW_HSM; 5327 5319 ··· 5416 5414 err = ext4_load_and_init_journal(sb, es, ctx); 5417 5415 if (err) 5418 5416 goto failed_mount3a; 5417 + if (bdev_read_only(sb->s_bdev)) 5418 + needs_recovery = 0; 5419 5419 } else if (test_opt(sb, NOLOAD) && !sb_rdonly(sb) && 5420 5420 ext4_has_feature_journal_needs_recovery(sb)) { 5421 5421 ext4_msg(sb, KERN_ERR, "required journal recovery "
+1
fs/jbd2/checkpoint.c
··· 285 285 retry: 286 286 if (batch_count) 287 287 __flush_batch(journal, &batch_count); 288 + cond_resched(); 288 289 spin_lock(&journal->j_list_lock); 289 290 goto restart; 290 291 }