Re: [PATCH] null_blk: fix validation of block size

From: Bart Van Assche
Date: Mon Jun 03 2024 - 13:03:29 EST


On 6/2/24 16:59, Damien Le Moal wrote:
On 6/2/24 19:57, John Garry wrote:
On 01/06/2024 21:23, Andreas Hindborg wrote:
From: Andreas Hindborg <a.hindborg@xxxxxxxxxxx>

Block size should be between 512
and 4096

Or PAGE_SIZE?

PAGE_SIZE can be larger than 4096. But most drives are 512 or 4096 LBA-sized.

null_blk is not a physical device. Hence, why not to use blk_validate_block_size() here?

Thanks,

Bart.