1. 08 Jul, 2021 3 commits
  2. 01 Jul, 2021 3 commits
    • Stephen Brennan's avatar
      ext4: use ext4_grp_locked_error in mb_find_extent · cd84bbba
      Stephen Brennan authored
      Commit 5d1b1b3f ("ext4: fix BUG when calling ext4_error with locked
      block group") introduces ext4_grp_locked_error to handle unlocking a
      group in error cases. Otherwise, there is a possibility of a sleep while
      atomic. However, since 43c73221 ("ext4: replace BUG_ON with WARN_ON
      in mb_find_extent()"), mb_find_extent() has contained a ext4_error()
      call while a group spinlock is held. Replace this with
      ext4_grp_locked_error.
      
      Fixes: 43c73221 ("ext4: replace BUG_ON with WARN_ON in mb_find_extent()")
      Cc: <stable@vger.kernel.org> # 4.14+
      Signed-off-by: default avatarStephen Brennan <stephen.s.brennan@oracle.com>
      Reviewed-by: default avatarLukas Czerner <lczerner@redhat.com>
      Reviewed-by: default avatarJunxiao Bi <junxiao.bi@oracle.com>
      Link: https://lore.kernel.org/r/20210623232114.34457-1-stephen.s.brennan@oracle.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      cd84bbba
    • Ye Bin's avatar
      ext4: fix WARN_ON_ONCE(!buffer_uptodate) after an error writing the superblock · 558d6450
      Ye Bin authored
      If a writeback of the superblock fails with an I/O error, the buffer
      is marked not uptodate.  However, this can cause a WARN_ON to trigger
      when we attempt to write superblock a second time.  (Which might
      succeed this time, for cerrtain types of block devices such as iSCSI
      devices over a flaky network.)
      
      Try to detect this case in flush_stashed_error_work(), and also change
      __ext4_handle_dirty_metadata() so we always set the uptodate flag, not
      just in the nojournal case.
      
      Before this commit, this problem can be repliciated via:
      
      1. dmsetup  create dust1 --table  '0 2097152 dust /dev/sdc 0 4096'
      2. mount  /dev/mapper/dust1  /home/test
      3. dmsetup message dust1 0 addbadblock 0 10
      4. cd /home/test
      5. echo "XXXXXXX" > t
      
      After a few seconds, we got following warning:
      
      [   80.654487] end_buffer_async_write: bh=0xffff88842f18bdd0
      [   80.656134] Buffer I/O error on dev dm-0, logical block 0, lost async page write
      [   85.774450] EXT4-fs error (device dm-0): ext4_check_bdev_write_error:193: comm kworker/u16:8: Error while async write back metadata
      [   91.415513] mark_buffer_dirty: bh=0xffff88842f18bdd0
      [   91.417038] ------------[ cut here ]------------
      [   91.418450] WARNING: CPU: 1 PID: 1944 at fs/buffer.c:1092 mark_buffer_dirty.cold+0x1c/0x5e
      [   91.440322] Call Trace:
      [   91.440652]  __jbd2_journal_temp_unlink_buffer+0x135/0x220
      [   91.441354]  __jbd2_journal_unfile_buffer+0x24/0x90
      [   91.441981]  __jbd2_journal_refile_buffer+0x134/0x1d0
      [   91.442628]  jbd2_journal_commit_transaction+0x249a/0x3240
      [   91.443336]  ? put_prev_entity+0x2a/0x200
      [   91.443856]  ? kjournald2+0x12e/0x510
      [   91.444324]  kjournald2+0x12e/0x510
      [   91.444773]  ? woken_wake_function+0x30/0x30
      [   91.445326]  kthread+0x150/0x1b0
      [   91.445739]  ? commit_timeout+0x20/0x20
      [   91.446258]  ? kthread_flush_worker+0xb0/0xb0
      [   91.446818]  ret_from_fork+0x1f/0x30
      [   91.447293] ---[ end trace 66f0b6bf3d1abade ]---
      Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
      Link: https://lore.kernel.org/r/20210615090537.3423231-1-yebin10@huawei.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      558d6450
    • Theodore Ts'o's avatar
      Revert "ext4: consolidate checks for resize of bigalloc into ext4_resize_begin" · 8813587a
      Theodore Ts'o authored
      The function ext4_resize_begin() gets called from three different
      places, and online resize for bigalloc file systems is disallowed from
      the old-style online resize (EXT4_IOC_GROUP_ADD and
      EXT4_IOC_GROUP_EXTEND), but it *is* supposed to be allowed via
      EXT4_IOC_RESIZE_FS.
      
      This reverts commit e9f9f61d.
      8813587a
  3. 30 Jun, 2021 2 commits
  4. 24 Jun, 2021 15 commits
  5. 23 Jun, 2021 7 commits
  6. 22 Jun, 2021 1 commit
  7. 17 Jun, 2021 7 commits
  8. 06 Jun, 2021 2 commits