summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/ptlrpc/events.c
diff options
context:
space:
mode:
authorAmir Shehata <amir.shehata@intel.com>2016-10-27 18:11:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-30 10:56:15 -0400
commit8d69af0381930c9ab818cc3aa6bcf00bf328ed00 (patch)
tree4cfefeebc115c136d021188da3c1dc4281a23c7a /drivers/staging/lustre/lustre/ptlrpc/events.c
parent662e035ca5266fedd1259bcbe79a50ef4de1bd77 (diff)
staging: lustre: ptlrpc: Introduce iovec to bulk descriptor
Added a union to ptlrpc_bulk_desc for KVEC and KIOV buffers. bd_type has been changed to be a bit mask. Bits are set in bd_type to specify {put,get}{source,sink}{kvec,kiov} changed all instances in the code to access the union properly ASSUMPTION: all current code only works with KIOV and new DNE code to be added will introduce a different code path that uses IOVEC As part of the implementation buffer operations are added as callbacks to be defined by users of ptlrpc. This enables buffer users to define how to allocate and release buffers. Signed-off-by: Amir Shehata <amir.shehata@intel.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5835 Reviewed-on: http://review.whamcloud.com/12525 Reviewed-by: wangdi <di.wang@intel.com> Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ptlrpc/events.c')
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c
index 283dfb296d35..49f3e6368415 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/events.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/events.c
@@ -182,9 +182,9 @@ void client_bulk_callback(lnet_event_t *ev)
struct ptlrpc_bulk_desc *desc = cbid->cbid_arg;
struct ptlrpc_request *req;
- LASSERT((desc->bd_type == BULK_PUT_SINK &&
+ LASSERT((ptlrpc_is_bulk_put_sink(desc->bd_type) &&
ev->type == LNET_EVENT_PUT) ||
- (desc->bd_type == BULK_GET_SOURCE &&
+ (ptlrpc_is_bulk_get_source(desc->bd_type) &&
ev->type == LNET_EVENT_GET) ||
ev->type == LNET_EVENT_UNLINK);
LASSERT(ev->unlinked);