Re: [PATCH v2] blk: avoid divide-by-zero with zero granularity

From: Johannes Thumshirn
Date: Tue Jan 12 2021 - 12:37:34 EST


On 12/01/2021 18:29, Feng Li wrote:
> I use the nvme-tcp as the host, the target is spdk nvme-tcp target,
> and set a wrong block size(i.g. bs=8), then the host prints this oops:

I think the better fix here is to reject devices which report a block size
small than a sector.