svn commit: r252891 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Gavin Atkinson
gavin at FreeBSD.org
Sat Jul 6 19:43:43 UTC 2013
Author: gavin
Date: Sat Jul 6 19:43:42 2013
New Revision: 252891
URL: http://svnweb.freebsd.org/changeset/base/252891
Log:
Merge r252337 from head:
Don't try to re-insert an already present but invalid page.
This could happen if a thread doing a page-in loses a ZFS range lock
race to a thread writing to the same range
This fixes "panic: vm_page_alloc: pindex already allocated" in
http://docs.FreeBSD.org/cgi/mid.cgi?1372165971.96049.42.camel
Submitted by: avg
Modified:
stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Jul 6 18:28:06 2013 (r252890)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sat Jul 6 19:43:42 2013 (r252891)
@@ -343,10 +343,13 @@ page_busy(vnode_t *vp, int64_t start, in
vm_page_sleep(pp, "zfsmwb");
continue;
}
- } else {
+ } else if (pp == NULL) {
pp = vm_page_alloc(obj, OFF_TO_IDX(start),
VM_ALLOC_SYSTEM | VM_ALLOC_IFCACHED |
VM_ALLOC_NOBUSY);
+ } else {
+ ASSERT(pp != NULL && !pp->valid);
+ pp = NULL;
}
if (pp != NULL) {
More information about the svn-src-stable-9
mailing list