]> Zhao Yanbai Git Server - minix.git/commit
libblockdriver: clear IPC only on stateful restart
authorDavid van Moolenbroek <david@minix3.org>
Sun, 11 Dec 2011 21:36:19 +0000 (22:36 +0100)
committerDavid van Moolenbroek <david@minix3.org>
Sun, 11 Dec 2011 21:36:19 +0000 (22:36 +0100)
commit4005bba43735bb8075aed6b78678562ee597c3f5
tree01bf0c9fae4648ceef335f14d967d0926b2aa915
parent95d1f25b289cc6703e084205f1dd8acb98475030
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.
common/include/minix/blockdriver.h
drivers/ahci/ahci.c
drivers/at_wini/at_wini.c
drivers/bios_wini/bios_wini.c
drivers/filter/main.c
drivers/floppy/floppy.c
lib/libblockdriver/driver.c