5

Is there a maximum limit to the number of subdirectories in a single directory for btrfs like the 64,000 limit in ext4?

(see here: https://stackoverflow.com/questions/22775011/what-is-the-maximum-number-of-subdirectories-allowed-in-ext4)

2 Answers 2

4

There is no limit, but you cannot create more then 2^64 directories in total.


Btrfs does not have a specific limit for the content of a directory (neither for files, nor for sub-directories). The content is represented as lists, but its length is not limited. However, each directory will need its own inode. As btrfs uses 64-bit integers, there cannot be more then 2^64 inodes in total. That number defines an upper bound for the number of sub-directories that you can create. For details, see the design document.

Note that 2^64 is such a high number that for all practical circumstances, it is unlimited. You will rather run out of disk space until you hit that limit.

3

If my memory is serving me right, BTRFS doesn't have a subdirectory limit but it has total number of files limit, which is a ridiculously high number of 2^64. I searched google but could not find the document where I saw this from. I think it was an oracle web page. So take it with a grain of salt.

1
  • 1
    wikpedia right hand side overview
    – Anthon
    Mar 20, 2016 at 6:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .