Commit 8344a3d
writeback: account the number of pages written back
nr_to_write is a count of pages, so we need to decrease it by the number
of pages in the folio we just wrote, not by 1. Most callers specify
either LONG_MAX or 1, so are unaffected, but writeback_sb_inodes() might
end up writing 512x as many pages as it asked for.
Dave added:
: XFS is the only filesystem this would affect, right? AFAIA, nothing
: else enables large folios and uses writeback through
: write_cache_pages() at this point...
:
: In which case, I'd be surprised if much difference, if any, gets
: noticed by anyone.
Link: https://lkml.kernel.org/r/20230628185548.981888-1-willy@infradead.org
Fixes: 793917d ("mm/readahead: Add large folio readahead")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Jan Kara <jack@suse.cz>
Cc: Dave Chinner <david@fromorbit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 6dca4ac commit 8344a3d
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2434 | 2434 | | |
2435 | 2435 | | |
2436 | 2436 | | |
| 2437 | + | |
2437 | 2438 | | |
2438 | 2439 | | |
2439 | 2440 | | |
| |||
2471 | 2472 | | |
2472 | 2473 | | |
2473 | 2474 | | |
| 2475 | + | |
2474 | 2476 | | |
2475 | 2477 | | |
2476 | 2478 | | |
| |||
2489 | 2491 | | |
2490 | 2492 | | |
2491 | 2493 | | |
2492 | | - | |
2493 | | - | |
| 2494 | + | |
2494 | 2495 | | |
2495 | 2496 | | |
2496 | 2497 | | |
| |||
2504 | 2505 | | |
2505 | 2506 | | |
2506 | 2507 | | |
2507 | | - | |
| 2508 | + | |
| 2509 | + | |
2508 | 2510 | | |
2509 | 2511 | | |
2510 | 2512 | | |
| |||
0 commit comments