mbox series

[v2,0/7] xfs: make btree cursor private unions anonymous

Message ID 158398468107.1307855.8287106235853942996.stgit@magnolia (mailing list archive)
Headers show
Series xfs: make btree cursor private unions anonymous | expand

Message

Darrick J. Wong March 12, 2020, 3:44 a.m. UTC
Hi all,

Dave injured his finger and is having difficulty typing, so I fixed a few
things that I didn't like about the v1 patchset and am sending it back out
ahead of resending the btree bulk loading patchset.  The changes are pretty
mechanical and I was gonna apply them, but one more round never hurt anyone.

>From Dave's original cover letter:

"This is a "make things less verbose" cleanup from looking at the
changes Darrick is making to add a staging/fake cursor to the union
for bulk btree loading.

"The process is to create a @defines of the new name to the existing
union name, then replace all users of each union via a script. Then
the union is made anonymous and the members renamed to match the new
code. Then the #defines get removed.

"We do this for the bc_private union, then we name the ag and btree
structures and make them use anonymous unions internally via the
same process.

"That means we go from doubly nested private stuff like this:

"cur->bc_private.a.priv.abt.active

"To the much cleaner, less verbose and more readable:

"cur->bc_ag.abt.active

"Simples, yes?

"[The original] series can be found at:

"https://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git/h?xfs-btree-cursor-cleanup

"Note: the code changes are all scripted, I have not done any
followup to do things like aggregate split lines back into single
lines as that is out of scope of the structure definition cleanup
I'm trying to acheive here. That can be done in future as we modify
the code that now has lines that can be merged....

"Signed-off-by: Dave Chinner <dchinner@redhat.com>"

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This has been lightly tested with fstests.  Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=btree-private-unions