git: 5128c8948b4e - stable/14 - swap_pager: Unbusy readahead pages after an I/O error
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Apr 2024 14:05:39 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5128c8948b4e56d20dfd623aeb030fb39c8f95b0 commit 5128c8948b4e56d20dfd623aeb030fb39c8f95b0 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-04-08 13:02:48 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-04-15 14:05:13 +0000 swap_pager: Unbusy readahead pages after an I/O error The swap pager itself allocates readahead pages, so should take care to unbusy them after a read error, just as it does in the non-error case. PR: 277538 Reviewed by: olce, dougm, alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44646 (cherry picked from commit 4696650782e2e5cf7ae5823f1de04550c05b5b75) --- sys/vm/swap_pager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 38151b3be96f..c8b08e0e8315 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -1686,6 +1686,9 @@ swp_pager_async_iodone(struct buf *bp) * getpages so don't play cute tricks here. */ vm_page_invalid(m); + if (i < bp->b_pgbefore || + i >= bp->b_npages - bp->b_pgafter) + vm_page_free_invalid(m); } else { /* * If a write error occurs, reactivate page