drbd/0019-compat-fix-blk_queue_update_readahead-patch.patch
2025-01-08 07:34:16 +00:00

39 lines
1.2 KiB
Diff

From 37edd6c75cccba9b151e8b834c83832ae0382484 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?=
<christoph.boehmwalder@linbit.com>
Date: Thu, 29 Aug 2024 13:27:31 +0200
Subject: [PATCH 19/32] compat: fix blk_queue_update_readahead patch
Did not match anymore
---
.../cocci/blk_queue_update_readahead__no_present.cocci | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drbd/drbd-kernel-compat/cocci/blk_queue_update_readahead__no_present.cocci b/drbd/drbd-kernel-compat/cocci/blk_queue_update_readahead__no_present.cocci
index ed62a3426ad6..2e78f626261d 100644
--- a/drbd/drbd-kernel-compat/cocci/blk_queue_update_readahead__no_present.cocci
+++ b/drbd/drbd-kernel-compat/cocci/blk_queue_update_readahead__no_present.cocci
@@ -1,8 +1,10 @@
@@
-expression e;
-struct request_queue *q, b;
+identifier q, b;
@@
-blk_stack_limits(e, &b->limits, 0);
+struct request_queue *q;
+...
+struct request_queue *b;
+<...
- blk_queue_update_readahead(q);
+ if (q->backing_dev_info->ra_pages !=
+ b->backing_dev_info->ra_pages) {
@@ -12,3 +14,4 @@ blk_stack_limits(e, &b->limits, 0);
+ q->backing_dev_info->ra_pages =
+ b->backing_dev_info->ra_pages;
+ }
+...>
\ No newline at end of file
--
2.35.3