Messages in this thread | | | Date | Tue, 29 Jan 2008 00:50:21 +0100 | From | Stefan Richter <> | Subject | Re: [PATCH] firewire: fail open() quickly if the node doesn't exist anymore |
| |
Jarod Wilson wrote: > On Sunday 27 January 2008 12:21:56 pm Stefan Richter wrote: >> Scenario: Process A keeps the character device file of node N open. >> N is being unplugged. File /dev/fwN won't be destroyed as long as A >> doesn't close it. Now, process B opens /dev/fwN as well. Previously >> it would succeed but be unable to do any IO on it of course. With this >> patch, process B's open() will fail immediately with -ENODEV.
> Makes perfect sense to me, no problems with it in cursory testing.
Actually I have 2nd thoughts about it. Clients should have a general way to know that a device went away. (I.e. distinguish I/O errors from mere stale generation from I/O errors due to the node being gone for good.) I will check tomorrow if the ABI does this distinction already. If yes, we don't need the patch. (But might still need improvements in libraw1394 or/and clients to fail fast when appropriate.) -- Stefan Richter -=====-==--- ---= ===-= http://arcgraph.de/sr/
| |