Date: Fri, 27 Feb 2015 16:43:51 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279362 - in head/sys: fs/devfs kern sys Message-ID: <201502271643.t1RGhpqw076757@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Feb 27 16:43:50 2015 New Revision: 279362 URL: https://svnweb.freebsd.org/changeset/base/279362 Log: The VNASSERT in vflush() FORCECLOSE case is trying to panic early to prevent errors from yanking devices out from under filesystems. Only care about special vnodes on devfs, special nodes on other kinds of filesystems do not have special properties. Sponsored by: EMC / Isilon Storage Division Submitted by: Conrad Meyer MFC after: 1 week Modified: head/sys/fs/devfs/devfs_vnops.c head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Fri Feb 27 16:28:55 2015 (r279361) +++ head/sys/fs/devfs/devfs_vnops.c Fri Feb 27 16:43:50 2015 (r279362) @@ -63,7 +63,6 @@ #include <sys/vnode.h> static struct vop_vector devfs_vnodeops; -static struct vop_vector devfs_specops; static struct fileops devfs_ops_f; #include <fs/devfs/devfs.h> @@ -1760,7 +1759,7 @@ static struct vop_vector devfs_vnodeops .vop_vptocnp = devfs_vptocnp, }; -static struct vop_vector devfs_specops = { +struct vop_vector devfs_specops = { .vop_default = &default_vnodeops, .vop_access = devfs_access, Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Fri Feb 27 16:28:55 2015 (r279361) +++ head/sys/kern/vfs_subr.c Fri Feb 27 16:43:50 2015 (r279362) @@ -2645,6 +2645,7 @@ loop: */ if (vp->v_usecount == 0 || (flags & FORCECLOSE)) { VNASSERT(vp->v_usecount == 0 || + vp->v_op != &devfs_specops || (vp->v_type != VCHR && vp->v_type != VBLK), vp, ("device VNODE %p is FORCECLOSED", vp)); vgonel(vp); Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Feb 27 16:28:55 2015 (r279361) +++ head/sys/sys/vnode.h Fri Feb 27 16:43:50 2015 (r279362) @@ -822,6 +822,7 @@ void vnode_destroy_vobject(struct vnode extern struct vop_vector fifo_specops; extern struct vop_vector dead_vnodeops; extern struct vop_vector default_vnodeops; +extern struct vop_vector devfs_specops; #define VOP_PANIC ((void*)(uintptr_t)vop_panic) #define VOP_NULL ((void*)(uintptr_t)vop_null)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502271643.t1RGhpqw076757>