[PATCH 15/20] Btrfs: activate allocation debugging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Activate various messages that help track down clustered allocation
problems, that are disabled and optimized out by default.

Signed-off-by: Alexandre Oliva <oliva@xxxxxxxxxxxxxxxxx>
---
 fs/btrfs/extent-tree.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 823ab22..66edda2 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -5216,7 +5216,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
 		allowed_chunk_alloc = 1;
 
 	if (data & BTRFS_BLOCK_GROUP_METADATA && use_cluster) {
-		/* debug = 1; */
+		debug = 1;
 		debugid = atomic_inc_return(&debugcnt);
 		last_ptr = &root->fs_info->meta_alloc_cluster;
 		if (!btrfs_test_opt(root, SSD))
@@ -5393,7 +5393,7 @@ alloc:
 				goto checks;
 			}
 
-			/* debug = 2; */
+			debug = 2;
 			if (debug > 1)
 				printk(KERN_DEBUG "btrfs %x.%i: failed cluster alloc\n",
 				       debugid, loop);
@@ -5446,7 +5446,7 @@ refill_cluster:
 			 * this cluster didn't work out, free it and
 			 * start over
 			 */
-			/* debug = 2; */
+			debug = 2;
 			if ((debug > 1 || (debug && last_ptr->block_group)) && last_ptr->window_start)
 				btrfs_dump_cluster(KERN_DEBUG, debugid, loop, 0, "drop", last_ptr);
 			btrfs_return_cluster_to_free_space(NULL, last_ptr);
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux