[PATCH 5.10] block: Add a helper to validate the block size