Skip to content

btree cleanups and unification

Christoph Hellwig linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest21 patches 37 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/21split up xfs_btree_init_cursorfs/xfs/xfs_alloc.c fs/xfs/xfs_alloc_btree.c fs/xfs/xfs_alloc_btree.h +9 more+196 -1580 replies
2/21add generic btree typesfs/xfs/xfs_btree.h+25 -00 replies
3/21make btree root in inode support genericfs/xfs/xfs_bmap_btree.c fs/xfs/xfs_btree.c fs/xfs/xfs_btree.h+30 -190 replies
4/21add a long pointers flag to xfs_btree_curfs/xfs/xfs_bmap_btree.c fs/xfs/xfs_btree.c fs/xfs/xfs_btree.h+5 -90 replies
5/21refactor xfs_btree_readaheadfs/xfs/xfs_bmap_btree.c fs/xfs/xfs_btree.c fs/xfs/xfs_btree.h+77 -720 replies
6/21refactor btree validation helpersfs/xfs/xfs_btree.c fs/xfs/xfs_btree.h+146 -1280 replies
7/21add new btree statisticsfs/xfs/linux-2.6/xfs_stats.c fs/xfs/linux-2.6/xfs_stats.h fs/xfs/xfs_btree.h+97 -01 reply
8/21make btree tracing genericfs/xfs/Makefile fs/xfs/linux-2.6/xfs_ksyms.c fs/xfs/linux-2.6/xfs_super.c +11 more+886 -3262 replies
9/21implement generic xfs_btree_incrementfs/xfs/xfs_alloc.c fs/xfs/xfs_alloc_btree.c fs/xfs/xfs_alloc_btree.h +9 more+312 -3053 replies
10/21implement generic xfs_btree_decrementfs/xfs/xfs_alloc.c fs/xfs/xfs_alloc_btree.c fs/xfs/xfs_alloc_btree.h +8 more+134 -2922 replies
11/21implement generic xfs_btree_lookupfs/xfs/xfs_alloc.c fs/xfs/xfs_alloc_btree.c fs/xfs/xfs_alloc_btree.h +9 more+559 -7353 replies
12/21implement generic xfs_btree_updkeyfs/xfs/xfs_alloc_btree.c fs/xfs/xfs_bmap_btree.c fs/xfs/xfs_btree.c +2 more+204 -2153 replies
13/21implement generic xfs_btree_updatefs/xfs/xfs_alloc.c fs/xfs/xfs_alloc_btree.c fs/xfs/xfs_alloc_btree.h +8 more+333 -2693 replies
14/21add get_maxrecs btree operationfs/xfs/xfs_alloc_btree.c fs/xfs/xfs_bmap_btree.c fs/xfs/xfs_btree.c +2 more+32 -272 replies
15/21implement generic xfs_btree_rshiftfs/xfs/xfs_alloc_btree.c fs/xfs/xfs_bmap_btree.c fs/xfs/xfs_btree.c +2 more+508 -4084 replies
16/21implement generic xfs_btree_lshiftfs/xfs/xfs_alloc_btree.c fs/xfs/xfs_bmap_btree.c fs/xfs/xfs_btree.c +2 more+204 -4254 replies
17/21implement generic xfs_btree_splitfs/xfs/xfs_alloc_btree.c fs/xfs/xfs_bmap_btree.c fs/xfs/xfs_btree.c +2 more+458 -5033 replies
18/21implement semi-generic xfs_btree_new_rootfs/xfs/xfs_alloc_btree.c fs/xfs/xfs_btree.c fs/xfs/xfs_btree.h +1 more+189 -3051 reply
19/21implement generic xfs_btree_inѕert/insrecfs/xfs/xfs_alloc.c fs/xfs/xfs_alloc_btree.c fs/xfs/xfs_alloc_btree.h +8 more+510 -8731 reply
20/21implement generic xfs_btree_delete/delrecfs/xfs/xfs_alloc.c fs/xfs/xfs_alloc_btree.c fs/xfs/xfs_alloc_btree.h +8 more+905 -17231 reply
21/21clean up xfs_bmap_btree.cfs/xfs/xfs_bmap.c fs/xfs/xfs_bmap_btree.c fs/xfs/xfs_btree.c +1 more+231 -3362 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/21] btree cleanups and unification

This is the full btree unficiation based on Dave's initial patches plus various cleanups. This second versions post now contains the complete btree refactoring, and passes XFSQA.

The two first patches from the first round have been merged, so they are not included anymore. In the reposted patches not much has changed, only the readahead helpers have been renamed and the tracing infrastructure has been improved a little.

The real news is the missing btree operations, including all the hairy ones. These have been reimplemented looking at the three original btrees and Daves code, in doubt going with the former. That means the small helpers to insert/remove/move records are gone now in favour of following the original code more closely. This fixed the one off error showing up in the intial refactoring.

There's a lot of new comments and empty lines, so by diffstat the new code isn't all that much smaller:

	36 files changed, 6041 insertions(+), 7128 deletions(-)

but the (debug) binary modules is almost 15kb smaller:

	   text	   data	    bss	    dec	    hex	filename
	 631577	   4227	   3092	 638896	  9bfb0	fs/xfs/xfs.ko.old
	 616929	   4435	   3124	 624488	  98768	fs/xfs/xfs.ko.btree

I have not run any benchmarks yet to see what the performance impact is, and I still have some ideas to optimize the code.