numam-spdk/examples/bdev/hello_world
Niklas Cassel f6bbec8ba9 bdev/hello_world: for zoned bdevs, reset the zone before write
If the bdev is a zoned bdev, reset zone 0 (containing offset 0),
before doing the "Hello world!" write to offset 0.

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

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_bdev example twice.)

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I52b6fc9cf6e86fef9aeb19482eafd1f857ba1478
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6943
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
2021-03-29 10:17:45 +00:00
..
.gitignore examples/bdev: add hello world example 2018-05-11 15:22:22 +00:00
bdev.json example/bdev/hellow_word: Drop .ini config in favor of json 2020-10-23 13:47:23 +00:00
hello_bdev.c bdev/hello_world: for zoned bdevs, reset the zone before write 2021-03-29 10:17:45 +00:00
Makefile build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00