From owner-svn-src-all@FreeBSD.ORG Sun Oct 20 21:11:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A44DD309; Sun, 20 Oct 2013 21:11:41 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 783552029; Sun, 20 Oct 2013 21:11:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9KLBfne076012; Sun, 20 Oct 2013 21:11:41 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9KLBfq5076008; Sun, 20 Oct 2013 21:11:41 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201310202111.r9KLBfq5076008@svn.freebsd.org> From: Kirk McKusick Date: Sun, 20 Oct 2013 21:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256808 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Oct 2013 21:11:41 -0000 Author: mckusick Date: Sun Oct 20 21:11:40 2013 New Revision: 256808 URL: http://svnweb.freebsd.org/changeset/base/256808 Log: Third of several cleanups to soft dependency implementation. Ensure that softdep_unmount() and softdep_setup_sbupdate() only get called for filesystems running with soft dependencies. No functional change. Tested by: Peter Holm and Scott Long Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sun Oct 20 21:11:36 2013 (r256807) +++ head/sys/ufs/ffs/ffs_softdep.c Sun Oct 20 21:11:40 2013 (r256808) @@ -13686,6 +13686,17 @@ DB_SHOW_COMMAND(mkdirs, db_show_mkdirs) } } +/* exported to ffs_vfsops.c */ +extern void db_print_ffs(struct ufsmount *ump); +void +db_print_ffs(struct ufsmount *ump) +{ + db_printf("mp %p %s devvp %p fs %p su_wl %d su_deps %d su_req %d\n", + ump->um_mountp, ump->um_mountp->mnt_stat.f_mntonname, + ump->um_devvp, ump->um_fs, ump->softdep_on_worklist, + ump->softdep_deps, ump->softdep_req); +} + #endif /* DDB */ #endif /* SOFTUPDATES */ Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sun Oct 20 21:11:36 2013 (r256807) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun Oct 20 21:11:40 2013 (r256808) @@ -1286,7 +1286,8 @@ ffs_unmount(mp, mntflags) fs->fs_pendinginodes = 0; } UFS_UNLOCK(ump); - softdep_unmount(mp); + if (MOUNTEDSOFTDEP(mp)) + softdep_unmount(mp); if (fs->fs_ronly == 0 || ump->um_fsckpid > 0) { fs->fs_clean = fs->fs_flags & (FS_UNCLEAN|FS_NEEDSFSCK) ? 0 : 1; error = ffs_sbupdate(ump, MNT_WAIT, 0); @@ -1943,7 +1944,7 @@ ffs_sbupdate(ump, waitfor, suspended) } fs->fs_fmod = 0; fs->fs_time = time_second; - if (fs->fs_flags & FS_DOSOFTDEP) + if (MOUNTEDSOFTDEP(ump->um_mountp)) softdep_setup_sbupdate(ump, (struct fs *)bp->b_data, bp); bcopy((caddr_t)fs, bp->b_data, (u_int)fs->fs_sbsize); ffs_oldfscompat_write((struct fs *)bp->b_data, ump); @@ -2221,14 +2222,8 @@ ffs_own_mount(const struct mount *mp) #ifdef DDB -static void -db_print_ffs(struct ufsmount *ump) -{ - db_printf("mp %p %s devvp %p fs %p su_wl %d su_deps %d su_req %d\n", - ump->um_mountp, ump->um_mountp->mnt_stat.f_mntonname, - ump->um_devvp, ump->um_fs, ump->softdep_on_worklist, - ump->softdep_deps, ump->softdep_req); -} +/* defined in ffs_softdep.c */ +extern void db_print_ffs(struct ufsmount *ump); DB_SHOW_COMMAND(ffs, db_show_ffs) {