Whamcloud - gitweb
LU-399 do not use mke2fs -E resize for large LUNs
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 8 Jun 2011 08:34:44 +0000 (02:34 -0600)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Jun 2011 23:54:53 +0000 (16:54 -0700)
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>
lustre/utils/mkfs_lustre.c

index 53b9317..b0062cb 100644 (file)
@@ -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 &&
                  * 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;