linux-stable/fs/ext4
zhangyi (F) fa491b14cd ext4: introduce new metadata buffer read helpers
The previous patch add clear_buffer_verified() before we read metadata
block from disk again, but it's rather easy to miss clearing of this bit
because currently we read metadata buffer through different open codes
(e.g. ll_rw_block(), bh_submit_read() and invoke submit_bh() directly).
So, it's time to add common helpers to unify in all the places reading
metadata buffers instead. This patch add 3 helpers:

 - ext4_read_bh_nowait(): async read metadata buffer if it's actually
   not uptodate, clear buffer_verified bit before read from disk.
 - ext4_read_bh(): sync version of read metadata buffer, it will wait
   until the read operation return and check the return status.
 - ext4_read_bh_lock(): try to lock the buffer before read buffer, it
   will skip reading if the buffer is already locked.

After this patch, we need to use these helpers in all the places reading
metadata buffer instead of different open codes.

Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
Suggested-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20200924073337.861472-3-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2020-10-18 10:37:13 -04:00
..
acl.c ext4: handle ext4_mark_inode_dirty errors 2020-06-03 23:16:50 -04:00
acl.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
balloc.c ext4: clear buffer verified flag if read meta block from disk 2020-10-18 10:37:13 -04:00
bitmap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
block_validity.c ext4: rename system_blks to s_system_blks inside ext4_sb_info 2020-10-18 10:36:59 -04:00
dir.c ext4: avoid utf8_strncasecmp() with unstable name 2020-06-11 11:01:33 -04:00
ext4.h ext4: introduce new metadata buffer read helpers 2020-10-18 10:37:13 -04:00
ext4_extents.h ext4: fix EXT_MAX_EXTENT/INDEX to check for zeroed eh_max 2020-06-03 23:16:49 -04:00
ext4_jbd2.c ext4: abort the filesystem if failed to async write metadata buffer 2020-08-07 14:12:34 -04:00
ext4_jbd2.h ext4: drop ext4_journal_free_reserved() 2020-06-03 23:16:53 -04:00
extents.c ext4: clear buffer verified flag if read meta block from disk 2020-10-18 10:37:13 -04:00
extents_status.c ext4: remove unnecessary comparisons to bool 2020-06-03 23:16:49 -04:00
extents_status.h ext4: fix extent_status trace points 2020-01-25 02:03:03 -05:00
file.c ext4: flag as supporting buffered async reads 2020-10-18 10:36:12 -04:00
fsmap.c ext4: limit entries returned when counting fsmap records 2020-10-18 10:37:13 -04:00
fsmap.h ext4: fix up remaining files with SPDX cleanups 2017-12-17 22:00:59 -05:00
fsync.c ext4: add trace exit in exception path. 2020-10-18 10:36:59 -04:00
hash.c ext4: change to use fallthrough macro 2020-08-18 14:27:40 -04:00
ialloc.c ext4: clear buffer verified flag if read meta block from disk 2020-10-18 10:37:13 -04:00
indirect.c ext4: add trace exit in exception path. 2020-10-18 10:36:59 -04:00
inline.c ext4: delete duplicated words + other fixes 2020-10-18 10:36:13 -04:00
inode-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
inode.c ext4: clear buffer verified flag if read meta block from disk 2020-10-18 10:37:13 -04:00
ioctl.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
Kconfig ext4: replace HTTP links with HTTPS ones 2020-08-06 01:01:57 -04:00
Makefile ext4: support xattr gnu.* namespace for the Hurd 2020-06-12 13:23:34 -04:00
mballoc.c ext4: make mb_check_counter per group 2020-10-18 10:37:13 -04:00
mballoc.h ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
migrate.c ext4: handle ext4_mark_inode_dirty errors 2020-06-03 23:16:50 -04:00
mmp.c ext4: save all error info in save_error_info() and drop ext4_set_errno() 2020-04-01 17:29:06 -04:00
move_extent.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
namei.c ext4: remove unused argument from ext4_(inc|dec)_count 2020-10-18 10:36:13 -04:00
page-io.c ext4: add inline encryption support 2020-07-08 10:29:43 -07:00
readpage.c Improvements to ext4's block allocator performance for very large file 2020-08-21 11:03:38 -07:00
resize.c ext4: fix error handling code in add_new_gdb 2020-10-18 10:36:14 -04:00
super.c ext4: introduce new metadata buffer read helpers 2020-10-18 10:37:13 -04:00
symlink.c ext4: switch to fscrypt_get_symlink() 2018-01-11 22:10:40 -05:00
sysfs.c ext4: limit the length of per-inode prealloc list 2020-08-19 12:04:36 -04:00
truncate.h ext4: handle layout changes to pinned DAX mappings 2018-07-29 17:00:22 -04:00
verity.c This is the second round of ext4 commits for 5.8 merge window. It 2020-06-15 09:32:10 -07:00
xattr.c ext4: delete unnecessary checks before brelse() 2020-08-06 00:08:56 -04:00
xattr.h ext4: support xattr gnu.* namespace for the Hurd 2020-06-12 13:23:34 -04:00
xattr_hurd.c ext4: support xattr gnu.* namespace for the Hurd 2020-06-12 13:23:34 -04:00
xattr_security.c ext4: use XATTR_CREATE in ext4_initxattrs() 2018-05-10 11:52:14 -04:00
xattr_trusted.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xattr_user.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00