aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-06-26 03:27:47 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:38 -0400
commit0cdd02cabd86b5d547f882005e23a93929f0ace9 (patch)
treef6b54f8c58d96ca239d8a0923025eef69fdd91ff /drivers/md/bitmap.c
parenta647e4bc5ce697e25ff50d2e22de68a581b1ed38 (diff)
[PATCH] md/bitmap: remove dead code from md/bitmap
bitmap_active is never called, and the BITMAP_ACTIVE flag is never users or tested, so discard them both. Also remove some out-of-date 'todo' comments. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 609e68d3e1bc..dfe5e12741ba 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -14,9 +14,6 @@
14 * 14 *
15 * flush after percent set rather than just time based. (maybe both). 15 * flush after percent set rather than just time based. (maybe both).
16 * wait if count gets too high, wake when it drops to half. 16 * wait if count gets too high, wake when it drops to half.
17 * allow bitmap to be mirrored with superblock (before or after...)
18 * allow hot-add to re-instate a current device.
19 * allow hot-add of bitmap after quiessing device
20 */ 17 */
21 18
22#include <linux/module.h> 19#include <linux/module.h>
@@ -70,23 +67,6 @@ static inline char * bmname(struct bitmap *bitmap)
70 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; 67 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX";
71} 68}
72 69
73
74/*
75 * test if the bitmap is active
76 */
77int bitmap_active(struct bitmap *bitmap)
78{
79 unsigned long flags;
80 int res = 0;
81
82 if (!bitmap)
83 return res;
84 spin_lock_irqsave(&bitmap->lock, flags);
85 res = bitmap->flags & BITMAP_ACTIVE;
86 spin_unlock_irqrestore(&bitmap->lock, flags);
87 return res;
88}
89
90#define WRITE_POOL_SIZE 256 70#define WRITE_POOL_SIZE 256
91 71
92/* 72/*
@@ -1496,8 +1476,6 @@ int bitmap_create(mddev_t *mddev)
1496 if (!bitmap->bp) 1476 if (!bitmap->bp)
1497 goto error; 1477 goto error;
1498 1478
1499 bitmap->flags |= BITMAP_ACTIVE;
1500
1501 /* now that we have some pages available, initialize the in-memory 1479 /* now that we have some pages available, initialize the in-memory
1502 * bitmap from the on-disk bitmap */ 1480 * bitmap from the on-disk bitmap */
1503 start = 0; 1481 start = 0;