* Re: Btrfs: don't WARN() in btrfs_transaction_abort() for IO errors
@ 2016-12-19 20:09 Jeff Mahoney
2016-12-19 20:17 ` Jeff Mahoney
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Mahoney @ 2016-12-19 20:09 UTC (permalink / raw)
To: Chris Mason, David Sterba, linux-btrfs
[-- Attachment #1.1: Type: text/plain, Size: 2057 bytes --]
commit e5d6b12fe14e89ea1c494585c47b1dfb31d71183
Author: Chris Mason <clm@fb.com>
Date: Fri Dec 9 05:56:33 2016 -0800
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>
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index fc1864a..50bcfb8 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -3445,9 +3445,14 @@ do { \
/* Report first abort since mount */ \
if (!test_and_set_bit(BTRFS_FS_STATE_TRANS_ABORTED, \
&((trans)->fs_info->fs_state))) { \
- WARN(1, KERN_DEBUG \
- "BTRFS: Transaction aborted (error %d)\n", \
- (errno)); \
+ if ((errno) != -EIO) { \
+ WARN(1, KERN_DEBUG \
+ "BTRFS: Transaction aborted (error %d)\n", \
+ (errno)); \
+ } else { \
+ pr_debug("BTRFS: Transaction aborted (error %d)\n", \
+ (errno)); \
+ } \
} \
__btrfs_abort_transaction((trans), __func__, \
__LINE__, (errno)); \
Can we use btrfs_debug here instead? There are a few naked pr_* calls left
but most of them are either continuing prior lines or don't have an fsinfo available.
Thanks,
-Jeff
--
Jeff Mahoney
SUSE Labs
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 841 bytes --]
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Btrfs: don't WARN() in btrfs_transaction_abort() for IO errors
2016-12-19 20:09 Btrfs: don't WARN() in btrfs_transaction_abort() for IO errors Jeff Mahoney
@ 2016-12-19 20:17 ` Jeff Mahoney
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Mahoney @ 2016-12-19 20:17 UTC (permalink / raw)
To: Chris Mason, David Sterba, linux-btrfs
[-- Attachment #1.1: Type: text/plain, Size: 2249 bytes --]
On 12/19/16 3:09 PM, Jeff Mahoney wrote:
> commit e5d6b12fe14e89ea1c494585c47b1dfb31d71183
> Author: Chris Mason <clm@fb.com>
> Date: Fri Dec 9 05:56:33 2016 -0800
>
> 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>
>
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index fc1864a..50bcfb8 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -3445,9 +3445,14 @@ do { \
> /* Report first abort since mount */ \
> if (!test_and_set_bit(BTRFS_FS_STATE_TRANS_ABORTED, \
> &((trans)->fs_info->fs_state))) { \
> - WARN(1, KERN_DEBUG \
> - "BTRFS: Transaction aborted (error %d)\n", \
> - (errno)); \
> + if ((errno) != -EIO) { \
> + WARN(1, KERN_DEBUG \
> + "BTRFS: Transaction aborted (error %d)\n", \
> + (errno)); \
> + } else { \
> + pr_debug("BTRFS: Transaction aborted (error %d)\n", \
> + (errno)); \
> + } \
> } \
> __btrfs_abort_transaction((trans), __func__, \
> __LINE__, (errno)); \
>
>
> Can we use btrfs_debug here instead? There are a few naked pr_* calls left
> but most of them are either continuing prior lines or don't have an fsinfo available.
Actually, this landed in upstream already so I'll post a proper patch
instead.
-Jeff
--
Jeff Mahoney
SUSE Labs
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 841 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-19 20:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-19 20:09 Btrfs: don't WARN() in btrfs_transaction_abort() for IO errors Jeff Mahoney
2016-12-19 20:17 ` Jeff Mahoney
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.