mirror-linux/drivers/block
Christoph Böhmwalder acffdf1a7f 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-11 23:03:39 +09:00
..
aoe
drbd drbd: correctly submit flush bio on barrier 2023-05-11 23:03:39 +09:00
mtip32xx
null_blk block: null_blk: Fix handling of fake timeout request 2023-03-22 13:33:47 +01:00
paride
rnbd block/rnbd-clt: fix wrong max ID in ida_alloc_max 2023-02-01 08:34:21 +01:00
xen-blkback
zram
Kconfig
Makefile
amiflop.c
ataflop.c
brd.c brd: use radix_tree_maybe_preload instead of radix_tree_preload 2023-03-10 09:34:34 +01:00
floppy.c floppy: Fix memory leak in do_floppy_init() 2022-12-31 13:33:11 +01:00
loop.c loop: LOOP_CONFIGURE: send uevents for partitions 2023-04-06 12:10:47 +02:00
n64cart.c
nbd.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
pktcdvd.c pktcdvd: check for NULL returna fter calling bio_split_to_limits() 2023-01-24 07:24:37 +01:00
ps3disk.c
ps3vram.c block: handle bio_split_to_limits() NULL return 2023-01-18 11:58:33 +01:00
rbd.c rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails 2023-03-10 09:34:25 +01:00
rbd_types.h
sunvdc.c block: sunvdc: add check for mdesc_grab() returning NULL 2023-03-22 13:33:47 +01:00
swim.c
swim3.c
swim_asm.S
ublk_drv.c block: ublk_drv: mark device as LIVE before adding disk 2023-04-20 12:35:11 +02:00
virtio_blk.c virtio_blk: Fix signedness bug in virtblk_prep_rq() 2023-01-12 12:02:54 +01:00
xen-blkfront.c
z2ram.c