]> xenbits.xensource.com Git - people/dstodden/blktap.git/commitdiff
CP-1840: Avoid potential response msg loss.
authorDaniel Stodden <daniel.stodden@citrix.com>
Thu, 9 Sep 2010 09:05:17 +0000 (02:05 -0700)
committerDaniel Stodden <daniel.stodden@citrix.com>
Thu, 9 Sep 2010 09:05:17 +0000 (02:05 -0700)
The write-message/close-connection path wouldn't even try a response
message xmit since. Note this case matters when IPC broke, normal I/O
will drain.

Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
drivers/tapdisk-control.c

index c282d60b4a9fc9deceda7bf0fe85e42468523e9d..748424fa52f2ae7272b2e57ee035146f36d41d07 100644 (file)
@@ -400,6 +400,10 @@ tapdisk_control_close_connection(struct tapdisk_ctl_conn *conn)
 {
        tapdisk_control_release_connection(conn);
 
+       if (tapdisk_ctl_conn_connected(conn))
+               /* NB. best effort for write/close sequences. */
+               tapdisk_ctl_conn_send_buf(conn);
+
        tapdisk_ctl_conn_close(conn);
 }