Spdk/lib
Shuhei Matsumoto 139da44c43 lib/bdev: Expose metadata size and setting of bdev
To support DIF, bdev will need to expose the following information:
- Metadata format
 - Block size
 - Metadata size
 - Metadata setting (interleave or separate)
- DIF settings
 - DIF type 1, 2, or 3
 - DIF location
- DIF check types
 - Guard check
 - Reference tag check
 - Application tag check

This patch is for the metadata format. Subsequent patches will do for the DIF
setting and DIF check types.

Add fields, md_len and md_interleave, to struct spdk_bdev and add APIs,
spdk_bdev_get_md_size and spdk_bdev_is_md_interleaved, to bdev APIs.

The fields, md_len and md_interleave, are added to the bdev JSON infomation dump.

DIF will be used only in the NVMe bdev module and the upcoming virtual
DIF bdev module first. But additional required storage by md_len and md_interleave
will be very small and they are simple. Hence add them to struct spdk_bdev simply.

Change-Id: I4109f6a63e6f0576efe424feb0305a9a17b9b2e8
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443183
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-08 23:37:13 +00:00
..
bdev lib/bdev: Expose metadata size and setting of bdev 2019-02-08 23:37:13 +00:00
blob lvol: add option to change default data erase method 2019-01-23 22:25:37 +00:00
blobfs blobfs: fix the length value of file. 2019-01-17 05:04:13 +00:00
conf string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
copy lib/copy: unregister copy engine on finish 2018-10-15 17:42:20 +00:00
env_dpdk env/dpdk: remove rte_pci_bus extern declaration 2019-02-06 20:22:16 +00:00
event event: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
ftl lib/ftl: Remove NULL pointer checks in external APIs 2019-02-08 16:35:34 +00:00
ioat memory: replace all hardcoded 0x200000 with a define 2019-01-13 00:47:26 +00:00
iscsi iscsi: remove unused mobj fields 2019-02-06 20:21:48 +00:00
json json_util: add debug logs to spdk_json_decode_object function 2019-01-10 14:31:37 +00:00
jsonrpc jsonrpc: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
log app: rename traceflag cmdline option to logflag 2018-12-03 19:50:15 +00:00
lvol lvol: add option to change default data erase method 2019-01-23 22:25:37 +00:00
nbd nbd: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
net net: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
nvme nvme/pcie: mark infrequent cases as unlikely in submission path 2019-02-06 18:37:40 +00:00
nvmf nvmf/tcp: Stay in AWAIT_PDU_READY state until atleast 1 byte arrives 2019-02-08 16:35:12 +00:00
reduce reduce: fix ordering bug 2019-02-04 19:23:35 +00:00
rocksdb thread: Rename spdk_allocate_thread to spdk_thread_create 2019-01-17 11:24:38 +00:00
rpc rpc: add spdk_rpc_is_method_allowed 2018-12-05 00:35:35 +00:00
scsi scsi: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
sock UT: fix the sock_ut failure because of the port conflict 2019-01-22 17:28:24 +00:00
thread thread: Keep caches of message objects on the thread object. 2019-02-05 06:49:30 +00:00
trace lib/trace: add trace_record tool 2019-01-30 06:36:25 +00:00
ut_mock thread: Eliminate use of pthread_self and thread_ids 2019-01-15 16:53:12 +00:00
util util: Move architecture detection to crc32c.c 2019-02-04 19:14:22 +00:00
vhost vhost/rpc: remove unnecessary if in the add_vhost_scsi_lun RPC 2019-02-06 19:04:21 +00:00
virtio virtio: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
Makefile ftl: Initial implementation 2019-01-11 09:15:39 +00:00