Spdk/lib/nvmf
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
..
ctrlr_bdev.c nvmf: Support physical block size if exposed by bdev 2021-05-06 07:14:40 +00:00
ctrlr_discovery.c nvmf: Async event support for discovery log change 2020-11-11 00:53:57 +00:00
ctrlr.c nvmf: Fix race condition when adding IO qpair 2021-02-18 13:37:01 +00:00
fc_ls.c nvmf/fc: Handle out of order fused commands. 2021-01-14 16:18:25 +00:00
fc.c lib/fc: move to spdk_nvmf_tgt_listen_ext() 2021-03-18 14:43:08 +00:00
Makefile so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
nvmf_fc.h nvmf/fc: Add flag to differentiate LS queue and non LS queue. 2021-01-14 16:18:25 +00:00
nvmf_internal.h nvmf: Subsystem pauses only pause admin queues 2021-01-26 17:38:54 +00:00
nvmf_rpc.c nvmf/rpc: adding private tag to the internal rpcs 2021-04-21 08:25:46 +00:00
nvmf.c nvmf: wait for qpair disconnect cbs when removing subsys 2021-04-14 15:35:08 +00:00
rdma.c nvmf: Allow transport specific statistics dumping into JSON 2021-03-19 08:23:01 +00:00
spdk_nvmf.map nvmf: Allow transport specific statistics dumping into JSON 2021-03-19 08:23:01 +00:00
subsystem.c nvmf: remove struct spdk_bdev definition dependencies 2021-05-06 07:14:40 +00:00
tcp.c nvmf/tcp: Remove the unnecessary qpair setting. 2021-05-05 13:29:37 +00:00
transport.c nvmf: call transport abort callback when it's not empty 2021-04-13 08:37:57 +00:00
transport.h nvmf: Allow nvmf_transport_qpair_fini to complete asynchronously. 2020-11-18 11:28:02 +00:00
vfio_user.c nvmf/vfio-user: ignore unmapped DMA regions 2021-05-05 14:25:32 +00:00