Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a943170 authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Philipp Reisner
Browse files

drbd: reset congestion information before reporting it in /proc/drbd



We cache the congestion status in mdev->congestion_reason whenever
drbd_congested() was called.
Reset this cached info before reporting it when reading /proc/drbd.

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 6f3465ed
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -242,6 +242,9 @@ static int drbd_seq_show(struct seq_file *seq, void *v)
		    mdev->state.role == R_SECONDARY) {
			seq_printf(seq, "%2d: cs:Unconfigured\n", i);
		} else {
			/* reset mdev->congestion_reason */
			bdi_rw_congested(&mdev->rq_queue->backing_dev_info);

			nc = rcu_dereference(mdev->tconn->net_conf);
			wp = nc ? nc->wire_protocol - DRBD_PROT_A + 'A' : ' ';
			seq_printf(seq,