]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add missing path cache update during fiemap
authorFilipe Manana <fdmanana@suse.com>
Mon, 3 Oct 2022 14:57:30 +0000 (15:57 +0100)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Oct 2022 15:55:00 +0000 (17:55 +0200)
commit45ecaaf5c843bbc1e406bd5a11507601f1e03195
tree9be0247eea88deca6d49badd2379f8de403a08fb
parentb45927a33d90352598c0a431f64299a9575a23de
btrfs: add missing path cache update during fiemap

When looking the stored result for a cached path node, if the stored
result is valid and has a value of true, we must update all the nodes for
all levels below it with a result of true as well. This is necessary when
moving from one leaf in the fs tree to the next one, as well as when
moving from a node at any level to the next node at the same level.

Currently this logic is missing as it was somehow forgotten by a recent
patch with the subject: "btrfs: speedup checking for extent sharedness
during fiemap".

This adds the missing logic, which is the counter part to what we do
when adding a shared node to the cache at store_backref_shared_cache().

Fixes: 9e784c181e22 ("btrfs: speedup checking for extent sharedness during fiemap")
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.c