aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/Kconfig9
-rw-r--r--fs/ocfs2/localalloc.c5
2 files changed, 12 insertions, 2 deletions
diff --git a/fs/Kconfig b/fs/Kconfig
index 429a00228507..635f3e286ad8 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -459,6 +459,15 @@ config OCFS2_DEBUG_MASKLOG
459 This option will enlarge your kernel, but it allows debugging of 459 This option will enlarge your kernel, but it allows debugging of
460 ocfs2 filesystem issues. 460 ocfs2 filesystem issues.
461 461
462config OCFS2_DEBUG_FS
463 bool "OCFS2 expensive checks"
464 depends on OCFS2_FS
465 default n
466 help
467 This option will enable expensive consistency checks. Enable
468 this option for debugging only as it is likely to decrease
469 performance of the filesystem.
470
462config MINIX_FS 471config MINIX_FS
463 tristate "Minix fs support" 472 tristate "Minix fs support"
464 help 473 help
diff --git a/fs/ocfs2/localalloc.c b/fs/ocfs2/localalloc.c
index d272847d5a07..58ea88b5af36 100644
--- a/fs/ocfs2/localalloc.c
+++ b/fs/ocfs2/localalloc.c
@@ -484,6 +484,7 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
484 484
485 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data; 485 alloc = (struct ocfs2_dinode *) osb->local_alloc_bh->b_data;
486 486
487#ifdef OCFS2_DEBUG_FS
487 if (le32_to_cpu(alloc->id1.bitmap1.i_used) != 488 if (le32_to_cpu(alloc->id1.bitmap1.i_used) !=
488 ocfs2_local_alloc_count_bits(alloc)) { 489 ocfs2_local_alloc_count_bits(alloc)) {
489 ocfs2_error(osb->sb, "local alloc inode %llu says it has " 490 ocfs2_error(osb->sb, "local alloc inode %llu says it has "
@@ -494,6 +495,7 @@ int ocfs2_reserve_local_alloc_bits(struct ocfs2_super *osb,
494 status = -EIO; 495 status = -EIO;
495 goto bail; 496 goto bail;
496 } 497 }
498#endif
497 499
498 free_bits = le32_to_cpu(alloc->id1.bitmap1.i_total) - 500 free_bits = le32_to_cpu(alloc->id1.bitmap1.i_total) -
499 le32_to_cpu(alloc->id1.bitmap1.i_used); 501 le32_to_cpu(alloc->id1.bitmap1.i_used);
@@ -712,9 +714,8 @@ static int ocfs2_sync_local_to_main(struct ocfs2_super *osb,
712 void *bitmap; 714 void *bitmap;
713 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc); 715 struct ocfs2_local_alloc *la = OCFS2_LOCAL_ALLOC(alloc);
714 716
715 mlog_entry("total = %u, COUNT = %u, used = %u\n", 717 mlog_entry("total = %u, used = %u\n",
716 le32_to_cpu(alloc->id1.bitmap1.i_total), 718 le32_to_cpu(alloc->id1.bitmap1.i_total),
717 ocfs2_local_alloc_count_bits(alloc),
718 le32_to_cpu(alloc->id1.bitmap1.i_used)); 719 le32_to_cpu(alloc->id1.bitmap1.i_used));
719 720
720 if (!alloc->id1.bitmap1.i_total) { 721 if (!alloc->id1.bitmap1.i_total) {