Commit 1b236ad
Darrick J. Wong
xfs: clean up xfs_btree_{calc_size,compute_maxlevels}
During review of the next patch, Dave remarked that he found these two
btree geometry calculation functions lacking in documentation and that
they performed more work than was really necessary.
These functions take the same parameters and have nearly the same logic;
the only real difference is in the return values. Reword the function
comment to make it clearer what each function does, and move them to be
adjacent to reinforce their relation.
Clean up both of them to stop opencoding the howmany functions, stop
using the uint typedefs, and make them both support computations for
more than 2^32 leaf records, since we're going to need all of the above
for files with large data forks and large rmap btrees.
Signed-off-by: Darrick J. Wong <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>1 parent b74e15d commit 1b236ad
2 files changed
+37
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4514 | 4514 | | |
4515 | 4515 | | |
4516 | 4516 | | |
4517 | | - | |
4518 | | - | |
| 4517 | + | |
| 4518 | + | |
4519 | 4519 | | |
4520 | | - | |
| 4520 | + | |
4521 | 4521 | | |
4522 | | - | |
4523 | | - | |
| 4522 | + | |
| 4523 | + | |
4524 | 4524 | | |
4525 | | - | |
4526 | | - | |
| 4525 | + | |
| 4526 | + | |
4527 | 4527 | | |
4528 | | - | |
4529 | | - | |
4530 | | - | |
4531 | | - | |
| 4528 | + | |
| 4529 | + | |
| 4530 | + | |
| 4531 | + | |
| 4532 | + | |
| 4533 | + | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
| 4541 | + | |
| 4542 | + | |
| 4543 | + | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
4532 | 4554 | | |
4533 | 4555 | | |
4534 | 4556 | | |
| |||
4822 | 4844 | | |
4823 | 4845 | | |
4824 | 4846 | | |
4825 | | - | |
4826 | | - | |
4827 | | - | |
4828 | | - | |
4829 | | - | |
4830 | | - | |
4831 | | - | |
4832 | | - | |
4833 | | - | |
4834 | | - | |
4835 | | - | |
4836 | | - | |
4837 | | - | |
4838 | | - | |
4839 | | - | |
4840 | | - | |
4841 | | - | |
4842 | | - | |
4843 | | - | |
4844 | | - | |
4845 | | - | |
4846 | | - | |
4847 | | - | |
4848 | 4847 | | |
4849 | 4848 | | |
4850 | 4849 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
490 | | - | |
491 | | - | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
| |||
0 commit comments