Yes, Reject the device is the right fix. I will try to send another fix.
By the way, I think this fix is good protection, maybe some other devices
violate this block size constraint.
Divide zero is unacceptable.
Thanks,
Feng Li
Martin K. Petersen 于2021年1月13日周三 上午1:48写道:
>
>
> Johannes,
>
> >> I
Johannes,
>> 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.
Yep, Linux doesn't support logical blo
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.
Hi Martin,
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:
[ 63.153018] nvme nvme0: creating 3 I/O queues.
[ 63.181644] nvme nvme0: mapped 3/0/0 default/read/poll queues.
[ 63.185568] nvme nvme0: new
Li,
> If the physical_block_size and io_min is less than a sector,
That's not supposed to happen. What device/driver is this?
--
Martin K. Petersen Oracle Linux Engineering
If the physical_block_size and io_min is less than a sector, the
'granularity >> SECTOR_SHIFT' will be zero.
Signed-off-by: Li Feng
---
include/linux/blkdev.h | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index f94ee3089e
6 matches
Mail list logo