[RFC PATCH v1 5/6] badblocks: improve badblocks_check() for multiple ranges handling