summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/sctop.py
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2021-01-14 22:02:46 +0300
committerDavid Sterba <dsterba@suse.com>2021-02-09 00:58:56 +0300
commit867ed321f90d06aaba84e2c91de51cd3038825ef (patch)
tree9bb5d3a9dbac4961a6d09e2dc8458cae3c4ab1c1 /tools/perf/scripts/python/sctop.py
parenteddda68d97732ce05ca145f8e85e8a447f65cdad (diff)
downloadlinux-867ed321f90d06aaba84e2c91de51cd3038825ef.tar.xz
btrfs: abort the transaction if we fail to inc ref in btrfs_copy_root
While testing my error handling patches, I added a error injection site at btrfs_inc_extent_ref, to validate the error handling I added was doing the correct thing. However I hit a pretty ugly corruption while doing this check, with the following error injection stack trace: btrfs_inc_extent_ref btrfs_copy_root create_reloc_root btrfs_init_reloc_root btrfs_record_root_in_trans btrfs_start_transaction btrfs_update_inode btrfs_update_time touch_atime file_accessed btrfs_file_mmap This is because we do not catch the error from btrfs_inc_extent_ref, which in practice would be ENOMEM, which means we lose the extent references for a root that has already been allocated and inserted, which is the problem. Fix this by aborting the transaction if we fail to do the reference modification. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions