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_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 bugfix from Ted Ts'o:
"This fixes the root cause of the ext4 data corruption bug which raised
a ruckus on LWN, Phoronix, and Slashdot.

This bug only showed up when non-standard mount options
(journal_async_commit and/or journal_checksum) were enabled, and when
the file system was not cleanly unmounted, but the root cause was the
inode bitmap modifications was not being properly journaled.

This could potentially lead to minor file system corruptions (pass 5
complaints with the inode allocation bitmap) after an unclean shutdown
under the wrong/unlucky workloads, but it turned into major failure if
the journal_checksum and/or jouaral_async_commit was enabled."

* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix unjournaled inode bitmap modification

+9 -10
+9 -10
fs/ext4/ialloc.c
··· 725 725 "inode=%lu", ino + 1); 726 726 continue; 727 727 } 728 + BUFFER_TRACE(inode_bitmap_bh, "get_write_access"); 729 + err = ext4_journal_get_write_access(handle, inode_bitmap_bh); 730 + if (err) 731 + goto fail; 728 732 ext4_lock_group(sb, group); 729 733 ret2 = ext4_test_and_set_bit(ino, inode_bitmap_bh->b_data); 730 734 ext4_unlock_group(sb, group); ··· 742 738 goto out; 743 739 744 740 got: 741 + BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata"); 742 + err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh); 743 + if (err) 744 + goto fail; 745 + 745 746 /* We may have to initialize the block bitmap if it isn't already */ 746 747 if (ext4_has_group_desc_csum(sb) && 747 748 gdp->bg_flags & cpu_to_le16(EXT4_BG_BLOCK_UNINIT)) { ··· 779 770 if (err) 780 771 goto fail; 781 772 } 782 - 783 - BUFFER_TRACE(inode_bitmap_bh, "get_write_access"); 784 - err = ext4_journal_get_write_access(handle, inode_bitmap_bh); 785 - if (err) 786 - goto fail; 787 773 788 774 BUFFER_TRACE(group_desc_bh, "get_write_access"); 789 775 err = ext4_journal_get_write_access(handle, group_desc_bh); ··· 826 822 ext4_group_desc_csum_set(sb, group, gdp); 827 823 } 828 824 ext4_unlock_group(sb, group); 829 - 830 - BUFFER_TRACE(inode_bitmap_bh, "call ext4_handle_dirty_metadata"); 831 - err = ext4_handle_dirty_metadata(handle, NULL, inode_bitmap_bh); 832 - if (err) 833 - goto fail; 834 825 835 826 BUFFER_TRACE(group_desc_bh, "call ext4_handle_dirty_metadata"); 836 827 err = ext4_handle_dirty_metadata(handle, NULL, group_desc_bh);