linux-stable/fs/btrfs
Nikolay Borisov bbbf7243d6 btrfs: combine device update operations during transaction commit
We currently overload the pending_chunks list to handle updating
btrfs_device->commit_bytes used.  We don't actually care about the
extent mapping or even the device mapping for the chunk - we just need
the device, and we can end up processing it multiple times.  The
fs_devices->resized_list does more or less the same thing, but with the
disk size.  They are called consecutively during commit and have more or
less the same purpose.

We can combine the two lists into a single list that attaches to the
transaction and contains a list of devices that need updating.  Since we
always add the device to a list when we change bytes_used or
disk_total_size, there's no harm in copying both values at once.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-04-29 19:02:36 +02:00
..
tests btrfs: inode: Verify inode mode to avoid NULL pointer dereference 2019-04-29 19:02:32 +02:00
acl.c Btrfs: setup a nofs context for memory allocation at __btrfs_set_acl 2019-02-25 14:13:17 +01:00
async-thread.c btrfs: simplify workqueue name when allocating 2019-02-25 14:13:24 +01:00
async-thread.h
backref.c btrfs: use BUG() instead of BUG_ON(1) 2019-04-29 19:02:28 +02:00
backref.h
btrfs_inode.h btrfs: use common file type conversion 2019-04-29 19:02:29 +02:00
check-integrity.c btrfs: Fix typos in comments and strings 2018-12-17 14:51:50 +01:00
check-integrity.h
compression.c btrfs: Use less confusing condition for uptodate parameter to btrfs_writepage_endio_finish_ordered 2019-04-29 19:02:24 +02:00
compression.h btrfs: change set_level() to bound the level passed in 2019-02-25 14:13:32 +01:00
ctree.c btrfs: get fs_info from eb in btrfs_verify_level_key 2019-04-29 19:02:31 +02:00
ctree.h btrfs: tree-checker: Verify inode item 2019-04-29 19:02:32 +02:00
dedupe.h
delayed-inode.c btrfs: get fs_info from eb in btrfs_leaf_free_space 2019-04-29 19:02:30 +02:00
delayed-inode.h Btrfs: delayed-inode: use rb_first_cached for ins_root and del_root 2018-10-15 17:23:33 +02:00
delayed-ref.c btrfs: qgroup: Move reserved data accounting from btrfs_delayed_ref_head to btrfs_qgroup_extent_record 2019-02-25 14:13:39 +01:00
delayed-ref.h btrfs: qgroup: Move reserved data accounting from btrfs_delayed_ref_head to btrfs_qgroup_extent_record 2019-02-25 14:13:39 +01:00
dev-replace.c btrfs: combine device update operations during transaction commit 2019-04-29 19:02:36 +02:00
dev-replace.h btrfs: dev-replace: open code trivial locking helpers 2018-12-17 14:51:45 +01:00
dir-item.c btrfs: Remove root parameter from btrfs_insert_dir_item 2018-10-15 17:23:25 +02:00
disk-io.c btrfs: combine device update operations during transaction commit 2019-04-29 19:02:36 +02:00
disk-io.h btrfs: get fs_info from eb in btrfs_verify_level_key 2019-04-29 19:02:31 +02:00
export.c btrfs: Remove 'objectid' member from struct btrfs_root 2018-10-15 17:23:25 +02:00
export.h
extent-tree.c btrfs: Honour FITRIM range constraints during free space trim 2019-04-29 19:02:35 +02:00
extent_io.c btrfs: get fs_info from eb in leaf_data_end 2019-04-29 19:02:30 +02:00
extent_io.h btrfs: get fs_info from eb in repair_eb_io_failure 2019-04-29 19:02:29 +02:00
extent_map.c btrfs: Remove impossible condition from mergable_maps 2019-02-25 14:13:21 +01:00
extent_map.h btrfs: Remove impossible condition from mergable_maps 2019-02-25 14:13:21 +01:00
file-item.c btrfs: get fs_info from eb in btrfs_leaf_free_space 2019-04-29 19:02:30 +02:00
file.c btrfs: get fs_info from eb in btrfs_leaf_free_space 2019-04-29 19:02:30 +02:00
free-space-cache.c Btrfs: fix deadlock on tree root leaf when finding free extent 2018-11-06 16:42:32 +01:00
free-space-cache.h
free-space-tree.c btrfs: get fs_info from eb in clean_tree_block 2019-04-29 19:02:30 +02:00
free-space-tree.h btrfs: Remove fs_info argument from add_to_free_space_tree 2018-05-28 18:07:36 +02:00
inode-item.c
inode-map.c btrfs: prune unused includes 2018-08-06 13:12:43 +02:00
inode-map.h
inode.c btrfs: inode: Verify inode mode to avoid NULL pointer dereference 2019-04-29 19:02:32 +02:00
ioctl.c btrfs: Perform locking/unlocking in btrfs_remap_file_range() 2019-04-29 19:02:29 +02:00
Kconfig
locking.c btrfs: switch extent_buffer::lock_nested to bool 2019-04-29 19:02:21 +02:00
locking.h btrfs: merge btrfs_set_lock_blocking_rw with it's caller 2019-02-25 14:13:28 +01:00
lzo.c btrfs: change set_level() to bound the level passed in 2019-02-25 14:13:32 +01:00
Makefile
math.h
ordered-data.c btrfs: Switch memory allocations in async csum calculation path to kvmalloc 2019-04-25 14:17:38 +02:00
ordered-data.h btrfs: switch BTRFS_ORDERED_* to enums 2018-12-17 14:51:43 +01:00
orphan.c
print-tree.c btrfs: get fs_info from eb in btrfs_leaf_free_space 2019-04-29 19:02:30 +02:00
print-tree.h btrfs: print-tree: debugging output enhancement 2018-04-20 19:18:16 +02:00
props.c btrfs: prop: open code btrfs_set_prop in inherit_prop 2019-04-29 19:02:35 +02:00
props.h btrfs: refactor btrfs_set_prop and add btrfs_set_prop_trans 2019-04-29 19:02:19 +02:00
qgroup.c btrfs: get fs_info from eb in clean_tree_block 2019-04-29 19:02:30 +02:00
qgroup.h btrfs: qgroup: Move reserved data accounting from btrfs_delayed_ref_head to btrfs_qgroup_extent_record 2019-02-25 14:13:39 +01:00
raid56.c for-5.1-rc2-tag 2019-03-26 10:32:13 -07:00
raid56.h
rcu-string.h
reada.c btrfs: dev-replace: open code trivial locking helpers 2018-12-17 14:51:45 +01:00
ref-verify.c btrfs: replace btrfs_set_lock_blocking_rw with appropriate helpers 2019-02-25 14:13:27 +01:00
ref-verify.h
relocation.c btrfs: fix panic during relocation after ENOSPC before writeback happens 2019-04-29 19:02:24 +02:00
root-tree.c btrfs: Don't panic when we can't find a root key 2019-04-29 19:02:17 +02:00
scrub.c btrfs: scrub: return EAGAIN when fs is closing 2019-04-29 19:02:17 +02:00
send.c Btrfs: send, improve clone range 2019-04-29 19:02:35 +02:00
send.h
struct-funcs.c btrfs: prune unused includes 2018-08-06 13:12:43 +02:00
super.c btrfs: drop unused parameter in mount_subvol 2019-04-29 19:02:35 +02:00
sysfs.c btrfs: Add sysfs support for metadata_uuid feature 2018-12-17 14:51:37 +01:00
sysfs.h btrfs: drop extra enum initialization where using defaults 2018-12-17 14:51:43 +01:00
transaction.c btrfs: combine device update operations during transaction commit 2019-04-29 19:02:36 +02:00
transaction.h btrfs: combine device update operations during transaction commit 2019-04-29 19:02:36 +02:00
tree-checker.c btrfs: tree-checker: get fs_info from eb in check_inode_item 2019-04-29 19:02:35 +02:00
tree-checker.h btrfs: Move btrfs_check_chunk_valid() to tree-check.[ch] and export it 2019-04-29 19:02:31 +02:00
tree-defrag.c btrfs: open code now trivial btrfs_set_lock_blocking 2019-02-25 14:13:27 +01:00
tree-log.c btrfs: get fs_info from eb in clean_tree_block 2019-04-29 19:02:30 +02:00
tree-log.h Btrfs: remove no longer used io_err from btrfs_log_ctx 2018-12-17 14:51:31 +01:00
ulist.c
ulist.h
uuid-tree.c btrfs: Turn an 'else if' into an 'else' in btrfs_uuid_tree_add 2019-04-29 19:02:19 +02:00
volumes.c btrfs: combine device update operations during transaction commit 2019-04-29 19:02:36 +02:00
volumes.h btrfs: combine device update operations during transaction commit 2019-04-29 19:02:36 +02:00
xattr.c btrfs: get fs_info from eb in btrfs_leaf_free_space 2019-04-29 19:02:30 +02:00
xattr.h
zlib.c btrfs: change set_level() to bound the level passed in 2019-02-25 14:13:32 +01:00
zstd.c btrfs: zstd: remove indirect calls for local functions 2019-04-29 19:02:18 +02:00