Spdk/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 accel_engine: fix the bug while computing chained crc32c via hardware engine. 2021-04-19 21:27:21 +00:00
bdev nvmf: Support physical block size if exposed by bdev 2021-05-06 07:14:40 +00:00
blob lib/blob: force execution of queued persists 2021-04-29 07:10:13 +00:00
blobfs so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
conf so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
env_dpdk env_dpdk: save hotplug timeout timestamps separate from rte_devargs 2021-04-23 08:16:24 +00:00
env_ocf lib/thead: print error log when create mempool or ring failed 2020-11-05 09:41:06 +00:00
event log_rpc: Unify codes in end path. 2021-05-05 13:26:06 +00:00
ftl so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
idxd idxd: Update the definition of register according to the new spec. 2021-04-15 04:35:09 +00:00
ioat so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
iscsi lib/iscsi: Merge multiple Data-OUT PDUs up to 64KB in a sequence 2021-04-19 12:47:40 +00:00
json so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
jsonrpc jsonrpc: use SOCK_NONBLOCK in socket() calls 2021-05-05 13:31:10 +00:00
log so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
lvol so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
nbd nbd: use SOCK_NONBLOCK with socketpair() call 2021-05-05 13:31:10 +00:00
net net: deprecate library 2021-04-26 06:55:03 +00:00
notify so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
nvme lib/nvme: add value check to fix value inversion 2021-05-05 13:32:30 +00:00
nvmf nvmf: Support physical block size if exposed by bdev 2021-05-06 07:14:40 +00:00
rdma include: remove util.h include from queue_extras.h 2021-04-14 07:25:21 +00:00
reduce so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
rocksdb build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
rpc so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
scsi nvmf: Support physical block size if exposed by bdev 2021-05-06 07:14:40 +00:00
sock sock: Add new params to configure zcopy for server, client sockets 2021-04-27 08:13:32 +00:00
thread thread: do not ignore read() return 2021-04-26 06:55:48 +00:00
trace so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
ut_mock so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
util lib/util/math.c: improve portability 2021-02-10 08:44:01 +00:00
vfio_user lib/vfio_user: Fix compiling warning of non-debug warning. 2021-04-19 12:49:25 +00:00
vhost vhost-blk: add set interrupt mode to poller 2021-04-23 18:09:54 +00:00
virtio virtio_blk: add hotplug support 2021-04-16 19:21:13 +00:00
vmd so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
Makefile NVMe/vfio-user: add initial version vfio-user transport to NVMe driver 2021-01-21 05:00:18 +00:00