diff options
author | Qu Wenruo <wqu@suse.com> | 2021-07-26 14:34:50 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-08-23 13:19:03 +0200 |
commit | 4c37a7938496756649096a7ec26320eb8b0d90fb (patch) | |
tree | af5f5ce79196e63e681a9a133d587652a5eba4cf /fs/btrfs/inode.c | |
parent | 214cc184321743327c84c4a13ad08d088dfb3c4a (diff) |
btrfs: reset this_bio_flag to avoid inheriting old flags
In btrfs_do_readpage(), we never reset @this_bio_flag after we hit a
compressed extent.
This is fine, as for PAGE_SIZE == sectorsize case, we can only have one
sector for one page, thus @this_bio_flag will only be set at most once.
But for subpage case, after hitting a compressed extent, @this_bio_flag
will always have EXTENT_BIO_COMPRESSED bit, even we're reading a regular
extent.
This will lead to various read errors, and causing new ASSERT() in
incoming subpage patches, which adds more strict check in
btrfs_submit_compressed_read().
Fix it by declaring @this_bio_flag inside the main loop and reset its
value for each iteration.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
0 files changed, 0 insertions, 0 deletions