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
Makefile
drbd_actlog.c
drbd_bitmap.c
drbd_debugfs.c
drbd_debugfs.h
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
drbd_interval.h
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
drbd_nla.h
drbd_proc.c
drbd_protocol.h
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_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_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
drbd_strings.h
drbd_vli.h
drbd_worker.c