ocf: pass vbdev in callback of mngt_ interface
Add vbdev as another argument in callback of vbdev management operations. This is nice for async version of vbdev_ocf_construct() which uses mngt_ interface and creates vbdev structure. Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com> Change-Id: I8c88e0a881855b9f22fcf1f8174c888f3cfd6828 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452145 Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@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
57706d1824
commit
8d3d32b982
@ -131,7 +131,7 @@ vbdev_ocf_mngt_continue(struct vbdev_ocf *vbdev, int status)
|
||||
|
||||
spdk_poller_unregister(&vbdev->mngt_ctx.poller);
|
||||
if (vbdev->mngt_ctx.cb) {
|
||||
vbdev->mngt_ctx.cb(vbdev->mngt_ctx.status, vbdev->mngt_ctx.cb_arg);
|
||||
vbdev->mngt_ctx.cb(vbdev->mngt_ctx.status, vbdev, vbdev->mngt_ctx.cb_arg);
|
||||
}
|
||||
memset(&vbdev->mngt_ctx, 0, sizeof(vbdev->mngt_ctx));
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ struct vbdev_ocf_config {
|
||||
|
||||
/* Types for management operations */
|
||||
typedef void (*vbdev_ocf_mngt_fn)(struct vbdev_ocf *);
|
||||
typedef void (*vbdev_ocf_mngt_callback)(int, void *);
|
||||
typedef void (*vbdev_ocf_mngt_callback)(int, struct vbdev_ocf *, void *);
|
||||
|
||||
/* Context for asynchronous management operations
|
||||
* Single management operation usually contains a list of sub procedures,
|
||||
|
Loading…
x
Reference in New Issue
Block a user