From 82a3a9d16c5a9c09255f43b324e160b79cb73e0d Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Wed, 8 Jun 2011 02:34:44 -0600 Subject: [PATCH] LU-399 do not use mke2fs -E resize for large LUNs 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 Reviewed-on: http://review.whamcloud.com/912 Tested-by: Hudson Reviewed-by: Yu Jian Tested-by: Yu Jian Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/utils/mkfs_lustre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 53b9317..b0062cb 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -721,7 +721,7 @@ int make_lustre_backfs(struct mkfs_opts *mop) * 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; -- 1.8.3.1