android_kernel_msm-6.1_noth.../drivers/block
Lars Ellenberg 6675700139 drbd: bm_page_async_io: fix spurious bitmap "IO error" on large volumes
We usually do all our bitmap IO in units of PAGE_SIZE.

With very small or oddly sized external meta data, or with
PAGE_SIZE != 4k, it can happen that our last on-disk bitmap page
is not fully PAGE_SIZE aligned, so we may need to adjust the size
of the IO.

We used to do that with
  min_t(unsigned int, PAGE_SIZE,
	last_allowed_sector - current_offset);
And for just the right diff, (unsigned int)(diff) will result in 0.

A bio of length 0 will correctly be rejected with an IO error
(and some scary WARN_ON_ONCE()) by the scsi layer.

Do the calculation properly.

Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
Link: https://lore.kernel.org/r/20220622204932.196830-1-christoph.boehmwalder@linbit.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-08-02 17:14:31 -06:00
..
aoe block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
drbd drbd: bm_page_async_io: fix spurious bitmap "IO error" on large volumes 2022-08-02 17:14:31 -06:00
mtip32xx blk-mq: Drop 'reserved' arg of busy_tag_iter_fn 2022-07-06 06:33:53 -06:00
null_blk treewide: Rename enum req_opf into enum req_op 2022-07-14 12:14:30 -06:00
paride block: Change the type of req_op() and bio_op() into enum req_op 2022-07-14 12:14:30 -06:00
rnbd block/rnbd: Use blk_opf_t where appropriate 2022-07-14 12:14:31 -06:00
xen-blkback xen-blkback: Use the enum req_op and blk_opf_t types 2022-07-14 12:14:31 -06:00
zram block/zram: Use enum req_op where appropriate 2022-07-14 12:14:31 -06:00
amiflop.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ataflop.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
brd.c block/brd: Use the enum req_op type 2022-07-14 12:14:31 -06:00
floppy.c block/floppy: Fix a sparse warning 2022-07-14 12:14:31 -06:00
Kconfig ublk_drv: add io_uring based userspace block driver 2022-07-14 07:15:28 -06:00
loop.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
Makefile ublk_drv: add io_uring based userspace block driver 2022-07-14 07:15:28 -06:00
n64cart.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
nbd.c blk-mq: Drop 'reserved' arg of busy_tag_iter_fn 2022-07-06 06:33:53 -06:00
pktcdvd.c pktcdvd: stop using bdevname in pkt_new_dev 2022-07-14 10:27:56 -06:00
ps3disk.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ps3vram.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
rbd.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
rbd_types.h libceph, rbd: replace zero-length array with flexible-array 2020-06-01 13:22:53 +02:00
sunvdc.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim3.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
swim_asm.S
sx8.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
ublk_drv.c ublk_drv: fix double shift bug 2022-07-26 12:30:07 -06:00
virtio_blk.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
xen-blkfront.c for-5.20/block-2022-07-29 2022-08-02 13:46:35 -07:00
z2ram.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00