Spdk/lib/bdev
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
..
aio bdev/aio: Set minimum events to 0 in io_getevents 2019-02-08 16:36:18 +00:00
crypto bdev/crypto: add notice when base bdev not available at create time 2019-02-01 12:37:02 +00:00
error bdev: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
ftl bdev/ftl: write_config_json support 2019-02-08 16:35:34 +00:00
gpt bdev: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
iscsi bdev: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
lvol bdev: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
malloc Make: Add deps for each shared obj individually 2018-10-09 21:45:26 +00:00
null bdev/null: Remove clearing errno duplicated with spdk_strtol 2019-01-29 17:39:18 +00:00
nvme string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
ocf OCF: add support of write_json_config 2019-01-29 06:10:36 +00:00
passthru bdev/passthru: add notice when base bdev not available at create time 2019-02-01 12:37:34 +00:00
pmem bdev: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
raid bdev: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
rbd bdev: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
rpc lib/bdev: Expose metadata size and setting of bdev 2019-02-08 23:37:13 +00:00
split bdev: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
virtio bdev: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
bdev.c lib/bdev: Expose metadata size and setting of bdev 2019-02-08 23:37:13 +00:00
Makefile OCF: add OCF module 2019-01-28 09:41:52 +00:00
part.c bdev: Improve spdk_bdev_open() to print string describing error number 2019-01-24 10:50:34 +00:00
scsi_nvme.c bdev: move error union to internal spdk_bdev_io struct 2018-06-26 20:04:07 +00:00
vtune.c mk: don't use '-include spdk/config.h' 2018-10-02 23:13:32 +00:00