]> Git Repo - linux.git/commit
btrfs: handle failure of add_pending_csums
authorNikolay Borisov <[email protected]>
Mon, 8 Jan 2018 08:59:43 +0000 (10:59 +0200)
committerDavid Sterba <[email protected]>
Thu, 1 Mar 2018 15:16:00 +0000 (16:16 +0100)
commitac01f26a27f10aace4bb89fd2c2c05a60c251832
treeec27915237f6e7ad42d31193b175d9bff0d5a036
parenta8fd1f71749387c9a1053a83ff1c16287499a4e7
btrfs: handle failure of add_pending_csums

add_pending_csums was added as part of the new data=ordered
implementation in e6dcd2dc9c48 ("Btrfs: New data=ordered
implementation"). Even back then it called the btrfs_csum_file_blocks
which can fail but it never bothered handling the failure. In ENOMEM
situation this could lead to the filesystem failing to write the
checksums for a particular extent and not detect this. On read this
could lead to the filesystem erroring out due to crc mismatch. Fix it by
propagating failure from add_pending_csums and handling them.

Signed-off-by: Nikolay Borisov <[email protected]>
Reviewed-by: Josef Bacik <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
fs/btrfs/inode.c
This page took 0.051447 seconds and 4 git commands to generate.