1. 25 9月, 2020 9 次提交
  2. 24 9月, 2020 5 次提交
  3. 12 9月, 2020 1 次提交
  4. 10 9月, 2020 3 次提交
  5. 08 9月, 2020 1 次提交
    • J
      block: Do not discard buffers under a mounted filesystem · 384d87ef
      Jan Kara 提交于
      Discarding blocks and buffers under a mounted filesystem is hardly
      anything admin wants to do. Usually it will confuse the filesystem and
      sometimes the loss of buffer_head state (including b_private field) can
      even cause crashes like:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
      PGD 0 P4D 0
      Oops: 0002 [#1] SMP PTI
      CPU: 4 PID: 203778 Comm: jbd2/dm-3-8 Kdump: loaded Tainted: G O     --------- -  - 4.18.0-147.5.0.5.h126.eulerosv2r9.x86_64 #1
      Hardware name: Huawei RH2288H V3/BC11HGSA0, BIOS 1.57 08/11/2015
      RIP: 0010:jbd2_journal_grab_journal_head+0x1b/0x40 [jbd2]
      ...
      Call Trace:
       __jbd2_journal_insert_checkpoint+0x23/0x70 [jbd2]
       jbd2_journal_commit_transaction+0x155f/0x1b60 [jbd2]
       kjournald2+0xbd/0x270 [jbd2]
      
      So if we don't have block device open with O_EXCL already, claim the
      block device while we truncate buffer cache. This makes sure any
      exclusive block device user (such as filesystem) cannot operate on the
      device while we are discarding buffer cache.
      Reported-by: NYe Bin <yebin10@huawei.com>
      Signed-off-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      [axboe: fix !CONFIG_BLOCK error in truncate_bdev_range()]
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      384d87ef
  6. 04 9月, 2020 5 次提交
  7. 02 9月, 2020 16 次提交