[Drbd-dev] [PATCH 2/3] drbd: remove reliance on bdi congestion

Michael D Labriola veggiemike at sourceruckus.org
Thu Sep 8 23:13:36 CEST 2022


A serries of commits between 5.17 and 5.18 removed inode_congested()
and all it's related functions because "No bdi reports congestion any
more, so this always returns 'false'".

This commit just returns false in both places bdi_congested() was
called... which probably isn't the best long-term fix.

See upstream commits:

670d21c6e17f67535fcf16e14c772209220da9ae
6df25e58532be7a4cd6fb15bcd85805947402d91
503d4fa6ee28e8d4d201c92ac3922d1b3526f844
fe55d563d4174f13839a9b7ef7309da5031b5d93

Signed-off-by: Michael D Labriola <veggiemike at sourceruckus.org>
---
 drbd/drbd_nl.c  | 5 +----
 drbd/drbd_req.c | 3 +--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
index 79464bb7..1a126d41 100644
--- a/drbd/drbd_nl.c
+++ b/drbd/drbd_nl.c
@@ -5446,10 +5446,7 @@ static void device_to_statistics(struct device_statistics *s,
 		spin_unlock_irq(&md->uuid_lock);
 
 		s->dev_disk_flags = md->flags;
-		s->dev_lower_blocked =
-			bdi_congested(device->ldev->backing_bdev->bd_disk->bdi,
-				      (1 << WB_async_congested) |
-				      (1 << WB_sync_congested));
+		s->dev_lower_blocked = false;
 		put_ldev(device);
 	}
 	s->dev_size = get_capacity(device->vdisk);
diff --git a/drbd/drbd_req.c b/drbd/drbd_req.c
index f58bfc4a..fc7dfb8d 100644
--- a/drbd/drbd_req.c
+++ b/drbd/drbd_req.c
@@ -1274,8 +1274,7 @@ static bool remote_due_to_read_balancing(struct drbd_device *device,
 
 	switch (rbm) {
 	case RB_CONGESTED_REMOTE:
-		return bdi_read_congested(
-			device->ldev->backing_bdev->bd_disk->bdi);
+		return false;
 	case RB_LEAST_PENDING:
 		return atomic_read(&device->local_cnt) >
 			atomic_read(&peer_device->ap_pending_cnt) + atomic_read(&peer_device->rs_pending_cnt);
-- 
2.17.1



More information about the drbd-dev mailing list