Test that timing out a write causes a disconnect and a reconnect

This commit is contained in:
Alex Young
2012-06-28 14:45:53 +01:00
parent 4de4cee3d0
commit 9850f5d0a4
7 changed files with 83 additions and 9 deletions

View File

@@ -10,12 +10,14 @@
enum mirror_state;
#include "serve.h"
/* MS_CONNECT_TIME_SECS
* The length of time after which the sender will assume a connect() to
* the destination has failed.
*/
#define MS_CONNECT_TIME_SECS 60
/* MS_HELLO_TIME_SECS
* The length of time the sender will wait for the NBD hello message
* after connect() before aborting the connection attempt.
@@ -29,6 +31,16 @@ enum mirror_state;
*/
#define MS_RETRY_DELAY_SECS 1
/* MS_REQUEST_LIMIT_SECS
* We must receive a reply to a request within this time. For a read
* request, this is the time between the end of the NBD request and the
* start of the NBD reply. For a write request, this is the time
* between the end of the written data and the start of the NBD reply.
*/
#define MS_REQUEST_LIMIT_SECS 4
enum mirror_finish_action {
ACTION_EXIT,
ACTION_NOTHING