From b5a8338cbc9e25e94c50f65f510008c1fbf9dca9 Mon Sep 17 00:00:00 2001 From: Mikhail Pershin Date: Thu, 19 Aug 2010 20:36:07 +0400 Subject: [PATCH] b=22906 limit filesystem size for LUN size close to 16TB a=adilger i=zhiqi.tao i=girish.shilamkar --- lustre/utils/mkfs_lustre.c | 5 +++++ 1 file changed, 5 insertions(+) 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) || -- 1.8.3.1