drbd: Concurrent write detection fix
authorAndreas Gruenbacher <agruen@linbit.com>
Sat, 26 Feb 2011 22:19:15 +0000 (23:19 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 14 Oct 2011 14:47:49 +0000 (16:47 +0200)
commit206d3589411fbdead67a358ce9aaa20d771724df
tree984ccf39cad4e371cb84235627938f6a231d6edc
parent8050e6d00521795d153ea20d81712321e5b46d80
drbd: Concurrent write detection fix

Commit 9b1e63e changed the concurrent write detection algorithm to only insert
peer requests into write_requests tree after determining that there is no
conflict.  With this change, new conflicting local requests could be added
while the algorithm runs, but this case was not handled correctly.  Instead of
making the algorithm deal with this case, switch back to adding peer requests
to the write_requests tree immediately: this improves fairness.

When a peer request is discarded, remove that request from the write_requests

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