linux-hardened/drivers/block/drbd
Lars Ellenberg 0029d62434 drbd: do not reset rs_pending_cnt too early
Fix asserts like
  block drbd0: in got_BlockAck:4634: rs_pending_cnt = -35 < 0 !

We reset the resync lru cache and related information (rs_pending_cnt),
once we successfully finished a resync or online verify, or if the
replication connection is lost.

We also need to reset it if a resync or online verify is aborted
because a lower level disk failed.

In that case the replication link is still established,
and we may still have packets queued in the network buffers
which want to touch rs_pending_cnt.

We do not have any synchronization mechanism to know for sure when all
such pending resync related packets have been drained.

To avoid this counter to go negative (and violate the ASSERT that it
will always be >= 0), just do not reset it when we lose a disk.

It is good enough to make sure it is re-initialized before the next
resync can start: reset it when we re-attach a disk.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
2012-07-24 14:09:53 +02:00
..
drbd_actlog.c drbd: differentiate between normal and forced detach 2012-07-24 14:06:18 +02:00
drbd_bitmap.c drbd: differentiate between normal and forced detach 2012-07-24 14:06:18 +02:00
drbd_int.h drbd: report congestion if we are waiting for some userland callback 2012-07-24 14:07:18 +02:00
drbd_main.c drbd: do not reset rs_pending_cnt too early 2012-07-24 14:09:53 +02:00
drbd_nl.c drbd: do not reset rs_pending_cnt too early 2012-07-24 14:09:53 +02:00
drbd_proc.c drbd: reset congestion information before reporting it in /proc/drbd 2012-07-24 14:07:48 +02:00
drbd_receiver.c Merge branch 'for-3.5/drivers' of git://git.kernel.dk/linux-block 2012-05-30 09:05:47 -07:00
drbd_req.c drbd: differentiate between normal and forced detach 2012-07-24 14:06:18 +02:00
drbd_req.h drbd: Immediately allow completion of IOs, that wait for IO completions on a failed disk 2012-05-09 10:16:04 +02:00
drbd_strings.c drbd: Rename enum drbd_state_ret_codes to enum drbd_state_rv 2011-03-10 11:36:18 +01:00
drbd_vli.h Fix common misspellings 2011-03-31 11:26:23 -03:00
drbd_worker.c drbd: do not reset rs_pending_cnt too early 2012-07-24 14:09:53 +02:00
drbd_wrappers.h drbd: Get rid of unnecessary macros (2) 2011-03-10 11:36:15 +01:00
Kconfig drbd: Kconfig fix 2009-12-29 17:38:28 +01:00
Makefile drbd: remove tracing bits 2009-10-01 21:17:58 +02:00