mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 20:51:27 +00:00
isert: add assertion if send/recv was posted after post drain
After post drain we are not allowed to call post_recv or post_send, because the drain must be the last flush to let us know that we may close the conection safely. Signed-off-by: Israel Rukshin <israelr@mellanox.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6943 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -75,6 +75,13 @@ int isert_post_recv(struct isert_connection *isert_conn,
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
#ifdef CONFIG_SCST_EXTRACHECKS
|
||||
if (test_bit(ISERT_DRAIN_POSTED, &isert_conn->flags)) {
|
||||
pr_err("conn:%p post recv after drain\n", isert_conn);
|
||||
BUG();
|
||||
}
|
||||
#endif
|
||||
|
||||
err = ib_post_recv(isert_conn->qp, first_ib_wr, &bad_wr);
|
||||
if (unlikely(err)) {
|
||||
num_posted = isert_num_recv_posted_on_err(first_ib_wr, bad_wr);
|
||||
@@ -115,6 +122,13 @@ int isert_post_send(struct isert_connection *isert_conn,
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
#ifdef CONFIG_SCST_EXTRACHECKS
|
||||
if (test_bit(ISERT_DRAIN_POSTED, &isert_conn->flags)) {
|
||||
pr_err("conn:%p post send after drain\n", isert_conn);
|
||||
BUG();
|
||||
}
|
||||
#endif
|
||||
|
||||
err = ib_post_send(isert_conn->qp, first_ib_wr, &bad_wr);
|
||||
if (unlikely(err)) {
|
||||
num_posted = isert_num_send_posted_on_err(first_ib_wr, bad_wr);
|
||||
|
||||
Reference in New Issue
Block a user