WSL2-Linux-Kernel/drivers/block/drbd
Christoph Böhmwalder 3c9b08a169 drbd: correctly submit flush bio on barrier
commit 3899d94e38 upstream.

When we receive a flush command (or "barrier" in DRBD), we currently use
a REQ_OP_FLUSH with the REQ_PREFLUSH flag set.

The correct way to submit a flush bio is by using a REQ_OP_WRITE without
any data, and set the REQ_PREFLUSH flag.

Since commit b4a6bb3a67 ("block: add a sanity check for non-write
flush/fua bios"), this triggers a warning in the block layer, but this
has been broken for quite some time before that.

So use the correct set of flags to actually make the flush happen.

Cc: Christoph Hellwig <hch@infradead.org>
Cc: stable@vger.kernel.org
Fixes: f9ff0da564 ("drbd: allow parallel flushes for multi-volume resources")
Reported-by: Thomas Voegtle <tv@lio96.de>
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20230503121937.17232-1-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-17 11:50:31 +02:00
..
Kconfig Replace HTTP links with HTTPS ones: DRBD driver 2020-07-05 14:16:44 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_actlog.c drbd: remove bio_alloc_drbd 2021-01-27 09:51:48 -07:00
drbd_bitmap.c drbd: remove bio_alloc_drbd 2021-01-27 09:51:48 -07:00
drbd_debugfs.c block: drbd: no need to check return value of debugfs_create functions 2019-06-20 03:28:16 -06:00
drbd_debugfs.h block: drbd: no need to check return value of debugfs_create functions 2019-06-20 03:28:16 -06:00
drbd_int.h drbd: Fix five use after free bugs in get_initial_state 2022-04-13 20:59:19 +02:00
drbd_interval.c block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header 2021-04-06 09:21:53 -06:00
drbd_interval.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_main.c drbd: destroy workqueue when drbd device was freed 2022-12-31 13:14:12 +01:00
drbd_nl.c drbd: Fix five use after free bugs in get_initial_state 2022-04-13 20:59:19 +02:00
drbd_nla.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
drbd_nla.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_proc.c drbd: remove a bogus bdi_rw_congested call 2020-07-08 17:05:53 -06:00
drbd_protocol.h drbd: Replace zero-length array with flexible-array 2020-06-15 23:08:31 -05:00
drbd_receiver.c drbd: correctly submit flush bio on barrier 2023-05-17 11:50:31 +02:00
drbd_req.c block: handle bio_split_to_limits() NULL return 2023-01-18 11:48:58 +01:00
drbd_req.h drbd: remove drbd_req_make_private_bio 2021-01-27 09:51:48 -07:00
drbd_state.c drbd: Fix five use after free bugs in get_initial_state 2022-04-13 20:59:19 +02:00
drbd_state.h drbd: Change drbd_request_detach_interruptible's return type to int 2018-12-20 09:51:31 -07:00
drbd_state_change.h drbd: Fix five use after free bugs in get_initial_state 2022-04-13 20:59:19 +02:00
drbd_strings.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_strings.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
drbd_vli.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_worker.c drbd: remove drbd_req_make_private_bio 2021-01-27 09:51:48 -07:00