buffer pager: skip bogus pages.
We cannot validate bogus page by reading a buffer. PR: 244713 Reviewed by: glebius, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24038
This commit is contained in:
parent
0ac8511aef
commit
bbca4bd7cd
@ -5154,12 +5154,16 @@ vfs_bio_getpages(struct vnode *vp, vm_page_t *ma, int count,
|
||||
br_flags = (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMAPPED_BUFS)
|
||||
!= 0) ? GB_UNMAPPED : 0;
|
||||
again:
|
||||
for (i = 0; i < count; i++)
|
||||
for (i = 0; i < count; i++) {
|
||||
if (ma[i] != bogus_page)
|
||||
vm_page_busy_downgrade(ma[i]);
|
||||
}
|
||||
|
||||
lbnp = -1;
|
||||
for (i = 0; i < count; i++) {
|
||||
m = ma[i];
|
||||
if (m == bogus_page)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Pages are shared busy and the object lock is not
|
||||
@ -5228,6 +5232,8 @@ end_pages:
|
||||
|
||||
redo = false;
|
||||
for (i = 0; i < count; i++) {
|
||||
if (ma[i] == bogus_page)
|
||||
continue;
|
||||
if (vm_page_busy_tryupgrade(ma[i]) == 0) {
|
||||
vm_page_sunbusy(ma[i]);
|
||||
ma[i] = vm_page_grab_unlocked(object, ma[i]->pindex,
|
||||
|
Loading…
x
Reference in New Issue
Block a user