o Lock page accesses by vm_page_io_start() with the page queues lock.
o Assert that the page queues lock is held in vm_page_io_start().
This commit is contained in:
parent
b0e7dc01b7
commit
1a8a40c126
@ -475,6 +475,7 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp)
|
||||
BUF_KERNPROC(tbp);
|
||||
TAILQ_INSERT_TAIL(&bp->b_cluster.cluster_head,
|
||||
tbp, b_cluster.cluster_entry);
|
||||
vm_page_lock_queues();
|
||||
for (j = 0; j < tbp->b_npages; j += 1) {
|
||||
vm_page_t m;
|
||||
m = tbp->b_pages[j];
|
||||
@ -488,6 +489,7 @@ cluster_rbuild(vp, filesize, lbn, blkno, size, run, fbp)
|
||||
if ((m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL)
|
||||
tbp->b_pages[j] = bogus_page;
|
||||
}
|
||||
vm_page_unlock_queues();
|
||||
/*
|
||||
* XXX shouldn't this be += size for both, like in
|
||||
* cluster_wbuild()?
|
||||
@ -931,7 +933,7 @@ cluster_wbuild(vp, size, start_lbn, len)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vm_page_lock_queues();
|
||||
for (j = 0; j < tbp->b_npages; j += 1) {
|
||||
m = tbp->b_pages[j];
|
||||
vm_page_io_start(m);
|
||||
@ -942,6 +944,7 @@ cluster_wbuild(vp, size, start_lbn, len)
|
||||
bp->b_npages++;
|
||||
}
|
||||
}
|
||||
vm_page_unlock_queues();
|
||||
}
|
||||
bp->b_bcount += size;
|
||||
bp->b_bufsize += size;
|
||||
|
@ -396,7 +396,8 @@ vm_page_wakeup(vm_page_t m)
|
||||
void
|
||||
vm_page_io_start(vm_page_t m)
|
||||
{
|
||||
GIANT_REQUIRED;
|
||||
|
||||
mtx_assert(&vm_page_queue_mtx, MA_OWNED);
|
||||
m->busy++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user