* [PATCH V3] btrfs: Print Warning only if ENOSPC_DEBUG is enabled
@ 2016-03-11 22:54 Ashish Samant
2016-03-14 13:52 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Ashish Samant @ 2016-03-11 22:54 UTC (permalink / raw)
To: linux-btrfs; +Cc: dsterba
Dont print warning for ENOSPC error unless ENOSPC_DEBUG is enabled. Use
btrfs_debug if it is enabled.
Signed-off-by: Ashish Samant <ashish.samant@oracle.com>
V3:
- Use btrfs_debug() instead of WARN() per David Sterba's comment.
V2:
- Add a commit message.
---
fs/btrfs/delayed-inode.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
index b57daa8..b7e44cc 100644
--- a/fs/btrfs/delayed-inode.c
+++ b/fs/btrfs/delayed-inode.c
@@ -651,9 +651,12 @@ static int btrfs_delayed_inode_reserve_metadata(
goto out;
ret = btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes);
- if (!WARN_ON(ret))
+ if (!ret)
goto out;
+ if (btrfs_test_opt(root, ENOSPC_DEBUG))
+ btrfs_debug(root->fs_info,
+ "block rsv migrate returned %d\n", ret);
/*
* Ok this is a problem, let's just steal from the global rsv
* since this really shouldn't happen that often.
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V3] btrfs: Print Warning only if ENOSPC_DEBUG is enabled
2016-03-11 22:54 [PATCH V3] btrfs: Print Warning only if ENOSPC_DEBUG is enabled Ashish Samant
@ 2016-03-14 13:52 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2016-03-14 13:52 UTC (permalink / raw)
To: Ashish Samant; +Cc: linux-btrfs, dsterba
On Fri, Mar 11, 2016 at 02:54:05PM -0800, Ashish Samant wrote:
> Dont print warning for ENOSPC error unless ENOSPC_DEBUG is enabled. Use
> btrfs_debug if it is enabled.
>
> Signed-off-by: Ashish Samant <ashish.samant@oracle.com>
>
> V3:
> - Use btrfs_debug() instead of WARN() per David Sterba's comment.
> V2:
> - Add a commit message.
> ---
> fs/btrfs/delayed-inode.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
> index b57daa8..b7e44cc 100644
> --- a/fs/btrfs/delayed-inode.c
> +++ b/fs/btrfs/delayed-inode.c
> @@ -651,9 +651,12 @@ static int btrfs_delayed_inode_reserve_metadata(
> goto out;
>
> ret = btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes);
> - if (!WARN_ON(ret))
> + if (!ret)
> goto out;
>
> + if (btrfs_test_opt(root, ENOSPC_DEBUG))
> + btrfs_debug(root->fs_info,
> + "block rsv migrate returned %d\n", ret);
the message helpers do not need \n, I'll fix it here.
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-14 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-11 22:54 [PATCH V3] btrfs: Print Warning only if ENOSPC_DEBUG is enabled Ashish Samant
2016-03-14 13:52 ` David Sterba
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).