Commit a9e6fadf authored by Wojciech Malikowski's avatar Wojciech Malikowski Committed by Jim Harris
Browse files

lib/bdev: Added spdk_bdev_io_get_append_location()



spdk_bdev_io_get_append_location() will be
used during zone append command to retrieve
location of data write.

Change-Id: I1f46ae9d2f745aa53264c1a01da3f7cef4f38c72
Signed-off-by: default avatarWojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469164


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 8a252783
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -142,4 +142,11 @@ int spdk_bdev_zone_management(struct spdk_bdev_desc *desc, struct spdk_io_channe
			      uint64_t zone_id, enum spdk_bdev_zone_action action,
			      spdk_bdev_io_completion_cb cb, void *cb_arg);

/**
 * Get append location (offset in blocks of the bdev) for this I/O.
 *
 * \param bdev_io I/O to get append location from.
 */
uint64_t spdk_bdev_io_get_append_location(struct spdk_bdev_io *bdev_io);

#endif /* SPDK_BDEV_ZONE_H */
+6 −0
Original line number Diff line number Diff line
@@ -107,3 +107,9 @@ spdk_bdev_zone_management(struct spdk_bdev_desc *desc, struct spdk_io_channel *c
	spdk_bdev_io_submit(bdev_io);
	return 0;
}

uint64_t
spdk_bdev_io_get_append_location(struct spdk_bdev_io *bdev_io)
{
	return bdev_io->u.bdev.offset_blocks;
}