From 27cfd2212cb1f37fd4a6544cba1fe863edf08b96 Mon Sep 17 00:00:00 2001 From: rread Date: Wed, 6 Nov 2002 07:57:09 +0000 Subject: [PATCH] - wholesale renaming of the brw associated callback variables, structures and functions. Primarily distinguish between: - portals event handlers (no longer called callbacks) - brw callbacks --- lustre/include/linux/lustre_lib.h | 26 ++++++++++---------- lustre/include/linux/lustre_net.h | 4 ++-- lustre/include/linux/obd.h | 6 ++--- lustre/include/linux/obd_class.h | 2 +- lustre/llite/rw.c | 14 +++++------ lustre/lov/lov_obd.c | 30 +++++++++++------------ lustre/obdclass/class_obd.c | 10 ++++---- lustre/obdclass/genops.c | 50 +++++++++++++++++++-------------------- lustre/obdfilter/filter.c | 16 ++++++------- lustre/osc/osc_request.c | 24 +++++++++---------- lustre/ost/ost_handler.c | 2 +- lustre/ptlrpc/events.c | 8 +++---- 12 files changed, 96 insertions(+), 96 deletions(-) diff --git a/lustre/include/linux/lustre_lib.h b/lustre/include/linux/lustre_lib.h index 2588154..c9f6344 100644 --- a/lustre/include/linux/lustre_lib.h +++ b/lustre/include/linux/lustre_lib.h @@ -85,21 +85,21 @@ void l_unlock(struct lustre_lock *); * io_cb_data: io callback data merged into one struct to simplify * memory managment. This may be turn out to be too simple. */ -struct io_cb_data; -typedef int (*brw_callback_t)(struct io_cb_data *, int err, int phase); - -struct io_cb_data { - wait_queue_head_t waitq; - atomic_t refcount; - int complete; - int err; - struct ptlrpc_bulk_desc *desc; - brw_callback_t cb; - void *data; +struct brw_cb_data; +typedef int (*brw_cb_t)(struct brw_cb_data *, int err, int phase); + +struct brw_cb_data { + wait_queue_head_t brw_waitq; + atomic_t brw_refcount; + int brw_complete; + int brw_err; + struct ptlrpc_bulk_desc *brw_desc; + brw_cb_t brw_cb; + void *brw_data; }; -int ll_sync_io_cb(struct io_cb_data *data, int err, int phase); -struct io_cb_data *ll_init_cb(void); +int ll_sync_brw_cb(struct brw_cb_data *data, int err, int phase); +struct brw_cb_data *ll_init_brw_cb_data(void); /* simple.c */ struct obd_run_ctxt; diff --git a/lustre/include/linux/lustre_net.h b/lustre/include/linux/lustre_net.h index c8da853..7382e60 100644 --- a/lustre/include/linux/lustre_net.h +++ b/lustre/include/linux/lustre_net.h @@ -194,8 +194,8 @@ struct ptlrpc_bulk_desc { struct ptlrpc_client *bd_client; __u32 bd_portal; struct lustre_handle bd_conn; - void (*bd_cb)(struct ptlrpc_bulk_desc *, void *); - void *bd_cb_data; + void (*bd_ptl_ev_hdlr)(struct ptlrpc_bulk_desc *, void *); + void *bd_ptl_ev_data; wait_queue_head_t bd_waitq; struct list_head bd_page_list; diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index cb897aa..46b1ca4 100644 --- a/lustre/include/linux/obd.h +++ b/lustre/include/linux/obd.h @@ -258,7 +258,7 @@ struct obd_device { void* counters; }; -struct io_cb_data; +struct brw_cb_data; struct obd_ops { int (*o_iocontrol)(long cmd, struct lustre_handle *, int len, @@ -294,8 +294,8 @@ struct obd_ops { struct lov_stripe_md *ea); int (*o_brw)(int rw, struct lustre_handle *conn, struct lov_stripe_md *ea, obd_count oa_bufs, - struct brw_page *pgarr, brw_callback_t callback, - struct io_cb_data *data); + struct brw_page *pgarr, brw_cb_t callback, + struct brw_cb_data *data); int (*o_punch)(struct lustre_handle *conn, struct obdo *tgt, struct lov_stripe_md *ea, obd_size count, obd_off offset); diff --git a/lustre/include/linux/obd_class.h b/lustre/include/linux/obd_class.h index 451f683..8b4833c 100644 --- a/lustre/include/linux/obd_class.h +++ b/lustre/include/linux/obd_class.h @@ -328,7 +328,7 @@ static inline int obd_punch(struct lustre_handle *conn, struct obdo *oa, static inline int obd_brw(int cmd, struct lustre_handle *conn, struct lov_stripe_md *ea, obd_count oa_bufs, struct brw_page *pg, - brw_callback_t callback, struct io_cb_data *data) + brw_cb_t callback, struct brw_cb_data *data) { struct obd_export *exp; int rc; diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 92b33a8..5b240db 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -75,7 +75,7 @@ static int ll_brw(int cmd, struct inode *inode, struct page *page, int create) { struct ll_inode_info *lli = ll_i2info(inode); struct lov_stripe_md *lsm = lli->lli_smd; - struct io_cb_data *cbd = ll_init_cb(); + struct brw_cb_data *cbd = ll_init_brw_cb_data(); struct brw_page pg; int err; ENTRY; @@ -93,7 +93,7 @@ static int ll_brw(int cmd, struct inode *inode, struct page *page, int create) pg.flag = create ? OBD_BRW_CREATE : 0; - err = obd_brw(cmd, ll_i2obdconn(inode),lsm, 1, &pg, ll_sync_io_cb, cbd); + err = obd_brw(cmd, ll_i2obdconn(inode),lsm, 1, &pg, ll_sync_brw_cb, cbd); RETURN(err); } /* ll_brw */ @@ -247,7 +247,7 @@ static int ll_commit_write(struct file *file, struct page *page, struct brw_page pg; int err; loff_t size; - struct io_cb_data *cbd = ll_init_cb(); + struct brw_cb_data *cbd = ll_init_brw_cb_data(); ENTRY; pg.pg = page; @@ -267,7 +267,7 @@ static int ll_commit_write(struct file *file, struct page *page, pg.off, pg.count); err = obd_brw(OBD_BRW_WRITE, ll_i2obdconn(inode), md, - 1, &pg, ll_sync_io_cb, cbd); + 1, &pg, ll_sync_brw_cb, cbd); kunmap(page); size = pg.off + pg.count; @@ -287,7 +287,7 @@ static int ll_direct_IO(int rw, struct inode *inode, struct kiobuf *iobuf, struct lov_stripe_md *lsm = lli->lli_smd; struct brw_page *pga; int i, rc = 0; - struct io_cb_data *cbd; + struct brw_cb_data *cbd; ENTRY; if (!lsm || !lsm->lsm_object_id) @@ -298,7 +298,7 @@ static int ll_direct_IO(int rw, struct inode *inode, struct kiobuf *iobuf, RETURN(-EINVAL); } - cbd = ll_init_cb(); + cbd = ll_init_brw_cb_data(); if (!cbd) RETURN(-ENOMEM); @@ -320,7 +320,7 @@ static int ll_direct_IO(int rw, struct inode *inode, struct kiobuf *iobuf, rc = obd_brw(rw == WRITE ? OBD_BRW_WRITE : OBD_BRW_READ, ll_i2obdconn(inode), lsm, bufs_per_obdo, pga, - ll_sync_io_cb, cbd); + ll_sync_brw_cb, cbd); if (rc == 0) rc = bufs_per_obdo * PAGE_SIZE; diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 0530a82..5e5f6c0 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -982,7 +982,7 @@ static int lov_punch(struct lustre_handle *conn, struct obdo *oa, RETURN(rc); } -static int lov_osc_brw_callback(struct io_cb_data *cbd, int err, int phase) +static int lov_osc_brw_cb(struct brw_cb_data *brw_cbd, int err, int phase) { int ret = 0; ENTRY; @@ -992,9 +992,9 @@ static int lov_osc_brw_callback(struct io_cb_data *cbd, int err, int phase) if (phase == CB_PHASE_FINISH) { if (err) - cbd->err = err; - if (atomic_dec_and_test(&cbd->refcount)) - ret = cbd->cb(cbd->data, cbd->err, phase); + brw_cbd->brw_err = err; + if (atomic_dec_and_test(&brw_cbd->brw_refcount)) + ret = brw_cbd->brw_cb(brw_cbd->brw_data, brw_cbd->brw_err, phase); RETURN(ret); } @@ -1005,7 +1005,7 @@ static int lov_osc_brw_callback(struct io_cb_data *cbd, int err, int phase) static inline int lov_brw(int cmd, struct lustre_handle *conn, struct lov_stripe_md *lsm, obd_count oa_bufs, struct brw_page *pga, - brw_callback_t callback, struct io_cb_data *cbd) + brw_cb_t brw_cb, struct brw_cb_data *brw_cbd) { int stripe_count = lsm->lsm_stripe_count; struct obd_export *export = class_conn2export(conn); @@ -1019,7 +1019,7 @@ static inline int lov_brw(int cmd, struct lustre_handle *conn, } *stripeinfo, *si, *si_last; struct brw_page *ioarr; int rc, i; - struct io_cb_data *our_cb; + struct brw_cb_data *osc_brw_cbd; struct lov_oinfo *loi; int *where; ENTRY; @@ -1037,8 +1037,8 @@ static inline int lov_brw(int cmd, struct lustre_handle *conn, lov = &export->exp_obd->u.lov; - our_cb = ll_init_cb(); - if (!our_cb) + osc_brw_cbd = ll_init_brw_cb_data(); + if (!osc_brw_cbd) RETURN(-ENOMEM); OBD_ALLOC(stripeinfo, stripe_count * sizeof(*stripeinfo)); @@ -1055,14 +1055,14 @@ static inline int lov_brw(int cmd, struct lustre_handle *conn, /* This is the only race-free way I can think of to get the refcount * correct. -phil */ - atomic_set(&our_cb->refcount, 0); - our_cb->cb = callback; - our_cb->data = cbd; + atomic_set(&osc_brw_cbd->brw_refcount, 0); + osc_brw_cbd->brw_cb = brw_cb; + osc_brw_cbd->brw_data = brw_cbd; for (i = 0; i < oa_bufs; i++) { where[i] = lov_stripe_number(lsm, pga[i].off); if (stripeinfo[where[i]].bufct++ == 0) - atomic_inc(&our_cb->refcount); + atomic_inc(&osc_brw_cbd->brw_refcount); } for (i = 0, loi = lsm->lsm_oinfo, si_last = si = stripeinfo; @@ -1092,11 +1092,11 @@ static inline int lov_brw(int cmd, struct lustre_handle *conn, /* XXX handle error returns here */ obd_brw(cmd, &lov->tgts[si->ost_idx].conn, &si->lsm, si->bufct, &ioarr[shift], - lov_osc_brw_callback, our_cb); + lov_osc_brw_cb, osc_brw_cbd); } } - rc = callback(cbd, 0, CB_PHASE_START); + rc = brw_cb(brw_cbd, 0, CB_PHASE_START); OBD_FREE(ioarr, sizeof(*ioarr) * oa_bufs); out_where: @@ -1104,7 +1104,7 @@ static inline int lov_brw(int cmd, struct lustre_handle *conn, out_sinfo: OBD_FREE(stripeinfo, stripe_count * sizeof(*stripeinfo)); out_cbdata: - OBD_FREE(our_cb, sizeof(*our_cb)); + OBD_FREE(osc_brw_cbd, sizeof(*osc_brw_cbd)); RETURN(rc); } diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c index 58d5ff7..f43f8a5 100644 --- a/lustre/obdclass/class_obd.c +++ b/lustre/obdclass/class_obd.c @@ -549,7 +549,7 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp, case OBD_IOC_BRW_READ: { struct lov_stripe_md tmp_lsm; // XXX fill in from create struct lov_stripe_md *lsm = &tmp_lsm; // XXX fill in from create - struct io_cb_data *cbd = ll_init_cb(); + struct brw_cb_data *brw_cbd = ll_init_brw_cb_data(); obd_count pages = 0; struct brw_page *pga, *pgp; __u64 id = data->ioc_obdo1.o_id; @@ -558,7 +558,7 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp, __u64 off; int j; - if (!cbd) + if (!brw_cbd) GOTO(out, err = -ENOMEM); obd_data2conn(&conn, data); @@ -601,7 +601,7 @@ static int obd_class_ioctl (struct inode * inode, struct file * filp, } } - err = obd_brw(rw, &conn, lsm, j, pga, ll_sync_io_cb, cbd); + err = obd_brw(rw, &conn, lsm, j, pga, ll_sync_brw_cb, brw_cbd); if (err) CERROR("test_brw: error from obd_brw: err = %d\n", err); EXIT; @@ -690,8 +690,8 @@ EXPORT_SYMBOL(class_uuid_unparse); //EXPORT_SYMBOL(class_multi_cleanup); EXPORT_SYMBOL(class_signal_connection_failure); -EXPORT_SYMBOL(ll_sync_io_cb); -EXPORT_SYMBOL(ll_init_cb); +EXPORT_SYMBOL(ll_sync_brw_cb); +EXPORT_SYMBOL(ll_init_brw_cb_data); EXPORT_SYMBOL(class_nm_to_type); static int __init init_obdclass(void) diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 91943a9..c996e62 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -29,14 +29,14 @@ int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c); /* I would prefer if these next four functions were in ptlrpc, to be honest, * but obdclass uses them for the netregression ioctls. -phil */ -static int sync_io_timeout(void *data) +static int ll_sync_brw_timeout(void *data) { - struct io_cb_data *cbd = data; + struct brw_cb_data *brw_cbd = data; struct ptlrpc_bulk_desc *desc; ENTRY; - LASSERT(cbd); - desc = cbd->desc; + LASSERT(brw_cbd); + desc = brw_cbd->brw_desc; if (!desc) { CERROR("no desc for timed-out BRW, reopen Bugzilla 214!\n"); @@ -61,36 +61,36 @@ static int sync_io_timeout(void *data) RETURN(1); } -static int sync_io_intr(void *data) +static int ll_sync_brw_intr(void *data) { - struct io_cb_data *cbd = data; - struct ptlrpc_bulk_desc *desc = cbd->desc; + struct brw_cb_data *brw_cbd = data; + struct ptlrpc_bulk_desc *desc = brw_cbd->brw_desc; ENTRY; desc->bd_flags |= PTL_RPC_FL_INTR; RETURN(1); /* ignored, as of this writing */ } -int ll_sync_io_cb(struct io_cb_data *data, int err, int phase) +int ll_sync_brw_cb(struct brw_cb_data *brw_cbd, int err, int phase) { int ret; ENTRY; if (phase == CB_PHASE_START) { struct l_wait_info lwi; - lwi = LWI_TIMEOUT_INTR(obd_timeout * HZ, sync_io_timeout, - sync_io_intr, data); - ret = l_wait_event(data->waitq, data->complete, &lwi); - if (atomic_dec_and_test(&data->refcount)) - OBD_FREE(data, sizeof(*data)); + lwi = LWI_TIMEOUT_INTR(obd_timeout * HZ, ll_sync_brw_timeout, + ll_sync_brw_intr, brw_cbd); + ret = l_wait_event(brw_cbd->brw_waitq, brw_cbd->brw_complete, &lwi); + if (atomic_dec_and_test(&brw_cbd->brw_refcount)) + OBD_FREE(brw_cbd, sizeof(*brw_cbd)); if (ret == -EINTR) RETURN(ret); } else if (phase == CB_PHASE_FINISH) { - data->err = err; - data->complete = 1; - wake_up(&data->waitq); - if (atomic_dec_and_test(&data->refcount)) - OBD_FREE(data, sizeof(*data)); + brw_cbd->brw_err = err; + brw_cbd->brw_complete = 1; + wake_up(&brw_cbd->brw_waitq); + if (atomic_dec_and_test(&brw_cbd->brw_refcount)) + OBD_FREE(brw_cbd, sizeof(*brw_cbd)); RETURN(err); } else LBUG(); @@ -98,16 +98,16 @@ int ll_sync_io_cb(struct io_cb_data *data, int err, int phase) return 0; } -struct io_cb_data *ll_init_cb(void) +struct brw_cb_data *ll_init_brw_cb_data(void) { - struct io_cb_data *d; + struct brw_cb_data *brw_cbd; - OBD_ALLOC(d, sizeof(*d)); - if (d) { - init_waitqueue_head(&d->waitq); - atomic_set(&d->refcount, 2); + OBD_ALLOC(brw_cbd, sizeof(*brw_cbd)); + if (brw_cbd) { + init_waitqueue_head(&brw_cbd->brw_waitq); + atomic_set(&brw_cbd->brw_refcount, 2); } - RETURN(d); + RETURN(brw_cbd); } /* diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index d31e175..1177e28 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -947,8 +947,8 @@ static int filter_truncate(struct lustre_handle *conn, struct obdo *oa, static int filter_pgcache_brw(int cmd, struct lustre_handle *conn, struct lov_stripe_md *lsm, obd_count oa_bufs, - struct brw_page *pga, brw_callback_t callback, - struct io_cb_data *data) + struct brw_page *pga, brw_cb_t callback, + struct brw_cb_data *data) { struct obd_export *export = class_conn2export(conn); struct obd_run_ctxt saved; @@ -1703,9 +1703,9 @@ int filter_copy_data(struct lustre_handle *dst_conn, struct obdo *dst, */ while (index < ((src->o_size + PAGE_SIZE - 1) >> PAGE_SHIFT)) { struct brw_page pg; - struct io_cb_data *cbd = ll_init_cb(); + struct brw_cb_data *brw_cbd = ll_init_brw_cb_data(); - if (!cbd) { + if (!brw_cbd) { err = -ENOMEM; EXIT; break; @@ -1718,15 +1718,15 @@ int filter_copy_data(struct lustre_handle *dst_conn, struct obdo *dst, page->index = index; err = obd_brw(OBD_BRW_READ, src_conn, &srcmd, 1, &pg, - ll_sync_io_cb, cbd); + ll_sync_brw_cb, brw_cbd); if ( err ) { EXIT; break; } - cbd = ll_init_cb(); - if (!cbd) { + brw_cbd = ll_init_brw_cb_data(); + if (!brw_cbd) { err = -ENOMEM; EXIT; break; @@ -1735,7 +1735,7 @@ int filter_copy_data(struct lustre_handle *dst_conn, struct obdo *dst, CDEBUG(D_INFO, "Read page %ld ...\n", page->index); err = obd_brw(OBD_BRW_WRITE, dst_conn, &dstmd, 1, &pg, - ll_sync_io_cb, cbd); + ll_sync_brw_cb, brw_cbd); /* XXX should handle dst->o_size, dst->o_blocks here */ if ( err ) { diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 6de5d7e..4a21bd3 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -307,7 +307,7 @@ static int osc_destroy(struct lustre_handle *conn, struct obdo *oa, } struct osc_brw_cb_data { - brw_callback_t callback; + brw_cb_t callback; void *cb_data; void *obd_data; size_t obd_size; @@ -332,7 +332,7 @@ static void unmap_and_decref_bulk_desc(void *data) EXIT; } -static void brw_finish(struct ptlrpc_bulk_desc *desc, void *data) +static void osc_ptl_ev_hdlr(struct ptlrpc_bulk_desc *desc, void *data) { struct osc_brw_cb_data *cb_data = data; int err = 0; @@ -360,7 +360,7 @@ static void brw_finish(struct ptlrpc_bulk_desc *desc, void *data) static int osc_brw_read(struct lustre_handle *conn, struct lov_stripe_md *lsm, obd_count page_count, struct brw_page *pga, - brw_callback_t callback, struct io_cb_data *data) + brw_cb_t callback, struct brw_cb_data *data) { struct ptlrpc_connection *connection = client_conn2cli(conn)->cl_import.imp_connection; @@ -388,7 +388,7 @@ static int osc_brw_read(struct lustre_handle *conn, struct lov_stripe_md *lsm, if (!desc) GOTO(out_req, rc = -ENOMEM); desc->bd_portal = OST_BULK_PORTAL; - desc->bd_cb = brw_finish; + desc->bd_ptl_ev_hdlr = osc_ptl_ev_hdlr; OBD_ALLOC(cb_data, sizeof(*cb_data)); if (!cb_data) GOTO(out_desc, rc = -ENOMEM); @@ -396,8 +396,8 @@ static int osc_brw_read(struct lustre_handle *conn, struct lov_stripe_md *lsm, cb_data->callback = callback; cb_data->cb_data = data; CDEBUG(D_PAGE, "data(%p)->desc = %p\n", data, desc); - data->desc = desc; - desc->bd_cb_data = cb_data; + data->brw_desc = desc; + desc->bd_ptl_ev_data = cb_data; iooptr = lustre_msg_buf(request->rq_reqmsg, 1); nioptr = lustre_msg_buf(request->rq_reqmsg, 2); @@ -478,7 +478,7 @@ out_desc: static int osc_brw_write(struct lustre_handle *conn, struct lov_stripe_md *md, obd_count page_count, struct brw_page *pga, - brw_callback_t callback, struct io_cb_data *data) + brw_cb_t callback, struct brw_cb_data *data) { struct ptlrpc_connection *connection = client_conn2cli(conn)->cl_import.imp_connection; @@ -507,7 +507,7 @@ static int osc_brw_write(struct lustre_handle *conn, struct lov_stripe_md *md, if (!desc) GOTO(out_req, rc = -ENOMEM); desc->bd_portal = OSC_BULK_PORTAL; - desc->bd_cb = brw_finish; + desc->bd_ptl_ev_hdlr = osc_ptl_ev_hdlr; OBD_ALLOC(cb_data, sizeof(*cb_data)); if (!cb_data) GOTO(out_desc, rc = -ENOMEM); @@ -515,8 +515,8 @@ static int osc_brw_write(struct lustre_handle *conn, struct lov_stripe_md *md, cb_data->callback = callback; cb_data->cb_data = data; CDEBUG(D_PAGE, "data(%p)->desc = %p\n", data, desc); - data->desc = desc; - desc->bd_cb_data = cb_data; + data->brw_desc = desc; + desc->bd_ptl_ev_data = cb_data; iooptr = lustre_msg_buf(request->rq_reqmsg, 1); nioptr = lustre_msg_buf(request->rq_reqmsg, 2); @@ -612,8 +612,8 @@ out_desc: static int osc_brw(int cmd, struct lustre_handle *conn, struct lov_stripe_md *md, obd_count page_count, - struct brw_page *pga, brw_callback_t callback, - struct io_cb_data *data) + struct brw_page *pga, brw_cb_t callback, + struct brw_cb_data *data) { ENTRY; diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 19dad2f..513d24b 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -373,7 +373,7 @@ static int ost_brw_write(struct ptlrpc_request *req) desc = ptlrpc_prep_bulk(req->rq_connection); if (desc == NULL) GOTO(fail_preprw, rc = -ENOMEM); - desc->bd_cb = NULL; + desc->bd_ptl_ev_hdlr = NULL; desc->bd_portal = OSC_BULK_PORTAL; desc->bd_desc_private = desc_priv; memcpy(&(desc->bd_conn), &conn, sizeof(conn)); diff --git a/lustre/ptlrpc/events.c b/lustre/ptlrpc/events.c index 38bcd9c..e7f6f4e 100644 --- a/lustre/ptlrpc/events.c +++ b/lustre/ptlrpc/events.c @@ -175,8 +175,8 @@ static int bulk_source_callback(ptl_event_t *ev) } desc->bd_flags |= PTL_BULK_FL_SENT; wake_up(&desc->bd_waitq); - if (desc->bd_cb != NULL) - desc->bd_cb(desc, desc->bd_cb_data); + if (desc->bd_ptl_ev_hdlr != NULL) + desc->bd_ptl_ev_hdlr(desc, desc->bd_ptl_ev_data); } RETURN(0); @@ -213,8 +213,8 @@ static int bulk_sink_callback(ptl_event_t *ev) desc->bd_flags |= PTL_BULK_FL_RCVD; wake_up(&desc->bd_waitq); - if (desc->bd_cb != NULL) - desc->bd_cb(desc, desc->bd_cb_data); + if (desc->bd_ptl_ev_hdlr != NULL) + desc->bd_ptl_ev_hdlr(desc, desc->bd_ptl_ev_data); } else { CERROR("Unexpected event type!\n"); LBUG(); -- 1.8.3.1