From owner-svn-src-stable-7@FreeBSD.ORG Thu Jan 29 11:38:28 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E520A1065676; Thu, 29 Jan 2009 11:38:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1AC08FC1C; Thu, 29 Jan 2009 11:38:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0TBcSv0053120; Thu, 29 Jan 2009 11:38:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0TBcSO9053117; Thu, 29 Jan 2009 11:38:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901291138.n0TBcSO9053117@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 29 Jan 2009 11:38:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187892 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb gnu/fs/ext2fs kern sys X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2009 11:38:29 -0000 Author: kib Date: Thu Jan 29 11:38:28 2009 New Revision: 187892 URL: http://svn.freebsd.org/changeset/base/187892 Log: MFC r183071: Garbage-collect vn_write_suspend_wait(). Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/gnu/fs/ext2fs/ext2_inode.c stable/7/sys/kern/vfs_vnops.c stable/7/sys/sys/vnode.h Modified: stable/7/sys/gnu/fs/ext2fs/ext2_inode.c ============================================================================== --- stable/7/sys/gnu/fs/ext2fs/ext2_inode.c Thu Jan 29 11:21:15 2009 (r187891) +++ stable/7/sys/gnu/fs/ext2fs/ext2_inode.c Thu Jan 29 11:38:28 2009 (r187892) @@ -481,7 +481,6 @@ ext2_inactive(ap) if (ip->i_mode == 0) goto out; if (ip->i_nlink <= 0) { - (void) vn_write_suspend_wait(vp, NULL, V_WAIT); error = ext2_truncate(vp, (off_t)0, 0, NOCRED, td); ip->i_rdev = 0; mode = ip->i_mode; @@ -489,15 +488,8 @@ ext2_inactive(ap) ip->i_flag |= IN_CHANGE | IN_UPDATE; ext2_vfree(vp, ip->i_number, mode); } - if (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) { - if ((ip->i_flag & (IN_CHANGE | IN_UPDATE | IN_MODIFIED)) == 0 && - vn_write_suspend_wait(vp, NULL, V_NOWAIT)) { - ip->i_flag &= ~IN_ACCESS; - } else { - (void) vn_write_suspend_wait(vp, NULL, V_WAIT); - ext2_update(vp, 0); - } - } + if (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED | IN_UPDATE)) + ext2_update(vp, 0); out: /* * If we are done with the inode, reclaim it Modified: stable/7/sys/kern/vfs_vnops.c ============================================================================== --- stable/7/sys/kern/vfs_vnops.c Thu Jan 29 11:21:15 2009 (r187891) +++ stable/7/sys/kern/vfs_vnops.c Thu Jan 29 11:38:28 2009 (r187892) @@ -943,56 +943,6 @@ unlock: * time, these operations are halted until the suspension is over. */ int -vn_write_suspend_wait(vp, mp, flags) - struct vnode *vp; - struct mount *mp; - int flags; -{ - int error; - - if (vp != NULL) { - if ((error = VOP_GETWRITEMOUNT(vp, &mp)) != 0) { - if (error != EOPNOTSUPP) - return (error); - return (0); - } - } - /* - * If we are not suspended or have not yet reached suspended - * mode, then let the operation proceed. - */ - if (mp == NULL) - return (0); - MNT_ILOCK(mp); - if (vp == NULL) - MNT_REF(mp); - if ((mp->mnt_kern_flag & MNTK_SUSPENDED) == 0) { - MNT_REL(mp); - MNT_IUNLOCK(mp); - return (0); - } - if (flags & V_NOWAIT) { - MNT_REL(mp); - MNT_IUNLOCK(mp); - return (EWOULDBLOCK); - } - /* - * Wait for the suspension to finish. - */ - error = msleep(&mp->mnt_flag, MNT_MTX(mp), - (PUSER - 1) | (flags & PCATCH) | PDROP, "suspfs", 0); - vfs_rel(mp); - return (error); -} - -/* - * Secondary suspension. Used by operations such as vop_inactive - * routines that are needed by the higher level functions. These - * are allowed to proceed until all the higher level functions have - * completed (indicated by mnt_writeopcount dropping to zero). At that - * time, these operations are halted until the suspension is over. - */ -int vn_start_secondary_write(vp, mpp, flags) struct vnode *vp; struct mount **mpp; Modified: stable/7/sys/sys/vnode.h ============================================================================== --- stable/7/sys/sys/vnode.h Thu Jan 29 11:21:15 2009 (r187891) +++ stable/7/sys/sys/vnode.h Thu Jan 29 11:38:28 2009 (r187892) @@ -625,8 +625,6 @@ int vn_stat(struct vnode *vp, struct sta int vn_start_write(struct vnode *vp, struct mount **mpp, int flags); int vn_start_secondary_write(struct vnode *vp, struct mount **mpp, int flags); -int vn_write_suspend_wait(struct vnode *vp, struct mount *mp, - int flags); int vn_writechk(struct vnode *vp); int vn_extattr_get(struct vnode *vp, int ioflg, int attrnamespace, const char *attrname, int *buflen, char *buf, struct thread *td);