diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-09-30 16:45:13 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-12-05 18:00:36 +0100 |
commit | e5e886bad9e9e87b767ade3884faec1cfdec9b43 (patch) | |
tree | e9aff5b62a9b96b17cd526b9d71b5c00c1fba181 /fs/btrfs/disk-io.c | |
parent | 123a7f008c9e2b25b451c116620f1f6c77bd6b2b (diff) |
btrfs: add cached_state to read_extent_buffer_subpage
We don't use a cached state here at all, which generally makes sense as
async reads are going to unlock at endio time. However for blocking
reads we will call wait_extent_bit() for our range. Since the
lock_extent() stuff will return the cached_state for the start of the
range this is a helpful optimization to have for this case, we'll have
the exact state we want to wait on. Add a cached state here and simply
throw it away if we're a non-blocking read, otherwise we'll get a small
improvement by eliminating some tree searches.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
0 files changed, 0 insertions, 0 deletions