[openEuler-5.10 02/21] block: Add a helper to validate the block size