[PATCH 2/2] NBD: allow hung network I/O to be cancelled

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Clements
Date: Friday, August 24, 2007 - 10:40 am

This patch allows NBD I/O to be cancelled when a network outage occurs. 
Previously, I/O would just hang, and if enough I/O was hung in nbd, the 
system (at least user-level) would completely hang until a TCP timeout 
(default, 15 minutes) occurred.

The patch introduces a new ioctl NBD_SET_TIMEOUT that allows a transmit 
timeout value (in seconds) to be specified. Any network send that 
exceeds the timeout will be cancelled and the nbd connection will be 
shut down. I've tested with various timeout values and 6 seconds seems 
to be a good choice for the timeout. If the NBD_SET_TIMEOUT ioctl is not 
called, you get the old (I/O hang) behavior.

Patch applies and was tested against 2.6.23-rc2-mm2.

Thanks,
Paul
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] NBD: set uninitialized devices to size 0, Paul Clements, (Fri Aug 24, 10:06 am)
[PATCH 2/2] NBD: allow hung network I/O to be cancelled, Paul Clements, (Fri Aug 24, 10:40 am)
Re: [PATCH 1/2] NBD: set uninitialized devices to size 0, Andrew Morton, (Fri Aug 24, 4:48 pm)
Re: [PATCH 1/2] NBD: set uninitialized devices to size 0, Bill Davidsen, (Tue Aug 28, 7:54 pm)