]> git.karo-electronics.de Git - linux-beck.git/commit
drbd: fix potential data divergence after multiple failures
authorLars Ellenberg <lars.ellenberg@linbit.com>
Mon, 18 Oct 2010 21:04:07 +0000 (23:04 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 22 Oct 2010 13:50:27 +0000 (15:50 +0200)
commit6719fb036cea56a5ee9d0ac912ed8c7cabb27f49
treeeed4e4d3161cc6f7a4009c5c856e88c6707c88a3
parent82f59cc6353889b426cf13b6596d5a3d100fa09e
drbd: fix potential data divergence after multiple failures

If we get an IO-error during an activity log transaction,
if we failed to write the bitmap of the evicted extent,
we must not write the transaction itself.
If we failed to write the transaction,
we must not even submit the corresponding bio,
as its extent is not yet marked in the activity log.

Otherwise, if this was a disconneted Primary (degraded cluster), which
now lost its disk as well, and we later re-attach the same backend
storage, we possibly "forget" to resync some parts of the disk that
potentially have been changed.

On the receiving side, when receiving from a peer with unhealthy disk,
checking for pdsk == D_DISKLESS is not enough, we need to set out of
sync and do AL transactions for everything pdsk < D_INCONSISTENT on the
receiving side.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_actlog.c
drivers/block/drbd/drbd_receiver.c
drivers/block/drbd/drbd_req.c