Commit 729881f
mm: shmem: fallback to page size splice if large folio has poisoned pages
The tmpfs has already supported the PMD-sized large folios, and splice()
can not read any pages if the large folio has a poisoned page, which is
not good as Matthew pointed out in a previous email[1]:
"so if we have hwpoison set on one page in a folio, we now can't read
bytes from any page in the folio? That seems like we've made a bad
situation worse."
Thus add a fallback to the PAGE_SIZE splice() still allows reading normal
pages if the large folio has hwpoisoned pages.
[1] https://lore.kernel.org/all/Zw_d0EVAJkpNJEbA@casper.infradead.org/
[baolin.wang@linux.alibaba.com: code layout cleaup, per dhowells]
Link: https://lkml.kernel.org/r/32dd938c-3531-49f7-93e4-b7ff21fec569@linux.alibaba.com
Link: https://lkml.kernel.org/r/e3737fbd5366c4de4337bf5f2044817e77a5235b.1729915173.git.baolin.wang@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 477327e commit 729881f
1 file changed
+30
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3288 | 3288 | | |
3289 | 3289 | | |
3290 | 3290 | | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
3291 | 3296 | | |
3292 | 3297 | | |
3293 | 3298 | | |
3294 | | - | |
3295 | | - | |
| 3299 | + | |
| 3300 | + | |
3296 | 3301 | | |
3297 | 3302 | | |
3298 | 3303 | | |
| |||
3301 | 3306 | | |
3302 | 3307 | | |
3303 | 3308 | | |
3304 | | - | |
3305 | | - | |
3306 | | - | |
| 3309 | + | |
| 3310 | + | |
3307 | 3311 | | |
3308 | 3312 | | |
3309 | 3313 | | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
3310 | 3318 | | |
3311 | 3319 | | |
3312 | 3320 | | |
| |||
3320 | 3328 | | |
3321 | 3329 | | |
3322 | 3330 | | |
3323 | | - | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
3324 | 3342 | | |
3325 | 3343 | | |
3326 | 3344 | | |
3327 | 3345 | | |
3328 | 3346 | | |
3329 | 3347 | | |
3330 | 3348 | | |
3331 | | - | |
3332 | | - | |
| 3349 | + | |
| 3350 | + | |
| 3351 | + | |
| 3352 | + | |
| 3353 | + | |
| 3354 | + | |
3333 | 3355 | | |
3334 | 3356 | | |
3335 | 3357 | | |
| |||
0 commit comments