The mo_device_size variable is in units of kB, so take this into
account correctly when computing the filesystem block count.
The "-E resize" option is being used to align metadata on 1MB IO
boundaries, but it does not work for devices larger than 2^32 blocks.
A better long-term solution is to fix mke2fs so that it does this
alignment itself based on the s_raid_stride value.
Change-Id: I2e4104b8ad490076bfaa6a49842124d79e3bf880
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/912
Tested-by: Hudson
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
* Only useful for filesystems with < 2^32 blocks due to resize
* limitations. */
if (IS_OST(&mop->mo_ldd) && mop->mo_device_sz > 100 * 1024 &&
* Only useful for filesystems with < 2^32 blocks due to resize
* limitations. */
if (IS_OST(&mop->mo_ldd) && mop->mo_device_sz > 100 * 1024 &&
- mop->mo_device_sz / L_BLOCK_SIZE <= 0xffffffff) {
+ mop->mo_device_sz * 1024 / L_BLOCK_SIZE <= 0xffffffffULL) {
unsigned group_blocks = L_BLOCK_SIZE * 8;
unsigned desc_per_block = L_BLOCK_SIZE / 32;
unsigned resize_blks;
unsigned group_blocks = L_BLOCK_SIZE * 8;
unsigned desc_per_block = L_BLOCK_SIZE / 32;
unsigned resize_blks;