Need to mask of bits above the bottom 16 when calculating number of
copies.
initramfs, but device doesn't yet exist in /dev.
- When --assemble --scan is run, if all arrays that could be found
have already been started, don't report an error.
+ - Fix a couple of bugs related to raid10 and the new 'offset' layout.
Changes Prior to 2.5.4 release
- When creating devices in /dev/md/ create matching symlinks
* which is array.size * raid_disks / ncopies;
* .. but convert to sectors.
*/
- int ncopies = (layout>>8) * (layout & 255);
+ int ncopies = ((layout>>8) & 255) * (layout & 255);
bitmapsize = (unsigned long long)size * raiddisks / ncopies * 2;
/* printf("bms=%llu as=%d rd=%d nc=%d\n", bitmapsize, size, raiddisks, ncopies);*/
} else
/* This is the tricky one - we need to check
* which actual disks are present.
*/
- copies = (layout&255)* (layout>>8);
+ copies = (layout&255)* ((layout>>8) & 255);
first=0;
do {
/* there must be one of the 'copies' form 'first' */