libblockdriver: clear IPC only on stateful restart
This removes a race condition when the block driver performs a complete restart after a crash (the new default). If any user of the driver finds out its new endpoint and sends a request to the new driver instance before this instance has had the chance to initialize, then its initialization would clear all IPC state and thereby erroneously cancel the incoming request. Clearing IPC state is only desired upon a stateful restart (where the driver's endpoint is retained). This information is now passed to and used by libblockdriver accordingly.
This commit is contained in:
@@ -32,7 +32,7 @@ struct blockdriver {
|
||||
/* Functions defined by libblockdriver. These can be used for both
|
||||
* singlethreaded and multithreaded drivers.
|
||||
*/
|
||||
_PROTOTYPE( void blockdriver_announce, (void) );
|
||||
_PROTOTYPE( void blockdriver_announce, (int type) );
|
||||
|
||||
#ifndef _BLOCKDRIVER_MT_API
|
||||
/* Additional functions for the singlethreaded version. These allow the driver
|
||||
|
||||
Reference in New Issue
Block a user