Matt wasn't talking (I don't think) about the checkpoint image format,
which (IIUC) is what you would be addressing with your suggestion.
I personally think the main maintainability concern is that updates to
object creation/destruction/updates code not require maintainers to know
to look at other random places like checkpoint/file.c to update
corresponding checkpoint and restart code. That is why we have made it
a point to re-use existing (or create) helpers like cred_setresuid()
in the checkpoint and restart paths, so that updates to the core helpers
will automatically update checkpoint/restart code as well.
In addition to this, Matt is working on moving everything (or nearly
everything) that is under checkpoint/ into the right files in the core
code, i.e. checkpoint/file.c helpers likely belong in fs/namei.c,
fs/open.c,
fs/namespace.c etc.
Now, what you're talking about with auto-generation of headers has also
been discussed, and specifically suggested by Andrew Morgan
(i.e. https://lists.linux-foundation.org/pipermail/containers/2...
June/018289.html ). But I think it's still an open question whether
that will just obfuscate what is really going on, and whether it is
addressing a real problem. If it turns out to be a real problem, then
we're certainly open to it!