Skip to contentSkip to conversation

btrfs: Print Warning only if ENOSPC_DEBUG is enabled

PATCH Superseded Ashish Samant 1 participant 1 message Oct 27, 2015 Btrfs file system

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: Print Warning only if ENOSPC_DEBUG is enabled

---
 fs/btrfs/delayed-inode.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
fs/btrfs/delayed-inode.c +5 -1
index a2ae427..b86cfd9 100644
@@ -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.
Signature · 1 line
1.8.3.2