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: Konrad 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: Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
345bb2e89d
commit
8aa989e2ba
@ -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 bdev_ocssd_zone *zone = ocdev_io->io.zone;
|
||||||
struct spdk_bdev_io *bdev_io = spdk_bdev_io_from_ctx(ctx);
|
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;
|
zone->write_pointer += bdev_io->u.bdev.num_blocks;
|
||||||
assert(zone->write_pointer <= zone->slba + zone->capacity);
|
assert(zone->write_pointer <= zone->slba + zone->capacity);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user