FreeBSD Bugzilla – Attachment 212343 Details for
Bug 244713
Processes hanging in "nfs" state
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Port of D24038 to stable/12
1.patch (text/plain), 1.89 KB, created by
Konstantin Belousov
on 2020-03-11 22:33:50 UTC
(
hide
)
Description:
Port of D24038 to stable/12
Filename:
MIME Type:
Creator:
Konstantin Belousov
Created:
2020-03-11 22:33:50 UTC
Size:
1.89 KB
patch
obsolete
>Index: sys/kern/kern_sendfile.c >=================================================================== >--- sys/kern/kern_sendfile.c (revision 358900) >+++ sys/kern/kern_sendfile.c (working copy) >@@ -325,18 +325,11 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfi > count = min(a + 1, npages - i); > > /* >- * We should not pagein into a valid page, thus we first trim >- * any valid pages off the end of request, and substitute >- * to bogus_page those, that are in the middle. >+ * We should not pagein into a valid page because >+ * there might be still unfinished write tracked by >+ * e.g. a buffer, thus we substitute any valid pages >+ * with the bogus one. > */ >- for (j = i + count - 1; j > i; j--) { >- if (vm_page_is_valid(pa[j], vmoff(j, off) & PAGE_MASK, >- xfsize(j, npages, off, len))) { >- count--; >- rhpages = 0; >- } else >- break; >- } > for (j = i + 1; j < i + count - 1; j++) > if (vm_page_is_valid(pa[j], vmoff(j, off) & PAGE_MASK, > xfsize(j, npages, off, len))) { >Index: sys/kern/vfs_bio.c >=================================================================== >--- sys/kern/vfs_bio.c (revision 358900) >+++ sys/kern/vfs_bio.c (working copy) >@@ -5185,13 +5185,17 @@ vfs_bio_getpages(struct vnode *vp, vm_page_t *ma, > != 0) ? GB_UNMAPPED : 0; > VM_OBJECT_WLOCK(object); > 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]); >+ } > VM_OBJECT_WUNLOCK(object); > > 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 >@@ -5259,6 +5263,8 @@ end_pages: > VM_OBJECT_WLOCK(object); > redo = false; > for (i = 0; i < count; i++) { >+ if (ma[i] == bogus_page) >+ continue; > vm_page_sunbusy(ma[i]); > ma[i] = vm_page_grab(object, ma[i]->pindex, VM_ALLOC_NORMAL); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 244713
:
212298
|
212299
|
212324
| 212343