Skip to content

Commit e5d6b12

Browse files
committed
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 <[email protected]>
1 parent 3444136 commit e5d6b12

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

fs/btrfs/ctree.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3445,9 +3445,14 @@ do { \
34453445
/* Report first abort since mount */ \
34463446
if (!test_and_set_bit(BTRFS_FS_STATE_TRANS_ABORTED, \
34473447
&((trans)->fs_info->fs_state))) { \
3448-
WARN(1, KERN_DEBUG \
3449-
"BTRFS: Transaction aborted (error %d)\n", \
3450-
(errno)); \
3448+
if ((errno) != -EIO) { \
3449+
WARN(1, KERN_DEBUG \
3450+
"BTRFS: Transaction aborted (error %d)\n", \
3451+
(errno)); \
3452+
} else { \
3453+
pr_debug("BTRFS: Transaction aborted (error %d)\n", \
3454+
(errno)); \
3455+
} \
34513456
} \
34523457
__btrfs_abort_transaction((trans), __func__, \
34533458
__LINE__, (errno)); \

0 commit comments

Comments
 (0)