diff options
author | Isaac Huang <he.huang@intel.com> | 2014-06-22 21:32:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:45:06 -0400 |
commit | dee2857e2250c1c1af9d34632087e4676218bcad (patch) | |
tree | ff68ed28b3e890a498b44d572b14ecd3b6707e14 /drivers/staging/lustre/lnet/lnet/lib-md.c | |
parent | 733bd244ab1d03db5416b968500092977690a0be (diff) | |
download | op-kernel-dev-dee2857e2250c1c1af9d34632087e4676218bcad.zip op-kernel-dev-dee2857e2250c1c1af9d34632087e4676218bcad.tar.gz |
staging/lustre/lnet: abort messages whose MD has been unlinked
If LNetMDUnlink has been called, all outgoing messages
on that MD should be aborted before lnet_ni_send() is
called.
Signed-off-by: Isaac Huang <he.huang@intel.com>
Reviewed-on: http://review.whamcloud.com/8041
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4006
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet/lnet/lib-md.c')
-rw-r--r-- | drivers/staging/lustre/lnet/lnet/lib-md.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c b/drivers/staging/lustre/lnet/lnet/lib-md.c index ae643f2..d68c6e0 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-md.c +++ b/drivers/staging/lustre/lnet/lnet/lib-md.c @@ -387,7 +387,8 @@ EXPORT_SYMBOL(LNetMDBind); /** * Unlink the memory descriptor from any ME it may be linked to and release - * the internal resources associated with it. + * the internal resources associated with it. As a result, active messages + * associated with the MD may get aborted. * * This function does not free the memory region associated with the MD; * i.e., the memory the user allocated for this MD. If the ME associated with @@ -433,12 +434,11 @@ LNetMDUnlink (lnet_handle_md_t mdh) return -ENOENT; } + md->md_flags |= LNET_MD_FLAG_ABORTED; /* If the MD is busy, lnet_md_unlink just marks it for deletion, and - * when the NAL is done, the completion event flags that the MD was + * when the LND is done, the completion event flags that the MD was * unlinked. Otherwise, we enqueue an event now... */ - - if (md->md_eq != NULL && - md->md_refcount == 0) { + if (md->md_eq != NULL && md->md_refcount == 0) { lnet_build_unlink_event(md, &ev); lnet_eq_enqueue_event(md->md_eq, &ev); } |