From: Mikhail Pershin Date: Thu, 19 Aug 2010 16:36:07 +0000 (+0400) Subject: b=22906 limit filesystem size for LUN size close to 16TB X-Git-Tag: 2.0.51.0~59 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=b5a8338cbc9e25e94c50f65f510008c1fbf9dca9;p=fs%2Flustre-release.git b=22906 limit filesystem size for LUN size close to 16TB a=adilger i=zhiqi.tao i=girish.shilamkar --- diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 28c3806..bcdfc29 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -587,6 +587,11 @@ int make_lustre_backfs(struct mkfs_opts *mop) return EINVAL; } block_count = mop->mo_device_sz / (L_BLOCK_SIZE >> 10); + /* If the LUN size is just over 2^32 blocks, limit the + * filesystem size to 2^32-1 blocks to avoid problems with + * ldiskfs/mkfs not handling this size. Bug 22906 */ + if (block_count > 0xffffffffULL && block_count < 0x100002000ULL) + block_count = 0xffffffffULL; } if ((mop->mo_ldd.ldd_mount_type == LDD_MT_EXT3) ||