/* {"version":"v5.15-rc1~161", "commit": ""471aa704db4904f7af5a50019ca3b5b018c0cf62, "comment": "block: pass a gendisk to blk_queue_update_readahead"} */ diff -Naur drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd-kernel-compat/gen_patch_names.c drbd-9.0.30~1+git.8e9c0812/drbd/drbd-kernel-compat/gen_patch_names.c --- drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd-kernel-compat/gen_patch_names.c 2021-11-19 12:56:56.962529304 +0800 +++ drbd-9.0.30~1+git.8e9c0812/drbd/drbd-kernel-compat/gen_patch_names.c 2021-11-19 12:58:45.370112678 +0800 @@ -391,8 +391,10 @@ patch(1, "wb_congested_enum", true, false, COMPAT_HAVE_WB_CONGESTED_ENUM, "present"); +#ifndef COMPAT_HAVE_DISK_UPDATE_READAHEAD patch(1, "blk_queue_update_readahead", true, false, COMPAT_HAVE_BLK_QUEUE_UPDATE_READAHEAD, "present"); +#endif patch(1, "backing_dev_info", true, false, COMPAT_HAVE_POINTER_BACKING_DEV_INFO, "is_pointer"); diff -Naur drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c drbd-9.0.30~1+git.8e9c0812/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c --- drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c 1970-01-01 08:00:00.000000000 +0800 +++ drbd-9.0.30~1+git.8e9c0812/drbd/drbd-kernel-compat/tests/have_disk_update_readahead.c 2021-11-19 12:59:10.194017276 +0800 @@ -0,0 +1,9 @@ +/* { "version": "v5.16", "commit": "471aa704db4904f7af5a50019ca3b5b018c0cf62", "comment": "block: pass a gendisk to blk_queue_update_readahead", "author": "Christoph Hellwig ", "date": "Mon Aug 9 16:17:41 2021 +0200" } */ + +#include +#include + +void foo(struct gendisk *d) +{ + disk_update_readahead(d); +} diff -Naur drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_nl.c drbd-9.0.30~1+git.8e9c0812/drbd/drbd_nl.c --- drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_nl.c 2021-11-19 12:56:56.966529288 +0800 +++ drbd-9.0.30~1+git.8e9c0812/drbd/drbd_nl.c 2021-11-19 13:00:37.777680684 +0800 @@ -2124,7 +2124,11 @@ if (b) { blk_stack_limits(&q->limits, &b->limits, 0); +#ifdef COMPAT_HAVE_DISK_UPDATE_READAHEAD + disk_update_readahead(device->vdisk); +#else blk_queue_update_readahead(q); +#endif } fixup_discard_if_not_supported(q); fixup_write_zeroes(device, q);