[PATCH openEuler-1.0-LTS 6/9] block: Add a helper to validate the block size