Merge tag 'md-3.4-fixes' of git://neil.brown.name/md
Pull one small fix for md/bitmaps from NeilBrown: "This fixes a regression that was introduced in the merge window." * tag 'md-3.4-fixes' of git://neil.brown.name/md: md/bitmap: fix calculation of 'chunks' - missing shift.
This commit is contained in:
@@ -1727,8 +1727,7 @@ int bitmap_create(struct mddev *mddev)
|
|||||||
bitmap->chunkshift = (ffz(~mddev->bitmap_info.chunksize)
|
bitmap->chunkshift = (ffz(~mddev->bitmap_info.chunksize)
|
||||||
- BITMAP_BLOCK_SHIFT);
|
- BITMAP_BLOCK_SHIFT);
|
||||||
|
|
||||||
/* now that chunksize and chunkshift are set, we can use these macros */
|
chunks = (blocks + (1 << bitmap->chunkshift) - 1) >>
|
||||||
chunks = (blocks + bitmap->chunkshift - 1) >>
|
|
||||||
bitmap->chunkshift;
|
bitmap->chunkshift;
|
||||||
pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO;
|
pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO;
|
||||||
|
|
||||||
|
@@ -101,9 +101,6 @@ typedef __u16 bitmap_counter_t;
|
|||||||
|
|
||||||
#define BITMAP_BLOCK_SHIFT 9
|
#define BITMAP_BLOCK_SHIFT 9
|
||||||
|
|
||||||
/* how many blocks per chunk? (this is variable) */
|
|
||||||
#define CHUNK_BLOCK_RATIO(bitmap) ((bitmap)->mddev->bitmap_info.chunksize >> BITMAP_BLOCK_SHIFT)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user