Commit 8aa989e2 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

bdev/ocssd: fill in offset_blocks in append callback



The user only specifies the starting address of a zone to which to
append to and the actual location is expected to be returned in
bdev_io->u.bdev.offset_blocks.

Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Icc2e9f5461a746d19686d5288075f03d09bf1b19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6441


Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarNiklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 345bb2e8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -476,6 +476,7 @@ bdev_ocssd_append_cb(void *ctx, const struct spdk_nvme_cpl *cpl)
	struct bdev_ocssd_zone *zone = ocdev_io->io.zone;
	struct spdk_bdev_io *bdev_io = spdk_bdev_io_from_ctx(ctx);

	bdev_io->u.bdev.offset_blocks = zone->write_pointer;
	zone->write_pointer += bdev_io->u.bdev.num_blocks;
	assert(zone->write_pointer <= zone->slba + zone->capacity);