linux-stable/fs/btrfs
Qu Wenruo f31ea0888c btrfs: relocation: Check cancel request after each extent found
When relocating data block groups with tons of small extents, or large
metadata block groups, there can be over 200,000 extents.

We will iterate all extents of such block group in relocate_block_group(),
where iteration itself can be kinda time-consuming.

So when user want to cancel the balance, the extent iteration loop can
be another target.

This patch will add the cancelling check in the extent iteration loop of
relocate_block_group() to make balance cancelling faster.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-23 17:01:55 +01:00
..
tests btrfs: rename btrfs_put_fs_root and btrfs_grab_fs_root 2020-03-23 17:01:33 +01:00
acl.c
async-thread.c Btrfs: fix crash during unmount due to race with delayed inode workers 2020-03-23 17:01:51 +01:00
async-thread.h Btrfs: fix crash during unmount due to race with delayed inode workers 2020-03-23 17:01:51 +01:00
backref.c btrfs: backref, use correct count to resolve normal data refs 2020-03-23 17:01:40 +01:00
backref.h
block-group.c btrfs: add RCU locks around block group initialization 2020-03-23 17:01:53 +01:00
block-group.h btrfs: Move and unexport btrfs_rmap_block 2020-01-23 17:24:34 +01:00
block-rsv.c btrfs: slightly simplify global block reserve calculations 2020-03-23 17:01:46 +01:00
block-rsv.h
btrfs_inode.h btrfs: introduce per-inode file extent tree 2020-03-23 17:01:24 +01:00
check-integrity.c btrfs: remove buffer_heads form super block mirror integrity checking 2020-03-23 17:01:40 +01:00
check-integrity.h btrfs: remove btrfsic_submit_bh() 2020-03-23 17:01:39 +01:00
compression.c btrfs: use larger zlib buffer for s390 hardware compression 2020-01-31 10:30:40 -08:00
compression.h btrfs: compression: remove ops pointer from workspace_manager 2019-11-18 12:46:59 +01:00
ctree.c btrfs: inline checksum name and driver definitions 2020-03-23 17:01:52 +01:00
ctree.h btrfs: relocation: add error injection points for cancelling balance 2020-03-23 17:01:54 +01:00
delalloc-space.c btrfs: add a comment describing delalloc space reservation 2020-03-23 17:01:27 +01:00
delalloc-space.h
delayed-inode.c btrfs: add wrapper for transaction abort predicate 2020-03-23 17:01:34 +01:00
delayed-inode.h btrfs: delayed-inode: Replace zero-length array with flexible-array member 2020-03-23 17:01:53 +01:00
delayed-ref.c Btrfs: fix race between adding and putting tree mod seq elements and nodes 2020-01-31 14:01:20 +01:00
delayed-ref.h
dev-replace.c btrfs: sysfs, rename device_link add/remove functions 2020-03-23 17:01:35 +01:00
dev-replace.h btrfs: add __pure attribute to functions 2019-11-18 12:46:52 +01:00
dir-item.c
discard.c btrfs: add correction to handle -1 edge case in async discard 2020-01-20 16:41:01 +01:00
discard.h btrfs: have multiple discard lists 2020-01-20 16:41:00 +01:00
disk-io.c btrfs: return void from csum_tree_block 2020-03-23 17:01:52 +01:00
disk-io.h btrfs: use the page cache for super block reading 2020-03-23 17:01:39 +01:00
export.c btrfs: export helpers for subvolume name/id resolution 2020-03-23 17:01:42 +01:00
export.h btrfs: export helpers for subvolume name/id resolution 2020-03-23 17:01:42 +01:00
extent-io-tree.h btrfs: switch to per-transaction pinned extents 2020-03-23 17:01:38 +01:00
extent-tree.c btrfs: Open code insert_extent_backref 2020-03-23 17:01:53 +01:00
extent_io.c btrfs: Don't submit any btree write bio if the fs has errors 2020-03-23 17:01:46 +01:00
extent_io.h btrfs: sink argument tree to extent_read_full_page 2020-03-23 17:01:35 +01:00
extent_map.c Btrfs: fix race between using extent maps and merging them 2020-02-12 17:16:46 +01:00
extent_map.h btrfs: remove extent_map::bdev 2019-11-18 23:43:44 +01:00
file-item.c btrfs: introduce per-inode file extent tree 2020-03-23 17:01:24 +01:00
file.c Btrfs: move all reflink implementation code into its own file 2020-03-23 17:01:54 +01:00
free-space-cache.c btrfs: simplify error handling in __btrfs_write_out_cache() 2020-03-23 17:01:43 +01:00
free-space-cache.h btrfs: have multiple discard lists 2020-01-20 16:41:00 +01:00
free-space-tree.c btrfs: rename btrfs_put_fs_root and btrfs_grab_fs_root 2020-03-23 17:01:33 +01:00
free-space-tree.h btrfs: rename btrfs_block_group_cache 2019-11-18 17:51:51 +01:00
inode-item.c
inode-map.c btrfs: keep track of which extents have been discarded 2020-01-20 16:40:57 +01:00
inode-map.h
inode.c btrfs: convert snapshot/nocow exlcusion to drew lock 2020-03-23 17:01:44 +01:00
ioctl.c Btrfs: move all reflink implementation code into its own file 2020-03-23 17:01:54 +01:00
Kconfig btrfs: add Kconfig dependency for BLAKE2B 2019-12-09 17:56:06 +01:00
locking.c btrfs: Implement DREW lock 2020-03-23 17:01:43 +01:00
locking.h btrfs: Implement DREW lock 2020-03-23 17:01:43 +01:00
lzo.c btrfs: compression: inline free_workspace 2019-11-18 12:46:59 +01:00
Makefile Btrfs: move all reflink implementation code into its own file 2020-03-23 17:01:54 +01:00
misc.h btrfs: add 64bit safe helper for power of two checks 2019-11-18 12:46:50 +01:00
ordered-data.c btrfs: drop argument tree from btrfs_lock_and_flush_ordered_range 2020-03-23 17:01:34 +01:00
ordered-data.h btrfs: drop argument tree from btrfs_lock_and_flush_ordered_range 2020-03-23 17:01:34 +01:00
orphan.c
print-tree.c btrfs: Remove unneeded semicolon 2020-01-20 16:40:55 +01:00
print-tree.h
props.c btrfs: props: remove unnecessary hash_init() 2019-11-18 12:46:55 +01:00
props.h
qgroup.c btrfs: qgroup: Remove the unnecesaary spin lock for qgroup_rescan_running 2020-03-23 17:01:47 +01:00
qgroup.h btrfs: destroy qgroup extent records on transaction abort 2020-02-19 00:35:54 +01:00
raid56.c btrfs: use struct_size to calculate size of raid hash table 2020-03-23 17:01:44 +01:00
raid56.h
rcu-string.h btrfs: rcu-string: Replace zero-length array with flexible-array member 2020-03-23 17:01:53 +01:00
reada.c btrfs: rename btrfs_block_group_cache 2019-11-18 17:51:51 +01:00
ref-verify.c btrfs: ref-verify: fix memory leaks 2020-02-12 17:16:31 +01:00
ref-verify.h
reflink.c Btrfs: implement full reflink support for inline extents 2020-03-23 17:01:54 +01:00
reflink.h Btrfs: move all reflink implementation code into its own file 2020-03-23 17:01:54 +01:00
relocation.c btrfs: relocation: Check cancel request after each extent found 2020-03-23 17:01:55 +01:00
root-tree.c btrfs: switch to use new generic UUID API 2020-03-23 17:01:47 +01:00
scrub.c btrfs: scrub: Replace zero-length array with flexible-array member 2020-03-23 17:01:54 +01:00
send.c btrfs: rename btrfs_put_fs_root and btrfs_grab_fs_root 2020-03-23 17:01:33 +01:00
send.h
space-info.c btrfs: fix btrfs_calc_reclaim_metadata_size calculation 2020-03-23 17:01:52 +01:00
space-info.h btrfs: take overcommit into account in inc_block_group_ro 2020-01-31 14:02:01 +01:00
struct-funcs.c
super.c btrfs: adjust message level for unrecognized mount option 2020-03-23 17:01:45 +01:00
sysfs.c btrfs: sysfs, unify handler name of devinfo/missing 2020-03-23 17:01:36 +01:00
sysfs.h btrfs: sysfs, rename device_link add/remove functions 2020-03-23 17:01:35 +01:00
transaction.c btrfs: switch to use new generic UUID API 2020-03-23 17:01:47 +01:00
transaction.h btrfs: switch to per-transaction pinned extents 2020-03-23 17:01:38 +01:00
tree-checker.c btrfs: tree-checker: Verify location key for DIR_ITEM/DIR_INDEX 2020-01-20 16:40:56 +01:00
tree-checker.h
tree-defrag.c
tree-log.c btrfs: Make btrfs_pin_extent_for_log_replay take transaction handle 2020-03-23 17:01:37 +01:00
tree-log.h
ulist.c
ulist.h
uuid-tree.c btrfs: bail out of uuid tree scanning if we're closing 2020-03-23 17:01:41 +01:00
volumes.c btrfs: relocation: add error injection points for cancelling balance 2020-03-23 17:01:54 +01:00
volumes.h btrfs: introduce chunk allocation policy 2020-03-23 17:01:48 +01:00
xattr.c
xattr.h
zlib.c btrfs: use larger zlib buffer for s390 hardware compression 2020-01-31 10:30:40 -08:00
zstd.c btrfs: compression: inline free_workspace 2019-11-18 12:46:59 +01:00