SHA256
1
0
forked from pool/drbd
drbd/remove_bdi_cap_stable_writes.patch

23 lines
1.0 KiB
Diff

IssueA: 1cb039f3dc1619eb795c54aad0a98fdb379b4237
BDI_CAP_STABLE_WRITES is removed.
QUEUE_FLAG_STABLE_WRITES is added
diff -Naur drbd-9.0.26~0+git.9114a038.orig/drbd/drbd-kernel-compat/drbd_wrappers.h drbd-9.0.26~0+git.9114a038/drbd/drbd-kernel-compat/drbd_wrappers.h
--- drbd-9.0.26~0+git.9114a038.orig/drbd/drbd-kernel-compat/drbd_wrappers.h 2020-12-09 14:50:32.973058449 +0800
+++ drbd-9.0.26~0+git.9114a038/drbd/drbd-kernel-compat/drbd_wrappers.h 2020-12-09 14:55:00.662701648 +0800
@@ -129,10 +129,14 @@
#ifdef BDI_CAP_STABLE_WRITES /* >= v3.9 */
#define set_bdi_cap_stable_writes(cap) do { (cap) |= BDI_CAP_STABLE_WRITES; } while (0)
+#else
+#ifdef QUEUE_FLAG_STABLE_WRITES /* >= v5.10 do nothing */
+#define set_bdi_cap_stable_writes(cap) do { } while (0)
#else /* < v3.9 */
#warning "BDI_CAP_STABLE_WRITES not available"
#define set_bdi_cap_stable_writes(cap) do { } while (0)
#endif
+#endif
#ifdef COMPAT_HAVE_POINTER_BACKING_DEV_INFO /* >= v4.11 */
#define bdi_from_device(device) (device->ldev->backing_bdev->bd_disk->queue->backing_dev_info)