Qu Wenruo posted on Thu, 15 Feb 2018 09:42:27 +0800 as excerpted:
> The easiest way to get a basic idea of how large your extent tree is
> using debug tree:
> # btrfs-debug-tree -r -t extent <device>
> You would get something like:
> btrfs-progs v4.15 extent tree key (EXTENT_TREE ROOT_ITEM 0) 30539776
> level 0 <<<
> total bytes 10737418240 bytes used 393216 uuid
> That level is would give you some basic idea of the size of your extent
> For level 0, it could contains about 400 items for average.
> For level 1, it could contains up to 197K items.
> For leven n, it could contains up to 400 * 493 ^ (n - 1) items.
> ( n <= 7 )
So for level 2 (which I see on a couple of mine here, ran it out of
400 * 493 ^ (2 - 1) = 400 * 493 = 197200
197K for both level 1 and level 2? Doesn't look correct.
Perhaps you meant a simple power of n, instead of (n-1)? That would
yield ~97M for level 2, and would yield the given numbers for levels 0
and 1 as well, whereby using n-1 for level 0 yields less than a single
entry, and 400 for level 1.
Or the given numbers were for level 1 and 2, with level 0 not holding
anything, not levels 0 and 1. But that wouldn't jive with your level 0
example, which I would assume could never happen if it couldn't hold even
a single entry.
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html