block: fix adding folio to bio

JIRA: https://issues.redhat.com/browse/RHEL-79410
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=67144184
Upstream Status: v6.15.rc1
Tested: Guest can boot with 16GB huge pages and none disk cache mode

It's possible a folio's size exceeds 4GB. For example, 16GB huge page
is available when the base page size is 64KB. In this case, the offset
of a folio can't be held in a 'unsigned int' variable. Otherwise, it
causes warning in bio_add_folio_nofail() and IO failure because of
overflowing, and eventually leads to guest booting failure when the
disk cache mode is none.

Pick up upstream commit 26064d3e2b4d ("block: fix adding folio to bio")
to fix the issue.

Signed-off-by: Gavin Shan gshan@redhat.com

Merge request reports

Loading