[RFC PATCH v1 1/6] badblocks: add more helper structure and routines in badblocks.h