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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359464
@ -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++)
|
||||
vm_page_busy_downgrade(ma[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 @@ next_page:;
|
||||
|
||||
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…
Reference in New Issue
Block a user