4e5f7cbf78
- drbd: fix build error against kernel v6.1.1 (bsc#1206791) * update bsc-1201335_06-bdi.patch commit log (no code change) + bsc-1201335_06-bdi.patch * update bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch (no code change) + bsc-1202600_02-dax-introduce-DAX_RECOVERY_WRITE-dax-access-mode.patch * using upstream patch to replace exist patch - bsc-1204596_02-drbd-stop-using-bdevname-in-drbd_report_io_error.patch + bsc-1204596_02-drbd-remove-usage-of-bdevname.patch * add new patches + bsc-1206791-01-drbd-add-comments-explaining-removal-of-bdi-congesti.patch + bsc-1206791-02-drbd-fix-static-analysis-warnings.patch + bsc-1206791-03-drbd-fix-warning-about-initializing-multiple-struct-.patch + bsc-1206791-04-blk_queue_split__no_present.patch + bsc-1206791-05-prandom_u32_max.patch + bsc-1206791-06-write_zeroes__no_capable.patch + bsc-1206791-07-drbd-fix-use-after-free-bugs-in-get_initial_state.patch + bsc-1206791-08-lib-lru_cache-Fixed-array-overflow-caused-by-incorre.patch + bsc-1206791-09-pmem-use-fs_dax_get_by_bdev-instead-of-dax_get_by_ho.patch OBS-URL: https://build.opensuse.org/request/show/1056192 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=142
53 lines
1.8 KiB
Diff
53 lines
1.8 KiB
Diff
From c89bb88cde9349b11dbf255e762203c626e70d30 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?=
|
|
<christoph.boehmwalder@linbit.com>
|
|
Date: Mon, 3 Oct 2022 14:49:55 +0200
|
|
Subject: [PATCH] drbd: add comments explaining removal of bdi congestion
|
|
|
|
The bdi congestion tracking framework was removed, so this leaves a few
|
|
confusing places where we just blindly set a "congested" flag to false.
|
|
Add some comments, briefly explaining the history of why it is like
|
|
that.
|
|
|
|
---
|
|
by heming.zhao@suse.com:
|
|
bsc-1201335_06-bdi.patch followed upstream patch b807a2c5e0e2, which
|
|
removed s->dev_lower_blocked from device_to_statistics(). But drbd main
|
|
branch latest code still keep s->dev_lower_blocked, I used this patch
|
|
to restore s->dev_lower_blocked.
|
|
|
|
---
|
|
|
|
diff --git a/drbd/drbd_nl.c b/drbd/drbd_nl.c
|
|
index 020372fdb258..6a2afd184ae6 100644
|
|
--- a/drbd/drbd_nl.c
|
|
+++ b/drbd/drbd_nl.c
|
|
@@ -5514,6 +5514,10 @@ static void device_to_statistics(struct device_statistics *s,
|
|
spin_unlock_irq(&md->uuid_lock);
|
|
|
|
s->dev_disk_flags = md->flags;
|
|
+ /* originally, this used the bdi congestion framework,
|
|
+ * but that was removed in linux 5.18.
|
|
+ * so just never report the lower device as 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 e5098bf8b26c..02dbc61946ca 100644
|
|
--- a/drbd/drbd_req.c
|
|
+++ b/drbd/drbd_req.c
|
|
@@ -1275,6 +1275,9 @@ static bool remote_due_to_read_balancing(struct drbd_device *device,
|
|
|
|
switch (rbm) {
|
|
case RB_CONGESTED_REMOTE:
|
|
+ /* originally, this used the bdi congestion framework,
|
|
+ * but that was removed in linux 5.18.
|
|
+ * so just never report the lower device as congested. */
|
|
return false;
|
|
case RB_LEAST_PENDING:
|
|
return atomic_read(&device->local_cnt) >
|
|
--
|
|
2.26.2
|
|
|