bdev/daos: using SPDK_CONTAINEROF instead of container_of

DAOS bdev was implicitly expecting `container_of` to be in daos_event.h
With upcoming DAOS release the location of `container_of` has changed.
`SPDK_CONTAINEROF` is now used in the module.

Signed-off-by: Denis Barakhtanov <denis.barahtanov@croit.io>
Change-Id: Ia88365322fef378af6b1708b8704827bca1b828d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17719
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Denis Barakhtanov 2023-04-24 10:59:41 +10:00 committed by David Ko
parent 877bb5dcac
commit 52e51a29df

View File

@ -437,7 +437,7 @@ bdev_daos_channel_poll(void *arg)
}
for (int i = 0; i < rc; ++i) {
struct bdev_daos_task *task = container_of(evp[i], struct bdev_daos_task, ev);
struct bdev_daos_task *task = SPDK_CONTAINEROF(evp[i], struct bdev_daos_task, ev);
enum spdk_bdev_io_status status = SPDK_BDEV_IO_STATUS_SUCCESS;
assert(task != NULL);