Is memory management ready for this? Can't deadlock like this happen?
- displaying dialog window needs memory, so it waits until memory will
be available
- system decides to write some write-back cached data in order to free
memory
- the write of these data waits until the dialog window is displayed,
user inserts the device and clicks 'OK'
No, it's not, and deadlock is definitely possible. However, if we're at
the point where memory is tight enough that it's an issue, the timer can
expire and all the pending i/o is dropped just as it would be without
the multipath code enabled.
I'm not saying it's a solution ready for production, just a good
starting point.