Limits on agi->agi_level (and other btree depths?)
Eric Sandeen
sandeen at sandeen.net
Wed Feb 12 19:53:55 CST 2014
On 2/12/14, 7:03 PM, Dave Chinner wrote:
> On Wed, Feb 12, 2014 at 05:54:19PM -0600, Eric Sandeen wrote:
...
>> I guess XFS_BTREE_MAXLEVELS is just an arbitrary in-memory limit,
>> not a limit of the underlying disk structures, but as it stands,
>> we should be sure that we don't exceed it, right?
>
> If you really want to enforce XFS_BTREE_MAXLEVELS, add checks
> into xfs_alloc_compute_maxlevels(), xfs_ialloc_compute_maxlevels()
> and xfs_bmap_compute_maxlevels() to constrain the limits in the
> struct xfs_mount and validate the on-disk values based on the
> values in the struct xfs_mount.
Thanks, I had forgotten those existed - that looks perfect.
>> I was going to put that limit into xfs_agi_verify, but realized
>> that I wasn't sure if we could actually exceed that depth in
>> normal operations.
>>
>> (cue dchinner working out that 9 levels is 59 bazillion jillion
>> items, and will never be hit?)
>
> Yep, done that ;)
I knew you'd enjoy it. ;)
-Eric
> Cheers,
>
> Dave.
>
More information about the xfs
mailing list