2014-06-09 18:04:19

by Mahesh Khanwalkar

[permalink] [raw]
Subject: Ext4 Size Restrictions

Hello,
Ext4 supports max file size of 16TiB and max volume of 1EiB. What
exactly in the implementation causes this restriction? Also is there
any plans (as of now) to make it max sizes larger?

Thanks,
Mahesh Khanwalkar


2014-06-09 18:11:36

by Eric Sandeen

[permalink] [raw]
Subject: Re: Ext4 Size Restrictions

On 6/9/14, 1:03 PM, Mahesh Khanwalkar wrote:
> Hello,
> Ext4 supports max file size of 16TiB and max volume of 1EiB. What
> exactly in the implementation causes this restriction? Also is there
> any plans (as of now) to make it max sizes larger?

The ext4 extent format on disk is:

struct ext4_extent {
__le32 ee_block; /* first logical block extent covers */
__le16 ee_len; /* number of blocks covered by extent */
__le16 ee_start_hi; /* high 16 bits of physical block */
__le32 ee_start_lo; /* low 32 bits of physical block */
};

The file size is limited by a 32-bit number for the starting logical block
of an extent, ee_block.

2^32 * 4k blocks gives 16TiB

The 48 bits for physical start high/low gives you the 1 EiB (2^48*4096).

I don't know of any plans to make either of these larger. Surely 1EiB
suffices for now. 16TiB, perhaps not so much.

-Eric

> Thanks,
> Mahesh Khanwalkar