You missed:
if (persistent)
size = MD_NEW_SIZE_BLOCKS(size);
where MD_NEW_SIZE_BLOCKS is
#define MD_NEW_SIZE_BLOCKS(x) ((x & ~(MD_RESERVED_BLOCKS - 1)) - MD_RESERVED_BLOCKS)
and there you have your "-1".
> Anyway on the old machine, I still cannot find the raid superblock by
> hand, but the drives now mount, so the kernel must have been able to
> locate them somehow......
The superblock should be located between 64K and 128K from the end of
the device, on a 64K boundary.
>
NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/