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

Pull ext4 bugfixes from Ted Ts'o.

Misc ext4 fixes, delayed by Ted moving mail servers and email getting
marked as spam due to bad spf records.

* tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: add WARN_ON to check the length of allocated blocks
ext4: fix retry handling in ext4_ext_truncate()
ext4: destroy ext4_es_cachep on module unload
ext4: make sure group number is bumped after a inode allocation race

+25 -27
+1 -1
fs/ext4/extents.c
··· 4412 4412 retry: 4413 4413 err = ext4_es_remove_extent(inode, last_block, 4414 4414 EXT_MAX_BLOCKS - last_block); 4415 - if (err == ENOMEM) { 4415 + if (err == -ENOMEM) { 4416 4416 cond_resched(); 4417 4417 congestion_wait(BLK_RW_ASYNC, HZ/50); 4418 4418 goto retry;
+5 -5
fs/ext4/ialloc.c
··· 734 734 ino = ext4_find_next_zero_bit((unsigned long *) 735 735 inode_bitmap_bh->b_data, 736 736 EXT4_INODES_PER_GROUP(sb), ino); 737 - if (ino >= EXT4_INODES_PER_GROUP(sb)) { 738 - if (++group == ngroups) 739 - group = 0; 740 - continue; 741 - } 737 + if (ino >= EXT4_INODES_PER_GROUP(sb)) 738 + goto next_group; 742 739 if (group == 0 && (ino+1) < EXT4_FIRST_INO(sb)) { 743 740 ext4_error(sb, "reserved inode found cleared - " 744 741 "inode=%lu", ino + 1); ··· 766 769 goto got; /* we grabbed the inode! */ 767 770 if (ino < EXT4_INODES_PER_GROUP(sb)) 768 771 goto repeat_in_this_group; 772 + next_group: 773 + if (++group == ngroups) 774 + group = 0; 769 775 } 770 776 err = -ENOSPC; 771 777 goto out;
+18 -21
fs/ext4/inode.c
··· 555 555 int ret; 556 556 unsigned long long status; 557 557 558 - #ifdef ES_AGGRESSIVE_TEST 559 - if (retval != map->m_len) { 560 - printk("ES len assertion failed for inode: %lu " 561 - "retval %d != map->m_len %d " 562 - "in %s (lookup)\n", inode->i_ino, retval, 563 - map->m_len, __func__); 558 + if (unlikely(retval != map->m_len)) { 559 + ext4_warning(inode->i_sb, 560 + "ES len assertion failed for inode " 561 + "%lu: retval %d != map->m_len %d", 562 + inode->i_ino, retval, map->m_len); 563 + WARN_ON(1); 564 564 } 565 - #endif 566 565 567 566 status = map->m_flags & EXT4_MAP_UNWRITTEN ? 568 567 EXTENT_STATUS_UNWRITTEN : EXTENT_STATUS_WRITTEN; ··· 655 656 int ret; 656 657 unsigned long long status; 657 658 658 - #ifdef ES_AGGRESSIVE_TEST 659 - if (retval != map->m_len) { 660 - printk("ES len assertion failed for inode: %lu " 661 - "retval %d != map->m_len %d " 662 - "in %s (allocation)\n", inode->i_ino, retval, 663 - map->m_len, __func__); 659 + if (unlikely(retval != map->m_len)) { 660 + ext4_warning(inode->i_sb, 661 + "ES len assertion failed for inode " 662 + "%lu: retval %d != map->m_len %d", 663 + inode->i_ino, retval, map->m_len); 664 + WARN_ON(1); 664 665 } 665 - #endif 666 666 667 667 /* 668 668 * If the extent has been zeroed out, we don't need to update ··· 1635 1637 int ret; 1636 1638 unsigned long long status; 1637 1639 1638 - #ifdef ES_AGGRESSIVE_TEST 1639 - if (retval != map->m_len) { 1640 - printk("ES len assertion failed for inode: %lu " 1641 - "retval %d != map->m_len %d " 1642 - "in %s (lookup)\n", inode->i_ino, retval, 1643 - map->m_len, __func__); 1640 + if (unlikely(retval != map->m_len)) { 1641 + ext4_warning(inode->i_sb, 1642 + "ES len assertion failed for inode " 1643 + "%lu: retval %d != map->m_len %d", 1644 + inode->i_ino, retval, map->m_len); 1645 + WARN_ON(1); 1644 1646 } 1645 - #endif 1646 1647 1647 1648 status = map->m_flags & EXT4_MAP_UNWRITTEN ? 1648 1649 EXTENT_STATUS_UNWRITTEN : EXTENT_STATUS_WRITTEN;
+1
fs/ext4/super.c
··· 5481 5481 kset_unregister(ext4_kset); 5482 5482 ext4_exit_system_zone(); 5483 5483 ext4_exit_pageio(); 5484 + ext4_exit_es(); 5484 5485 } 5485 5486 5486 5487 MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");