diff options
author | kib <kib@FreeBSD.org> | 2010-11-18 21:09:02 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2010-11-18 21:09:02 +0000 |
commit | 3851a62f83f8895f2a038788c53959a7359f30f4 (patch) | |
tree | 94645bc70e8cb4804519c9b76e5bf90ba7a76b30 /sys/vm/vm_contig.c | |
parent | 38737a3b4655a7e5f2b497236c0e9c6561896b31 (diff) | |
download | FreeBSD-src-3851a62f83f8895f2a038788c53959a7359f30f4.zip FreeBSD-src-3851a62f83f8895f2a038788c53959a7359f30f4.tar.gz |
vm_pageout_flush() might cache the pages that finished write to the
backing storage. Such pages might be then reused, racing with the
assert in vm_object_page_collect_flush() that verified that dirty
pages from the run (most likely, pages with VM_PAGER_AGAIN status) are
write-protected still. In fact, the page indexes for the pages that
were removed from the object page list should be ignored by
vm_object_page_clean().
Return the length of successfully written run from vm_pageout_flush(),
that is, the count of pages between requested page and first page
after requested with status VM_PAGER_AGAIN. Supply the requested page
index in the array to vm_pageout_flush(). Use the returned run length
to forward the index of next page to clean in vm_object_page_clean().
Reported by: avg
Reviewed by: alc
MFC after: 1 week
Diffstat (limited to 'sys/vm/vm_contig.c')
-rw-r--r-- | sys/vm/vm_contig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c index c0a9fcd..3341634 100644 --- a/sys/vm/vm_contig.c +++ b/sys/vm/vm_contig.c @@ -140,7 +140,7 @@ vm_contig_launder_page(vm_page_t m, vm_page_t *next) object->type == OBJT_DEFAULT) { vm_page_unlock_queues(); m_tmp = m; - vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC); + vm_pageout_flush(&m_tmp, 1, VM_PAGER_PUT_SYNC, 0, NULL); VM_OBJECT_UNLOCK(object); vm_page_lock_queues(); return (0); |