Commit 6afd05c
f2fs: add 'folio_in_bio' to handle readahead folios with no BIO submission
f2fs_read_data_large_folio() can build a single read BIO across multiple
folios during readahead. If a folio ends up having none of its subpages
added to the BIO (e.g. all subpages are zeroed / treated as holes), it
will never be seen by f2fs_finish_read_bio(), so folio_end_read() is
never called. This leaves the folio locked and not marked uptodate.
Track whether the current folio has been added to a BIO via a local
'folio_in_bio' bool flag, and when iterating readahead folios, explicitly
mark the folio uptodate (on success) and unlock it when nothing was added.
Signed-off-by: Nanzhe Zhao <nzzhao@126.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>1 parent 540d34c commit 6afd05c
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2448 | 2448 | | |
2449 | 2449 | | |
2450 | 2450 | | |
| 2451 | + | |
2451 | 2452 | | |
2452 | 2453 | | |
2453 | 2454 | | |
| |||
2463 | 2464 | | |
2464 | 2465 | | |
2465 | 2466 | | |
| 2467 | + | |
2466 | 2468 | | |
2467 | 2469 | | |
2468 | 2470 | | |
| |||
2548 | 2550 | | |
2549 | 2551 | | |
2550 | 2552 | | |
| 2553 | + | |
2551 | 2554 | | |
2552 | 2555 | | |
2553 | 2556 | | |
| |||
2557 | 2560 | | |
2558 | 2561 | | |
2559 | 2562 | | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
2560 | 2567 | | |
2561 | 2568 | | |
2562 | 2569 | | |
| |||
0 commit comments