Skip to content

RFC : Rename/reorg usercr code

Sukadev Bhattiprolu containers 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest6 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Change API prefix to cr_Makefile app-checkpoint.h checkpoint-main.c +4 more+61 -610 replies
2/6Remove flags parameter to cr_checkpoint()checkpoint-main.c checkpoint.c cr_checkpoint.h+7 -100 replies
3/6Minor reorg of restart.crestart.c+21 -220 replies
4/6Move checkpoint() into restart.cMakefile checkpoint.c restart.c+42 -650 replies
5/6Rename restart.c to cr_checkpoint.cMakefile cr_checkpoint.c restart.c+2623 -26230 replies
6/6Rename common.h to cr_log.hMakefile checkpoint-main.c common.h +3 more+114 -1160 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC][PATCH 0/6][usercr]: Rename/reorg usercr code

Change the prefix of the USERCR apis to 'cr_' and reorg the code to avoid duplication and reduce code size.

[PATCH 1/6] Change API prefix to cr_
[PATCH 2/6] Remove flags parameter to cr_checkpoint() [PATCH 3/6] Minor reorg of restart.c
[PATCH 4/6] Move checkpoint() into restart.c [PATCH 5/6] Rename restart.c to cr_checkpoint.c [PATCH 6/6] Rename common.h to cr_log.h

With this change, USERCR for now "exports" just the following two files:

cr_checkpoint.o
cr_checkpoint.h

But this patchset does cause some churn, let me know if you think any of it is unnecessary/noise. I have tested for now along with the patch that removes most exits() from cr_restart(). If the reorg makes sense, will run all tests once more and resubmit.

TODO:
cr_checkpoint.c has several forward declarations - most of these can be removed by reordering the code in the file. This would also reduce maintenance overhead when the prototype of the functions change. But changing it would cause more noise in the history.