On Wed, Mar 12, 2025 at 10:51:36PM +0800, Ming Lei wrote: > >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: ed9832bc08db ("block: introduce folio awareness and add a bigger size from folio") > Cc: Kundan Kumar <kundan.kumar@xxxxxxxxxxx> > Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Luis Chamberlain <mcgrof@xxxxxxxxxx> > Cc: Gavin Shan <gshan@xxxxxxxxxx> > Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>