Commit 26064d3
block: fix adding folio to bio
>4GB folio is possible on some ARCHs, such as aarch64, 16GB hugepage
is supported, then 'offset' of folio can't be held in 'unsigned int',
cause warning in bio_add_folio_nofail() and IO failure.
Fix it by adjusting 'page' & trimming 'offset' so that `->bi_offset` won't
be overflow, and folio can be added to bio successfully.
Fixes: ed9832b ("block: introduce folio awareness and add a bigger size from folio")
Cc: Kundan Kumar <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Luis Chamberlain <[email protected]>
Cc: Gavin Shan <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Reviewed-by: Matthew Wilcox (Oracle) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 61667cb commit 26064d3
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
| 1029 | + | |
| 1030 | + | |
1029 | 1031 | | |
1030 | | - | |
1031 | | - | |
| 1032 | + | |
1032 | 1033 | | |
1033 | 1034 | | |
1034 | 1035 | | |
| |||
1049 | 1050 | | |
1050 | 1051 | | |
1051 | 1052 | | |
1052 | | - | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
1053 | 1056 | | |
1054 | | - | |
| 1057 | + | |
1055 | 1058 | | |
1056 | 1059 | | |
1057 | 1060 | | |
| |||
0 commit comments