Whamcloud - gitweb
b=22906 mke2fs needs ~16TB LUNs to be 16TB-1 block
authorAndreas Dilger <andreas.dilger@oracle.com>
Fri, 6 Aug 2010 19:43:04 +0000 (13:43 -0600)
committerJohann Lombardi <johann.lombardi@oracle.com>
Mon, 9 Aug 2010 07:17:33 +0000 (09:17 +0200)
Adjust LUNs at or just over 16TB to be 1 block below 16TB, to avoid
problems with current (1.41) mke2fs being unhappy with this size.

i=zhiqi.tao
i=girish.shilamkar

lustre/utils/mkfs_lustre.c

index 6f849a8..f6b0c83 100644 (file)
@@ -589,8 +589,11 @@ int make_lustre_backfs(struct mkfs_opts *mop)
                         return EINVAL;
                 }
                 block_count = mop->mo_device_sz / (L_BLOCK_SIZE >> 10);
-               /* Create one less block. Bug 22906 */
-                block_count = min(block_count, 4294967295U);
+                /* 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) ||