1. 12 9月, 2022 2 次提交
    • Z
      fs/buffer: add some new buffer read helpers · fdee117e
      Zhang Yi 提交于
      Current ll_rw_block() helper is fragile because it assumes that locked
      buffer means it's under IO which is submitted by some other who holds
      the lock, it skip buffer if it failed to get the lock, so it's only
      safe on the readahead path. Unfortunately, now that most filesystems
      still use this helper mistakenly on the sync metadata read path. There
      is no guarantee that the one who holds the buffer lock always submit IO
      (e.g. buffer_migrate_folio_norefs() after commit 88dbcbb3 ("blkdev:
      avoid migration stalls for blkdev pages"), it could lead to false
      positive -EIO when submitting reading IO.
      
      This patch add some friendly buffer read helpers to prepare replacing
      ll_rw_block() and similar calls. We can only call bh_readahead_[]
      helpers for the readahead paths.
      
      Link: https://lkml.kernel.org/r/20220901133505.2510834-3-yi.zhang@huawei.comSigned-off-by: NZhang Yi <yi.zhang@huawei.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      fdee117e
    • Z
      fs/buffer: remove __breadahead_gfp() · 214f8796
      Zhang Yi 提交于
      Patch series "fs/buffer: remove ll_rw_block()", v2.
      
      ll_rw_block() will skip locked buffer before submitting IO, it assumes
      that locked buffer means it is under IO.  This assumption is not always
      true because we cannot guarantee every buffer lock path would submit IO. 
      After commit 88dbcbb3 ("blkdev: avoid migration stalls for blkdev
      pages"), buffer_migrate_folio_norefs() becomes one exceptional case, and
      there may be others.  So ll_rw_block() is not safe on the sync read path,
      we could get false positive EIO return value when filesystem reading
      metadata.  It seems that it could be only used on the readahead path.
      
      Unfortunately, many filesystem misuse the ll_rw_block() on the sync read
      path.  This patch set just remove ll_rw_block() and add new friendly
      helpers, which could prevent false positive EIO on the read metadata path.
      Thanks for the suggestion from Jan, the original discussion is at [1].
      
       patch 1: remove unused helpers in fs/buffer.c
       patch 2: add new bh_read_[*] helpers
       patch 3-11: remove all ll_rw_block() calls in filesystems
       patch 12-14: do some leftover cleanups.
      
      [1]. https://lore.kernel.org/linux-mm/20220825080146.2021641-1-chengzhihao1@huawei.com/
      
      
      This patch (of 14):
      
      No one use __breadahead_gfp() and sb_breadahead_unmovable() any more,
      remove them.
      
      Link: https://lkml.kernel.org/r/20220901133505.2510834-1-yi.zhang@huawei.com
      Link: https://lkml.kernel.org/r/20220901133505.2510834-2-yi.zhang@huawei.comSigned-off-by: NZhang Yi <yi.zhang@huawei.com>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Andreas Gruenbacher <agruenba@redhat.com>
      Cc: Bob Peterson <rpeterso@redhat.com>
      Cc: Evgeniy Dushistov <dushistov@mail.ru>
      Cc: Heming Zhao <ocfs2-devel@oss.oracle.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
      Cc: Mark Fasheh <mark@fasheh.com>
      Cc: Theodore Ts'o <tytso@mit.edu>
      Cc: Yu Kuai <yukuai3@huawei.com>
      Cc: Zhihao Cheng <chengzhihao1@huawei.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      214f8796
  2. 03 8月, 2022 2 次提交
  3. 16 7月, 2022 1 次提交
  4. 15 7月, 2022 2 次提交
  5. 29 6月, 2022 2 次提交
  6. 10 5月, 2022 5 次提交
  7. 09 5月, 2022 7 次提交
  8. 02 4月, 2022 1 次提交
  9. 23 3月, 2022 1 次提交
  10. 17 3月, 2022 1 次提交
  11. 15 3月, 2022 2 次提交
  12. 08 3月, 2022 1 次提交
  13. 02 2月, 2022 1 次提交
  14. 17 12月, 2021 1 次提交
  15. 19 10月, 2021 2 次提交
  16. 25 9月, 2021 1 次提交
  17. 17 8月, 2021 1 次提交
  18. 13 7月, 2021 1 次提交
  19. 30 6月, 2021 2 次提交
  20. 06 5月, 2021 1 次提交
  21. 22 3月, 2021 1 次提交
  22. 25 2月, 2021 2 次提交