diff options
author | kib <kib@FreeBSD.org> | 2013-08-22 18:26:45 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2013-08-22 18:26:45 +0000 |
commit | e25f6a560e1e37654c030e8b907daf8ebfae9c40 (patch) | |
tree | efcf3b91736a972d4bd20694ca316b8ef94611b6 /sys/kern/vfs_bio.c | |
parent | 05a9dff802e2ec3a2f8ab5836657ced5977fca68 (diff) | |
download | FreeBSD-src-e25f6a560e1e37654c030e8b907daf8ebfae9c40.zip FreeBSD-src-e25f6a560e1e37654c030e8b907daf8ebfae9c40.tar.gz |
Both cluster_rbuild() and cluster_wbuild() sometimes set the pages
shared busy without first draining the hard busy state. Previously it
went unnoticed since VPO_BUSY and m->busy fields were distinct, and
vm_page_io_start() did not verified that the passed page has VPO_BUSY
flag cleared, but such page state is wrong. New implementation is
more strict and catched this case.
Drain the busy state as needed, before calling vm_page_sbusy().
Tested by: pho, jkim
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r-- | sys/kern/vfs_bio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 71993d4..04eab14 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -108,7 +108,6 @@ static void vm_hold_load_pages(struct buf *bp, vm_offset_t from, static void vfs_page_set_valid(struct buf *bp, vm_ooffset_t off, vm_page_t m); static void vfs_page_set_validclean(struct buf *bp, vm_ooffset_t off, vm_page_t m); -static void vfs_drain_busy_pages(struct buf *bp); static void vfs_clean_pages_dirty_buf(struct buf *bp); static void vfs_setdirty_locked_object(struct buf *bp); static void vfs_vmio_release(struct buf *bp); @@ -3983,7 +3982,7 @@ vfs_page_set_validclean(struct buf *bp, vm_ooffset_t off, vm_page_t m) * Ensure that all buffer pages are not exclusive busied. If any page is * exclusive busy, drain it. */ -static void +void vfs_drain_busy_pages(struct buf *bp) { vm_page_t m; |