Spdk/examples
Niklas Cassel 998ec7b094 nvme/hello_world: for zoned namespaces, reset the zone before write
If the namespace is a zoned namespace, reset the zone starting at
LBA 0, before doing the "Hello world!" write to LBA 0.

This is done to ensure that the write pointer for the first zone
is at LBA 0.

We need to do this since a regular write on a zoned namespace
to an LBA that is not equal to the write pointer results in a
Zone Invalid Write I/O error.

Therefore, if we don't do a zone reset before doing the write,
the write would fail if there already were data written to the
first zone. (E.g. if the user ran the hello_world example twice.)

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0ee972b4cc40bc5ebd476105d0b180a07cfe5a76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4683
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 12:18:56 +00:00
..
accel examples/accel/perf: replace mempool of tasks with lists of tasks 2020-07-24 19:38:46 +00:00
bdev bdev/hello_world: Use spdk_bdev_open_ext() instead of spdk_bdev_open() 2020-10-19 09:55:14 +00:00
blob test/blobfs: Drop .ini config in favor of json 2020-10-12 08:26:20 +00:00
ioat example/ioat: Initialize global TAILQ HEAD variables at definition. 2020-10-14 08:06:25 +00:00
nvme nvme/hello_world: for zoned namespaces, reset the zone before write 2020-10-20 12:18:56 +00:00
nvmf nvmf: Eliminate spdk_nvmf_tgt_accept() 2020-09-21 07:55:54 +00:00
sock sock/vpp: remove VPP implementation 2020-08-17 08:19:46 +00:00
vmd lib/vmd: detach devices during shutdown 2020-02-04 16:50:25 +00:00
Makefile examples/accel/perf: perf tool using the accel framework 2020-03-16 08:45:13 +00:00