On Mon, Nov 02, 2015 at 01:55:10PM -0800, Ashish Samant wrote:
> Dont call WARN_ON for ENOSPC error unless ENOSPC_DEBUG is enabled.
> 
> Signed-off-by : Ashish Samant <[email protected]>
> ---
>  fs/btrfs/delayed-inode.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c
> index a2ae427..b86cfd9 100644
> --- a/fs/btrfs/delayed-inode.c
> +++ b/fs/btrfs/delayed-inode.c
> @@ -652,9 +652,13 @@ 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))
> +                     WARN(1, KERN_DEBUG
> +                          "btrfs: block rsv migrate returned %d\n", ret);

Please use btrfs_debug

> +
>               /*
>                * Ok this is a problem, let's just steal from the global rsv
>                * since this really shouldn't happen that often.
> -- 
> 1.8.3.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to [email protected]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to