summaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-03-19 12:46:41 +1100
committerNeilBrown <neilb@suse.de>2012-03-19 12:46:41 +1100
commit61a0d80ce4ab5b4fb9ecb38f1fb19654778b71ed (patch)
tree21631162d46575db6645636d1c18b8797247d0c9 /drivers/md/bitmap.h
parent792a1d4bbf960000f066358f0a8c6e769c8c72bc (diff)
downloadop-kernel-dev-61a0d80ce4ab5b4fb9ecb38f1fb19654778b71ed.zip
op-kernel-dev-61a0d80ce4ab5b4fb9ecb38f1fb19654778b71ed.tar.gz
md/bitmap: discard CHUNK_BLOCK_SHIFT macro
Be redefining ->chunkshift as the shift from sectors to chunks rather than bytes to chunks, we can just use "bitmap->chunkshift" which is shorter than the macro call, and less indirect. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/bitmap.h')
-rw-r--r--drivers/md/bitmap.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bitmap.h b/drivers/md/bitmap.h
index e196e6a5..55ca5ae 100644
--- a/drivers/md/bitmap.h
+++ b/drivers/md/bitmap.h
@@ -103,7 +103,6 @@ typedef __u16 bitmap_counter_t;
/* how many blocks per chunk? (this is variable) */
#define CHUNK_BLOCK_RATIO(bitmap) ((bitmap)->mddev->bitmap_info.chunksize >> BITMAP_BLOCK_SHIFT)
-#define CHUNK_BLOCK_SHIFT(bitmap) ((bitmap)->chunkshift - BITMAP_BLOCK_SHIFT)
#endif
@@ -178,7 +177,7 @@ struct bitmap {
struct mddev *mddev; /* the md device that the bitmap is for */
/* bitmap chunksize -- how much data does each bit represent? */
- unsigned long chunkshift; /* chunksize = 2^chunkshift (for bitops) */
+ unsigned long chunkshift; /* chunksize = 2^(chunkshift+9) (for bitops) */
unsigned long chunks; /* total number of data chunks for the array */
__u64 events_cleared;
OpenPOWER on IntegriCloud