summaryrefslogtreecommitdiff
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2020-07-28 14:25:41 +0300
committerDavid Sterba <dsterba@suse.com>2020-08-19 19:26:14 +0300
commitc965d6402f24adcd3d4d0dd9b1f30a0578b6255c (patch)
tree932fddb17e97f219fed1569916f5246d839c1f2b /fs/btrfs/super.c
parentc57dd1f2f6a7cd1bb61802344f59ccdc5278c983 (diff)
downloadlinux-c965d6402f24adcd3d4d0dd9b1f30a0578b6255c.tar.xz
btrfs: handle errors from async submission
Btrfs' async submit mechanism is able to handle errors in the submission path and the meta-data async submit function correctly passes the error code to the caller. In btrfs_submit_bio_start() and btrfs_submit_bio_start_direct_io() we're not handling the errors returned by btrfs_csum_one_bio() correctly though and simply call BUG_ON(). This is unnecessary as the caller of these two functions - run_one_async_start - correctly checks for the return values and sets the status of the async_submit_bio. The actual bio submission will be handled later on by run_one_async_done only if async_submit_bio::status is 0, so the data won't be written if we encountered an error in the checksum process. Simply return the error from btrfs_csum_one_bio() to the async submitters, like it's done in btree_submit_bio_start(). Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/super.c')
0 files changed, 0 insertions, 0 deletions