diff options
author | Ashish Samant <ashish.samant@oracle.com> | 2016-03-11 17:54:05 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-03-14 09:59:54 -0400 |
commit | 2e3fcb1ccdbe7918006d509a531fcf8c9b10e9f8 (patch) | |
tree | 348f6d0de88e6d2c29b846c6c487fc81082badb6 /fs/btrfs | |
parent | 07c9a8e07771fce74620aa4f8132537196b8e43a (diff) |
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: Ashish Samant <ashish.samant@oracle.com>
[ preserve the WARN_ON ]
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/delayed-inode.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index a20d541bb190..6cef0062f929 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c | |||
@@ -650,9 +650,14 @@ static int btrfs_delayed_inode_reserve_metadata( | |||
650 | goto out; | 650 | goto out; |
651 | 651 | ||
652 | ret = btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes); | 652 | ret = btrfs_block_rsv_migrate(src_rsv, dst_rsv, num_bytes); |
653 | if (!WARN_ON(ret)) | 653 | if (!ret) |
654 | goto out; | 654 | goto out; |
655 | 655 | ||
656 | if (btrfs_test_opt(root, ENOSPC_DEBUG)) { | ||
657 | btrfs_debug(root->fs_info, | ||
658 | "block rsv migrate returned %d", ret); | ||
659 | WARN_ON(1); | ||
660 | } | ||
656 | /* | 661 | /* |
657 | * Ok this is a problem, let's just steal from the global rsv | 662 | * Ok this is a problem, let's just steal from the global rsv |
658 | * since this really shouldn't happen that often. | 663 | * since this really shouldn't happen that often. |