- When adding new disk to an array, don't reserve so much bitmap
space that the disk cannot store the required data. (Needed when
1.x array was created with older mdadm).
+ - When adding a drive that was a little too small, we did not get
+ the correct error message.
Changes Prior to 2.6.2 release
- --fail detached and --remove faulty can be used to fail and
if (!get_dev_size(fd, NULL, &dsize))
return 1;
- if (dsize < MD_RESERVED_SECTORS*2*512)
+ if (dsize < MD_RESERVED_SECTORS*512)
return 2;
offset = MD_NEW_SIZE_SECTORS(dsize>>9);
if (!get_dev_size(fd, devname, &dsize))
return 1;
- if (dsize < MD_RESERVED_SECTORS*512 * 2) {
+ if (dsize < MD_RESERVED_SECTORS*512) {
if (devname)
fprintf(stderr, Name
": %s is too small for md: size is %llu sectors.\n",
static __u64 avail_size0(struct supertype *st, __u64 devsize)
{
- if (devsize < MD_RESERVED_SECTORS*2)
+ if (devsize < MD_RESERVED_SECTORS)
return 0ULL;
return MD_NEW_SIZE_SECTORS(devsize);
}
if (!get_dev_size(fd, NULL, &dsize))
return;
- if (dsize < MD_RESERVED_SECTORS*512 * 2)
+ if (dsize < MD_RESERVED_SECTORS*512)
return;
offset = MD_NEW_SIZE_SECTORS(dsize>>9);
return 1;
- if (dsize < MD_RESERVED_SECTORS*512 * 2)
- return -1;
+ if (dsize < MD_RESERVED_SECTORS*512)
+ return -1;
offset = MD_NEW_SIZE_SECTORS(dsize>>9);