Commit 2e3fcb1c authored by Ashish Samant's avatar Ashish Samant Committed by David Sterba

btrfs: Print Warning only if ENOSPC_DEBUG is enabled

Dont print warning for ENOSPC error unless ENOSPC_DEBUG is enabled. Use
btrfs_debug if it is enabled.
Signed-off-by: default avatarAshish Samant <ashish.samant@oracle.com>
[ preserve the WARN_ON ]
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 07c9a8e0
......@@ -650,9 +650,14 @@ 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", ret);
WARN_ON(1);
}
/*
* Ok this is a problem, let's just steal from the global rsv
* since this really shouldn't happen that often.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment