diff options
author | Jiaqi Yan <jiaqiyan@google.com> | 2023-07-13 02:18:32 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2023-08-18 19:12:26 +0200 |
commit | 38c1ddbde6c6593e7c4bc17bde87232b7c577e7b (patch) | |
tree | e7a65730f83ee6dbf81c6788bdb48e62987a9454 /tools | |
parent | mm/hwpoison: check if a raw page in a hugetlb folio is raw HWPOISON (diff) | |
download | linux-38c1ddbde6c6593e7c4bc17bde87232b7c577e7b.tar.xz linux-38c1ddbde6c6593e7c4bc17bde87232b7c577e7b.zip |
hugetlbfs: improve read HWPOISON hugepage
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.
Link: https://lkml.kernel.org/r/20230713001833.3778937-4-jiaqiyan@google.com
Signed-off-by: Jiaqi Yan <jiaqiyan@google.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Cc: James Houghton <jthoughton@google.com>
Cc: Miaohe Lin <linmiaohe@huawei.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions