mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
One small fix for md/bitmaps
This fixes a regression that was introduced in the merge window. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iQIVAwUAT6N/tDnsnt1WYoG5AQKk/BAAv79JABvD637hPFN8iUJlmq3m0qJDbULr 8l9sGJCfaspeWFKd4d8ilkC7q0fq7QDruSoSfHzVzYkP6WmoRriDXb3uji17RkMZ 1qlGWwrt1sg5COzvX2FijqIEpSc6xwKOYIJ6uoZ6/gTnSxTI2np4VZyJpo25JJ8H AB+JnjzacE8TXs6rpptSmOSv5iPQ+7den3LWYC8S4SXxxVfzmcweXaNxNKvJtX+u Lb0BeuQhBXxYjEh4P+qaIS3GbX1S47LqM4NRE4w64P6vMGXbgSfSBWPx5zfXQ+z1 nYU+H0iFVqCgLqRJms3j7x1DwLvEDeoaTaoDX0bOifDWE3cgdtMPxk/4r9U1t2E4 /VVvL0DOXquIlhZvcyKIlW/uutFT0YYKiJDv47eYqK0cO6+1VCVwqzAQiqMLSNoy G35A4Y/ct/RgeR5V6Ba6SvVJtZfNJ0CWePsLnMhoJYsDpr6rJ58Nlpo9zPASY0UJ uDrXXWvpF9PCvJNzAOqSKX/GzEt2aoCqPgwQgqrW+x4llN5A2TuTeCU+vtSWMVL4 NrS+xX3dqKCR02tF2qumdqf0+pe9jroRsPcm7piIMCKi3oxVEmHzzPeVbmLi8ZxN Mz9/75Qa9INBvStHo5NPT/PJTRvnLE6Qru3soSOw6AZvfPIWPTEjYBXSx269Yzqh qMpBT9yiuEw= =8qhg -----END PGP SIGNATURE----- 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:
commit
08542241cf
@ -1727,8 +1727,7 @@ int bitmap_create(struct mddev *mddev)
|
||||
bitmap->chunkshift = (ffz(~mddev->bitmap_info.chunksize)
|
||||
- BITMAP_BLOCK_SHIFT);
|
||||
|
||||
/* now that chunksize and chunkshift are set, we can use these macros */
|
||||
chunks = (blocks + bitmap->chunkshift - 1) >>
|
||||
chunks = (blocks + (1 << bitmap->chunkshift) - 1) >>
|
||||
bitmap->chunkshift;
|
||||
pages = (chunks + PAGE_COUNTER_RATIO - 1) / PAGE_COUNTER_RATIO;
|
||||
|
||||
|
@ -101,9 +101,6 @@ typedef __u16 bitmap_counter_t;
|
||||
|
||||
#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
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user