Date: Fri, 28 Jun 2013 07:51:12 +0000 (UTC) From: Gavin Atkinson <gavin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252337 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201306280751.r5S7pCr2068656@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gavin Date: Fri Jun 28 07:51:12 2013 New Revision: 252337 URL: http://svnweb.freebsd.org/changeset/base/252337 Log: 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 MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Jun 28 06:25:04 2013 (r252336) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Fri Jun 28 07:51:12 2013 (r252337) @@ -345,10 +345,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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306280751.r5S7pCr2068656>