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: Wojciech Malikowski <wojciech.malikowski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469164 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
parent
8a2527836d
commit
a9e6fadf3e
@ -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,
|
uint64_t zone_id, enum spdk_bdev_zone_action action,
|
||||||
spdk_bdev_io_completion_cb cb, void *cb_arg);
|
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 */
|
#endif /* SPDK_BDEV_ZONE_H */
|
||||||
|
@ -107,3 +107,9 @@ spdk_bdev_zone_management(struct spdk_bdev_desc *desc, struct spdk_io_channel *c
|
|||||||
spdk_bdev_io_submit(bdev_io);
|
spdk_bdev_io_submit(bdev_io);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t
|
||||||
|
spdk_bdev_io_get_append_location(struct spdk_bdev_io *bdev_io)
|
||||||
|
{
|
||||||
|
return bdev_io->u.bdev.offset_blocks;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user