Today the in-guest nvme device shows physical_block_size=512 even though the backend iSCSI bdev supports physical_block_size=4K iSCSI targets exposes physical block size using logical_block_per_physical_block_exponent in READ_CAPACITY_16 NPWG is one of the way to let Linux nvme driver set physical_block_size of the nvme block device. This patch adds spdk_bdev.phys_blocklen which is updated if the iSCSI backend exposes physical_block_size. Later phys_blocklen is used in nvmf to set NPWG and NAWUPF to report back during NS identity. Linux driver uses min(nawupf, npwg) to set physical_block_size. Similarly in scsi_bdev fill lbppbe in READ_CAP16 response based on spdk_bdev.phys_blocklen. Fixes #1884 Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Change-Id: I0b6c81f1937e346d448f49c927eda8c79d2d75cf Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7310 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: <dongx.yi@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
ctrlr_bdev_ut.c | ||
Makefile |