Skip to content

Commit 1afb648

Browse files
morbidrsakdave
authored andcommitted
btrfs: use standard debug config option to enable free-space-cache debug prints
free-space-cache.c has it's own set of DEBUG ifdefs which need to be turned on instead of the global CONFIG_BTRFS_DEBUG to print debug messages about failed block-group writes. Switch this over to CONFIG_BTRFS_DEBUG so we always see these messages when running a debug kernel. Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 7a195f6 commit 1afb648

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/btrfs/free-space-cache.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ static int __btrfs_wait_cache_io(struct btrfs_root *root,
11911191
invalidate_inode_pages2(inode->i_mapping);
11921192
BTRFS_I(inode)->generation = 0;
11931193
if (block_group) {
1194-
#ifdef DEBUG
1194+
#ifdef CONFIG_BTRFS_DEBUG
11951195
btrfs_err(root->fs_info,
11961196
"failed to write free space cache for block group %llu",
11971197
block_group->start);
@@ -1417,7 +1417,7 @@ int btrfs_write_out_cache(struct btrfs_trans_handle *trans,
14171417
ret = __btrfs_write_out_cache(fs_info->tree_root, inode, ctl,
14181418
block_group, &block_group->io_ctl, trans);
14191419
if (ret) {
1420-
#ifdef DEBUG
1420+
#ifdef CONFIG_BTRFS_DEBUG
14211421
btrfs_err(fs_info,
14221422
"failed to write free space cache for block group %llu",
14231423
block_group->start);
@@ -4037,7 +4037,7 @@ int btrfs_write_out_ino_cache(struct btrfs_root *root,
40374037
if (release_metadata)
40384038
btrfs_delalloc_release_metadata(BTRFS_I(inode),
40394039
inode->i_size, true);
4040-
#ifdef DEBUG
4040+
#ifdef CONFIG_BTRFS_DEBUG
40414041
btrfs_err(fs_info,
40424042
"failed to write free ino cache for root %llu",
40434043
root->root_key.objectid);

0 commit comments

Comments
 (0)