Commit be0e822
block: fix queue limits checks in blk_rq_map_user_bvec for real
blk_rq_map_user_bvec currently only has ad-hoc checks for queue limits,
and the last fix to it enabled valid NVMe I/O to pass, but also allowed
invalid one for drivers that set a max_segment_size or seg_boundary
limit.
Fix it once for all by using the bio_split_rw_at helper from the I/O
path that indicates if and where a bio would be have to be split to
adhere to the queue limits, and it returns a positive value, turn that
into -EREMOTEIO to retry using the copy path.
Fixes: 2ff9494 ("block: fix sanity checks in blk_rq_map_user_bvec")
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: John Garry <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 2ff9494 commit be0e822
1 file changed
+17
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
570 | 567 | | |
571 | | - | |
| 568 | + | |
572 | 569 | | |
573 | | - | |
574 | | - | |
575 | | - | |
| 570 | + | |
576 | 571 | | |
577 | 572 | | |
578 | | - | |
| 573 | + | |
579 | 574 | | |
580 | | - | |
| 575 | + | |
581 | 576 | | |
582 | | - | |
583 | 577 | | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | 578 | | |
605 | | - | |
606 | | - | |
607 | | - | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
608 | 587 | | |
| 588 | + | |
| 589 | + | |
609 | 590 | | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | 591 | | |
614 | 592 | | |
615 | 593 | | |
| |||
0 commit comments