[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1340794759-15286-2-git-send-email-tony@bakeyournoodle.com>
Date: Wed, 27 Jun 2012 20:59:19 +1000
From: Tony Breeds <tony@...eyournoodle.com>
To: linux-ext4 <linux-ext4@...r.kernel.org>, Ted Ts'o <tytso@....edu>,
Andreas Dilger <adilger@...ger.ca>
Subject: [PATCH 2/2] blkmap64_ba: Only define ba_print_stats() when needed.
If ENABLE_BMAP_STATS isn't defined make a_print_stats() do nothing.
Signed-off-by: Tony Breeds <tony@...eyournoodle.com>
---
I copied the coding style from blkmap64_rb.c
lib/ext2fs/blkmap64_ba.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/ext2fs/blkmap64_ba.c b/lib/ext2fs/blkmap64_ba.c
index 8eddde9..73180b0 100644
--- a/lib/ext2fs/blkmap64_ba.c
+++ b/lib/ext2fs/blkmap64_ba.c
@@ -310,12 +310,16 @@ static void ba_clear_bmap(ext2fs_generic_bitmap bitmap)
(size_t) (((bitmap->real_end - bitmap->start) / 8) + 1));
}
+#ifdef ENABLE_BMAP_STATS
static void ba_print_stats(ext2fs_generic_bitmap bitmap)
{
fprintf(stderr, "%16llu Bytes used by bitarray\n",
((bitmap->real_end - bitmap->start) >> 3) + 1 +
sizeof(struct ext2fs_ba_private_struct));
}
+#else
+static void ba_print_stats(ext2fs_generic_bitmap bitmap) {}
+#endif
/* Find the first zero bit between start and end, inclusive. */
static errcode_t ba_find_first_zero(ext2fs_generic_bitmap bitmap,
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists