From owner-svn-src-all@FreeBSD.ORG Sun Mar 20 21:05:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED1C106566B; Sun, 20 Mar 2011 21:05:09 +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 A04918FC14; Sun, 20 Mar 2011 21:05:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2KL591L089529; Sun, 20 Mar 2011 21:05:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2KL59uw089523; Sun, 20 Mar 2011 21:05:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201103202105.p2KL59uw089523@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 20 Mar 2011 21:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219804 - in head/sys: conf modules/ufs ufs/ffs ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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 Mar 2011 21:05:09 -0000 Author: kib Date: Sun Mar 20 21:05:09 2011 New Revision: 219804 URL: http://svn.freebsd.org/changeset/base/219804 Log: Retire opt_ffs_broken_fixme.h. Instead of directly calling ffs_snapgone(), use UFS_SNAPGONE() with usual layering. Requested by: bde MFC after: 1 week Modified: head/sys/conf/options head/sys/modules/ufs/Makefile head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufs_lookup.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/conf/options Sun Mar 20 21:05:09 2011 (r219804) @@ -200,6 +200,7 @@ CD9660 opt_dontuse.h CODA opt_dontuse.h EXT2FS opt_dontuse.h FDESCFS opt_dontuse.h +FFS opt_dontuse.h HPFS opt_dontuse.h MSDOSFS opt_dontuse.h NTFS opt_dontuse.h @@ -217,9 +218,6 @@ UNIONFS opt_dontuse.h # Pseudofs debugging PSEUDOFS_TRACE opt_pseudofs.h -# Broken - ffs_snapshot() dependency from ufs_lookup() :-( -FFS opt_ffs_broken_fixme.h - # In-kernel GSS-API KGSSAPI opt_kgssapi.h KGSSAPI_DEBUG opt_kgssapi.h Modified: head/sys/modules/ufs/Makefile ============================================================================== --- head/sys/modules/ufs/Makefile Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/modules/ufs/Makefile Sun Mar 20 21:05:09 2011 (r219804) @@ -3,8 +3,7 @@ .PATH: ${.CURDIR}/../../ufs/ufs ${.CURDIR}/../../ufs/ffs KMOD= ufs -SRCS= opt_ddb.h opt_directio.h opt_ffs.h opt_ffs_broken_fixme.h \ - opt_quota.h opt_suiddir.h opt_ufs.h \ +SRCS= opt_ddb.h opt_directio.h opt_ffs.h opt_quota.h opt_suiddir.h opt_ufs.h \ vnode_if.h ufs_acl.c ufs_bmap.c ufs_dirhash.c ufs_extattr.c \ ufs_gjournal.c ufs_inode.c ufs_lookup.c ufs_quota.c ufs_vfsops.c \ ufs_vnops.c ffs_alloc.c ffs_balloc.c ffs_inode.c ffs_snapshot.c \ Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/ufs/ffs/ffs_vfsops.c Sun Mar 20 21:05:09 2011 (r219804) @@ -797,6 +797,7 @@ ffs_mountfs(devvp, mp, td) ump->um_vfree = ffs_vfree; ump->um_ifree = ffs_ifree; ump->um_rdonly = ffs_rdonly; + ump->um_snapgone = ffs_snapgone; mtx_init(UFS_MTX(ump), "FFS", "FFS Lock", MTX_DEF); bcopy(bp->b_data, ump->um_fs, (u_int)fs->fs_sbsize); if (fs->fs_sbsize < SBLOCKSIZE) Modified: head/sys/ufs/ufs/ufs_lookup.c ============================================================================== --- head/sys/ufs/ufs/ufs_lookup.c Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/ufs/ufs/ufs_lookup.c Sun Mar 20 21:05:09 2011 (r219804) @@ -37,7 +37,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ffs_broken_fixme.h" #include "opt_ufs.h" #include "opt_quota.h" @@ -1253,7 +1252,7 @@ out: * when last open reference goes away. */ if (ip != 0 && (ip->i_flags & SF_SNAPSHOT) != 0 && ip->i_effnlink == 0) - ffs_snapgone(ip); + UFS_SNAPGONE(ip); return (error); } @@ -1316,7 +1315,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype * when last open reference goes away. */ if ((oip->i_flags & SF_SNAPSHOT) != 0 && oip->i_effnlink == 0) - ffs_snapgone(oip); + UFS_SNAPGONE(oip); return (error); } Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Sun Mar 20 20:53:55 2011 (r219803) +++ head/sys/ufs/ufs/ufsmount.h Sun Mar 20 21:05:09 2011 (r219804) @@ -104,6 +104,7 @@ struct ufsmount { int (*um_vfree)(struct vnode *, ino_t, int); void (*um_ifree)(struct ufsmount *, struct inode *); int (*um_rdonly)(struct inode *); + void (*um_snapgone)(struct inode *); }; #define UFS_BALLOC(aa, bb, cc, dd, ee, ff) VFSTOUFS((aa)->v_mount)->um_balloc(aa, bb, cc, dd, ee, ff) @@ -114,6 +115,7 @@ struct ufsmount { #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc) #define UFS_IFREE(aa, bb) ((aa)->um_ifree(aa, bb)) #define UFS_RDONLY(aa) ((aa)->i_ump->um_rdonly(aa)) +#define UFS_SNAPGONE(aa) ((aa)->i_ump->um_snapgone(aa)) #define UFS_LOCK(aa) mtx_lock(&(aa)->um_lock) #define UFS_UNLOCK(aa) mtx_unlock(&(aa)->um_lock)