aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2012-07-30 03:09:36 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-08 10:58:39 -0500
commit8a943170711b7a4d63528ea8eb6a41cc91e79309 (patch)
tree78d320ada007a1c98c5896fa158d5d23b4778de7 /drivers/block/drbd
parent6f3465ed82b10922effe364676103cbd4f2bcd81 (diff)
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: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_proc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_proc.c b/drivers/block/drbd/drbd_proc.c
index 64e0ddbf0668..e0f0d2a6d538 100644
--- a/drivers/block/drbd/drbd_proc.c
+++ b/drivers/block/drbd/drbd_proc.c
@@ -242,6 +242,9 @@ static int drbd_seq_show(struct seq_file *seq, void *v)
242 mdev->state.role == R_SECONDARY) { 242 mdev->state.role == R_SECONDARY) {
243 seq_printf(seq, "%2d: cs:Unconfigured\n", i); 243 seq_printf(seq, "%2d: cs:Unconfigured\n", i);
244 } else { 244 } else {
245 /* reset mdev->congestion_reason */
246 bdi_rw_congested(&mdev->rq_queue->backing_dev_info);
247
245 nc = rcu_dereference(mdev->tconn->net_conf); 248 nc = rcu_dereference(mdev->tconn->net_conf);
246 wp = nc ? nc->wire_protocol - DRBD_PROT_A + 'A' : ' '; 249 wp = nc ? nc->wire_protocol - DRBD_PROT_A + 'A' : ' ';
247 seq_printf(seq, 250 seq_printf(seq,