mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
btrfs: use GFP_NOWAIT for tree block readahead
extent_buffer readahead should not be able to painfully stall a search_slot and hog tree locks by getting stuck in direct reclaim. If the allocation fails, that is fine, we simply fail to do the readahead in that case. Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Boris Burkov <boris@bur.io> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
6b338068ac
commit
536e94a4c3
|
|
@ -5056,7 +5056,8 @@ void btrfs_readahead_tree_block(struct btrfs_fs_info *fs_info,
|
|||
.level = level,
|
||||
.transid = gen
|
||||
};
|
||||
struct btrfs_eb_prealloc pa = { 0 };
|
||||
/* Readahead is best effort so prefer to fail rather than block in reclaim. */
|
||||
struct btrfs_eb_prealloc pa = { .supports_nowait = true };
|
||||
struct extent_buffer *eb;
|
||||
int ret;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user