On Fri, Jun 23, 2023 at 04:40:14PM +0000, Jiaqi Yan wrote: > When a hugepage contains HWPOISON pages, read() fails to read any byte > of the hugepage and returns -EIO, although many bytes in the HWPOISON > hugepage are readable. > > Improve this by allowing hugetlbfs_read_iter returns as many bytes as > possible. For a requested range [offset, offset + len) that contains > HWPOISON page, return [offset, first HWPOISON page addr); the next read > attempt will fail and return -EIO. > > Signed-off-by: Jiaqi Yan <jiaqiyan@xxxxxxxxxx> Looks good to me. Reviewed-by: Naoya Horiguchi <naoya.horiguchi@xxxxxxx>