Sometimes we like to upgrade our server without making all of our clients freak out and reconnect. This patch provides a way to specify a dead connection timeout to allow us to pause all requests and wait for new connections to be opened. With this in place I can take down the nbd server for less than the dead connection timeout time and bring it back up and everything resumes gracefully.
Showing the changes to include/uapi/linux (1 of 2 files). Show all
Unified · Split
| @@ -32,6 +32,7 @@ enum { · 31 unmodified lines | |||
| 32 | NBD_ATTR_SERVER_FLAGS, | 32 | NBD_ATTR_SERVER_FLAGS, |
| 33 | NBD_ATTR_CLIENT_FLAGS, | 33 | NBD_ATTR_CLIENT_FLAGS, |
| 34 | NBD_ATTR_SOCKETS, | 34 | NBD_ATTR_SOCKETS, |
| 35 | NBD_ATTR_DEAD_CONN_TIMEOUT, | ||
| 35 | __NBD_ATTR_MAX, | 36 | __NBD_ATTR_MAX, |
| 36 | }; | 37 | }; |
| 37 | #define NBD_ATTR_MAX (__NBD_ATTR_MAX - 1) | 38 | #define NBD_ATTR_MAX (__NBD_ATTR_MAX - 1) |