drbd: fix potential distributed deadlock
authorLars Ellenberg <lars.ellenberg@linbit.com>
Tue, 8 Mar 2011 16:11:40 +0000 (17:11 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Tue, 24 May 2011 08:02:41 +0000 (10:02 +0200)
commit53ea433145d9a56c7ad5e69f21f5662053e00e84
treefcd581287611f2ad2e169e50c34678192fb085b3
parent600942e0fdb7ed1565d056d7305c46c7c0544a3e
drbd: fix potential distributed deadlock

We limit ourselves to a configurable maximum number of pages used as
temporary bio pages.

If the configured "max_buffers" is not big enough to match the bandwidth
of the respective deployment, a distributed deadlock could be triggered
by e.g. fast online verify and heavy application IO.

TCP connections would block on congestion, because both receivers
would wait on pages to become available.

Fortunately the respective senders in this case would be able to give
back some pages already. So do that.

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