[PATCH 0/13] xfs_repair: recombine cut&waste code in dir2.c/attr_repair.c

Eric Sandeen
2015-09-09T19:34:17Z

repair/dir2.c and repair/attr_repair.c got cut and pasted
long, long ago and have diverged since.

This series brings them back together, presumably fixes some
bugs, and loses a few hundred lines in the process.

o/~ reunited, and it feels so so good ... o/~

The series accomplishes this through a combination of trivial changes
(removing unused structure members, whitespace, etc) as well
as by "cross-porting" changes & fixes which happened to one
file but not the other over the past many years.

Along the way, a graphical diff of dir2 vs. attr_repair should
show the convergence.

Up until the last patch, I don't worry about dir vs. attr naming
in comments or error messages; the goal is to make these chunks
of the two files sufficiently similar so that by patch 11, the
reviewer can do a diff and say "yeah, ok, those really are
substantially the same now."

Also instructive is to apply up to patch 11, copy dir2.c and
attr_repair.c to /tmp, apply patch 12, and do a 3-way graphical
diff of the 3 files to see that the move really is OK and
didn't play any significant tricks.

The last patch fixes up the dir vs. attr text in error messages
and comments. I do have a question about whether this is ok
for i8n:

printf(_("This string is %s"), _("awesome"));

because that's essentially the trick I used...

Thanks,
-Eric