kernel_optimize_test/fs/btrfs/tests
Nikolay Borisov e06a1fc99c btrfs: Remove extent_io_ops::set_bit_hook extent_io callback
This callback is used to properly account delalloc extents for data
inodes (ordinary file inodes and freespace v1 inodes). Those can be
easily identified since they have their extent_io trees ->private_data
member point to the inode. Let's exploit this fact to remove the
needless indirection through extent_io_hooks and directly call the
function. Also give the function a name which reflects its purpose -
btrfs_set_delalloc_extent.

This patch also modified test_find_delalloc so that the extent_io_tree
used for testing doesn't have its ->private_data set which would have
caused a crash in btrfs_set_delalloc_extent due to the btrfs_inode->root
member not being initialised. The old version of the code also didn't
call set_bit_hook since the extent_io ops weren't set for the inode.  No
functional changes.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-12-17 14:51:28 +01:00
..
btrfs-tests.c btrfs: Make btrfs_init_dummy_trans initialize trans' fs_info field 2018-05-28 18:07:32 +02:00
btrfs-tests.h btrfs: tests: drop newline from test_msg strings 2018-05-29 18:12:52 +02:00
extent-buffer-tests.c btrfs: tests: drop newline from test_msg strings 2018-05-29 18:12:52 +02:00
extent-io-tests.c btrfs: Remove extent_io_ops::set_bit_hook extent_io callback 2018-12-17 14:51:28 +01:00
extent-map-tests.c Btrfs: extent_map: use rb_first_cached 2018-10-15 17:23:33 +02:00
free-space-tests.c btrfs: tests: drop newline from test_msg strings 2018-05-29 18:12:52 +02:00
free-space-tree-tests.c btrfs: tests: drop newline from test_msg strings 2018-05-29 18:12:52 +02:00
inode-tests.c btrfs: tests: drop newline from test_msg strings 2018-05-29 18:12:52 +02:00
qgroup-tests.c btrfs: qgroup: Drop fs_info parameter from btrfs_qgroup_account_extent 2018-08-06 13:12:52 +02:00