aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/bpf/prog_tests/autoload.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2022-02-22 18:20:59 +0100
committerDavid Sterba <dsterba@suse.com>2022-02-23 17:55:01 +0100
commit26fbac2517fcad34fa3f950151fd4c0240fb2935 (patch)
tree55111ce5c59cf94c95b57dd1398526cc2a56c079 /tools/testing/selftests/bpf/prog_tests/autoload.c
parentbtrfs: defrag: don't use merged extent map for their generation check (diff)
downloadwireguard-linux-26fbac2517fcad34fa3f950151fd4c0240fb2935.tar.xz
wireguard-linux-26fbac2517fcad34fa3f950151fd4c0240fb2935.zip
btrfs: autodefrag: only scan one inode once
Although we have btrfs_requeue_inode_defrag(), for autodefrag we are still just exhausting all inode_defrag items in the tree. This means, it doesn't make much difference to requeue an inode_defrag, other than scan the inode from the beginning till its end. Change the behaviour to always scan from offset 0 of an inode, and till the end. By this we get the following benefit: - Straight-forward code - No more re-queue related check - Fewer members in inode_defrag We still keep the same btrfs_get_fs_root() and btrfs_iget() check for each loop, and added extra should_auto_defrag() check per-loop. Note: the patch needs to be backported and is intentionally written to minimize the diff size, code will be cleaned up later. CC: stable@vger.kernel.org # 5.16 Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions