Spdk/test/unit/lib
Swapnil Ingle 6cebe9d06b nvmf: Support physical block size if exposed by bdev
(Note: this patch was previously applied as b32cfc46 and then reverted
as 63642bef.)

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: I0b6c81f1937e346d448f49c927eda8c79d2d75c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7739
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-05-06 07:14:40 +00:00
..
accel test/accel: add UT for _get_task() 2021-02-22 10:03:35 +00:00
bdev bdev/zone: add support for get num zones 2021-04-26 16:16:42 +00:00
blob test/blob: verify number of extent page writes 2021-04-23 07:52:25 +00:00
blobfs remove unneeded spdk_internal/thread.h includes 2020-12-10 14:38:04 +00:00
env_dpdk unit: add unit test for the pci event 2021-04-19 12:55:17 +00:00
event event: Add return code to spdk_rpc_initialize 2021-03-12 08:38:10 +00:00
ftl remove unneeded spdk_internal/thread.h includes 2020-12-10 14:38:04 +00:00
idxd test/idxd: fix allocation issue with unit test 2021-03-26 08:22:41 +00:00
ioat ut: make use of CUnit macro to reduce duplications 2020-04-02 14:50:12 +00:00
iscsi ut/iscsi: Add Data-OUT PDU sequence test cases 2021-04-19 12:47:40 +00:00
json json: add spdk_json_free_object() 2020-10-19 10:02:10 +00:00
jsonrpc lib/jsonrpc: remove spdk_ prefix from internal functions. 2020-05-11 12:29:07 +00:00
log log: simplify SPDK_LOG_REGISTER_COMPONENT 2020-10-14 08:00:35 +00:00
lvol lvol: Don't include bdev_module.h in the public header 2021-05-04 21:07:42 +00:00
notify ut: make use of CUnit macro to reduce duplications 2020-04-02 14:50:12 +00:00
nvme test/nvme_qpair: cases for getting sgl print information 2021-05-06 07:13:09 +00:00
nvmf nvmf: Support physical block size if exposed by bdev 2021-05-06 07:14:40 +00:00
reduce test: add generic unlink wrapper 2020-05-06 12:43:57 +00:00
scsi nvmf: Support physical block size if exposed by bdev 2021-05-06 07:14:40 +00:00
sock sock: Add sock_map_find_free 2021-04-22 07:29:26 +00:00
thread thread: Add spdk_io_channel_get_io_device() to get io_device from io_channel 2021-04-08 16:10:26 +00:00
util test/string.c: remove hardcoded limit values 2021-02-11 08:40:09 +00:00
vhost lib/vhost: force cpumask to be subset of application's CPU mask 2021-02-04 08:35:08 +00:00
json_mock.c ut/json_mock: Add spdk_json_write_string_fmt() 2021-02-09 11:29:53 +00:00
Makefile unit: add unit test for the pci event 2021-04-19 12:55:17 +00:00