aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2016-12-09 08:56:33 -0500
committerChris Mason <clm@fb.com>2016-12-09 09:00:28 -0500
commite5d6b12fe14e89ea1c494585c47b1dfb31d71183 (patch)
treefe1b35f4766e8e49a5d0a910281faa208cdc3513
parent34441361c4f52a5f6e41d8de8e5debbeb415dbf0 (diff)
Btrfs: don't WARN() in btrfs_transaction_abort() for IO errors
btrfs_transaction_abort() has a WARN() to help us nail down whatever problem lead to the abort. But most of the time, we're aborting for EIO, and the warning just adds noise. Signed-off-by: Chris Mason <clm@fb.com>
-rw-r--r--fs/btrfs/ctree.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index fc1864acb368..50bcfb80d33a 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -3445,9 +3445,14 @@ do { \
3445 /* Report first abort since mount */ \ 3445 /* Report first abort since mount */ \
3446 if (!test_and_set_bit(BTRFS_FS_STATE_TRANS_ABORTED, \ 3446 if (!test_and_set_bit(BTRFS_FS_STATE_TRANS_ABORTED, \
3447 &((trans)->fs_info->fs_state))) { \ 3447 &((trans)->fs_info->fs_state))) { \
3448 WARN(1, KERN_DEBUG \ 3448 if ((errno) != -EIO) { \
3449 "BTRFS: Transaction aborted (error %d)\n", \ 3449 WARN(1, KERN_DEBUG \
3450 (errno)); \ 3450 "BTRFS: Transaction aborted (error %d)\n", \
3451 (errno)); \
3452 } else { \
3453 pr_debug("BTRFS: Transaction aborted (error %d)\n", \
3454 (errno)); \
3455 } \
3451 } \ 3456 } \
3452 __btrfs_abort_transaction((trans), __func__, \ 3457 __btrfs_abort_transaction((trans), __func__, \
3453 __LINE__, (errno)); \ 3458 __LINE__, (errno)); \