* [PATCH] btrfs: Print Warning only if ENOSPC_DEBUG is enabled
@ 2015-10-27 2:38 Ashish Samant
0 siblings, 0 replies; only message in thread
From: Ashish Samant @ 2015-10-27 2:38 UTC (permalink / raw)
To: linux-btrfs; +Cc: ashish.samant
Signed-off-by : Ashish Samant <ashish.samant@oracle.com>
---
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);
+
/*
* 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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-27 2:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-27 2:38 [PATCH] btrfs: Print Warning only if ENOSPC_DEBUG is enabled Ashish Samant
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).