On 9.11.18 г. 16:08 ч., Nikolay Borisov wrote: > Here is the 2nd revision of the extent_io_ops optinal callbacks removal. What > prompted this version was that I identified a flaw in the initial version - while > it did check for the presence of an inode in extent_io_tree::private_data, i > forgot to explicitly check the ino to be different than the ino of the btree inode. > > While this doesn't lead to any corruption or risks at the moment it results in > additional operation being performed on the btree inode io_tree. > > This is now fixed by introducing a new function in the first patch and changing > everything that follows to utilize it in addition to the presence of ->private_data > > Testing with xfstests didn't uncover any regressions so this series should be > good to replace the on in misc-next. > > Nikolay Borisov (9): > btrfs: Add function to distinguish between data and btree inode > btrfs: Remove extent_io_ops::fill_delalloc > btrfs: Remove extent_io_ops::writepage_start_hook > btrfs: Remove extent_io_ops::writepage_end_io_hook > btrfs: Remove extent_io_ops::check_extent_io_range callback > btrfs: Remove extent_io_ops::set_bit_hook extent_io callback > btrfs: Remove extent_io_ops::clear_bit_hook callback > btrfs: Remove extent_io_ops::merge_extent_hook callback > btrfs: Remove extent_io_ops::split_extent_hook callback Actually patches 2/3/4 are not affected by the problem. Only the rest so David you might want to use only them + the 1 one that introduces the new function. > > fs/btrfs/btrfs_inode.h | 5 ++ > fs/btrfs/compression.c | 11 +-- > fs/btrfs/ctree.h | 14 +++ > fs/btrfs/extent_io.c | 141 +++++++++++++------------------ > fs/btrfs/extent_io.h | 24 ------ > fs/btrfs/inode.c | 91 +++++++------------- > fs/btrfs/tests/extent-io-tests.c | 2 +- > 7 files changed, 113 insertions(+), 175 deletions(-) >
