btrfs-progs/kernel-shared
Qu Wenruo 07ecf878c1 btrfs-progs: check: batch v1 space cache inodes when clearing
Currently v1 space cache clearing will delete one cache inode just in
one transaction, and then start a new transaction to delete the next
inode.

This is far from efficient and can make the already slow v1 space cache
deleting even slower, as large fs has tons of cache inodes to delete.

This patch will speed up the process by batching up to 16 inode deletion
into one transaction.

A quick benchmark of deleting 702 v1 space cache inodes would look like
this:

Unpatched:		4.898s
Patched:		0.087s

Which is obviously a big win.

Reported-by: Joshua <joshua@mailmag.net>
Link: https://lore.kernel.org/linux-btrfs/0b4cf70fc883e28c97d893a3b2f81b11@mailmag.net/
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2021-07-22 16:26:05 +02:00
..
backref.c btrfs-progs: move transaction.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
backref.h btrfs-progs: move extent_io.c to kernel-shared/ 2020-08-31 17:01:04 +02:00
ctree.c btrfs-progs: switch %Lu to %llu format 2021-06-19 22:07:49 +02:00
ctree.h btrfs-progs: zoned: redirty clean extent buffers 2021-05-06 16:41:45 +02:00
delayed-ref.c btrfs-progs: move transaction.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
delayed-ref.h btrfs-progs: move delayed-ref.[ch] to kernel-shared/ 2020-03-31 18:37:34 +02:00
dir-item.c btrfs-progs: make btrfs_lookup_dir_index in parity with kernel code 2020-08-31 17:09:49 +02:00
disk-io.c btrfs-progs: switch %Lu to %llu format 2021-06-19 22:07:49 +02:00
disk-io.h btrfs-progs: pass in fs_info to btrfs_csum_data 2021-03-24 22:20:19 +01:00
extent_io.c btrfs-progs: switch %Lu to %llu format 2021-06-19 22:07:49 +02:00
extent_io.h btrfs-progs: move extent_io.c to kernel-shared/ 2020-08-31 17:01:04 +02:00
extent-tree.c btrfs-progs: switch %Lu to %llu format 2021-06-19 22:07:49 +02:00
file-item.c btrfs-progs: delete bogus zero checksum check 2021-05-08 00:58:51 +02:00
file.c btrfs-progs: move transaction.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
free-space-cache.c btrfs-progs: check: batch v1 space cache inodes when clearing 2021-07-22 16:26:05 +02:00
free-space-cache.h btrfs-progs: check: batch v1 space cache inodes when clearing 2021-07-22 16:26:05 +02:00
free-space-tree.c btrfs-progs: mkfs: support free space tree as -R option 2020-09-08 22:06:04 +02:00
free-space-tree.h btrfs-progs: rename btrfs_block_group_cache to btrfs_block_group 2020-05-11 20:50:00 +02:00
inode-item.c btrfs-progs: move transaction.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
inode.c btrfs-progs: make btrfs_lookup_dir_index in parity with kernel code 2020-08-31 17:09:49 +02:00
print-tree.c btrfs-progs: switch %Lu to %llu format 2021-06-19 22:07:49 +02:00
print-tree.h btrfs-progs: dump-tree: add options to dump checksums 2021-06-19 22:07:49 +02:00
root-tree.c btrfs-progs: move transaction.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
transaction.c btrfs-progs: zoned: redirty clean extent buffers 2021-05-06 16:41:45 +02:00
transaction.h btrfs-progs: move transaction.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
ulist.c btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00
ulist.h btrfs-progs: build: drop kernel-lib from -I and update paths 2019-07-03 20:49:04 +02:00
uuid-tree.c btrfs-progs: move transaction.c to kernel-shared/ 2020-08-31 17:01:06 +02:00
volumes.c btrfs-progs: zoned: implement zoned chunk allocator 2021-05-06 16:41:45 +02:00
volumes.h btrfs-progs: zoned: implement zoned chunk allocator 2021-05-06 16:41:45 +02:00
zoned.c btrfs-progs: zoned: fix memory leak in btrfs_sb_io() 2021-07-02 17:27:53 +02:00
zoned.h btrfs-progs: do not BUG_ON if btrfs_add_to_fsid succeeded to write superblock 2021-05-12 16:00:14 +02:00