xfs
[Top] [All Lists]

Re: Limits on agi->agi_level (and other btree depths?)

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: Limits on agi->agi_level (and other btree depths?)
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Wed, 12 Feb 2014 19:53:55 -0600
Cc: xfs-oss <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140213010308.GH13997@dastard>
References: <52FC09AB.3030209@xxxxxxxxxxx> <20140213010308.GH13997@dastard>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
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.
> 

<Prev in Thread] Current Thread [Next in Thread>