diff options
author | kib <kib@FreeBSD.org> | 2011-06-01 21:00:28 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-06-01 21:00:28 +0000 |
commit | ad5bd0652340908efab201a5a95766c83a96160a (patch) | |
tree | 07e1defe92d7e0b4f536a6246e42367ce49158b2 /sys/vm/vnode_pager.h | |
parent | fa6dbdd4a2c067d514a8442f406a37ad52fb9be7 (diff) | |
download | FreeBSD-src-ad5bd0652340908efab201a5a95766c83a96160a.zip FreeBSD-src-ad5bd0652340908efab201a5a95766c83a96160a.tar.gz |
In the VOP_PUTPAGES() implementations, change the default error from
VM_PAGER_AGAIN to VM_PAGER_ERROR for the uwritten pages. Return
VM_PAGER_AGAIN for the partially written page. Always forward at least
one page in the loop of vm_object_page_clean().
VM_PAGER_ERROR causes the page reactivation and does not clear the
page dirty state, so the write is not lost.
The change fixes an infinite loop in vm_object_page_clean() when the
filesystem returns permanent errors for some page writes.
Reported and tested by: gavin
Reviewed by: alc, rmacklem
MFC after: 1 week
Diffstat (limited to 'sys/vm/vnode_pager.h')
-rw-r--r-- | sys/vm/vnode_pager.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/vm/vnode_pager.h b/sys/vm/vnode_pager.h index 88ae306..5e3d5eb 100644 --- a/sys/vm/vnode_pager.h +++ b/sys/vm/vnode_pager.h @@ -49,5 +49,8 @@ int vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int vnode_pager_generic_putpages(struct vnode *vp, vm_page_t *m, int count, boolean_t sync, int *rtvals); + +void vnode_pager_undirty_pages(vm_page_t *ma, int *rtvals, int written); + #endif /* _KERNEL */ #endif /* _VNODE_PAGER_ */ |