Date: Fri, 11 Jan 2013 06:08:32 +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: r245286 - in head/sys: geom/journal kern sys ufs/ffs Message-ID: <201301110608.r0B68WFh088604@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Jan 11 06:08:32 2013 New Revision: 245286 URL: http://svnweb.freebsd.org/changeset/base/245286 Log: Add flags argument to vfs_write_resume() and remove vfs_write_resume_flags(). Sponsored by: The FreeBSD Foundation Modified: head/sys/geom/journal/g_journal.c head/sys/kern/vfs_vnops.c head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_snapshot.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_suspend.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Fri Jan 11 06:04:46 2013 (r245285) +++ head/sys/geom/journal/g_journal.c Fri Jan 11 06:08:32 2013 (r245286) @@ -2976,7 +2976,7 @@ g_journal_do_switch(struct g_class *clas g_journal_switch_wait(sc); mtx_unlock(&sc->sc_mtx); - vfs_write_resume(mp); + vfs_write_resume(mp, 0); next: mtx_lock(&mountlist_mtx); vfs_unbusy(mp); Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Fri Jan 11 06:04:46 2013 (r245285) +++ head/sys/kern/vfs_vnops.c Fri Jan 11 06:08:32 2013 (r245286) @@ -1642,7 +1642,7 @@ vfs_write_suspend(mp) else MNT_IUNLOCK(mp); if ((error = VFS_SYNC(mp, MNT_SUSPEND)) != 0) - vfs_write_resume(mp); + vfs_write_resume(mp, 0); return (error); } @@ -1650,7 +1650,7 @@ vfs_write_suspend(mp) * Request a filesystem to resume write operations. */ void -vfs_write_resume_flags(struct mount *mp, int flags) +vfs_write_resume(struct mount *mp, int flags) { MNT_ILOCK(mp); @@ -1677,13 +1677,6 @@ vfs_write_resume_flags(struct mount *mp, } } -void -vfs_write_resume(struct mount *mp) -{ - - vfs_write_resume_flags(mp, 0); -} - /* * Implement kqueues for files by translating it to vnode operation. */ Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Jan 11 06:04:46 2013 (r245285) +++ head/sys/sys/vnode.h Fri Jan 11 06:08:32 2013 (r245286) @@ -703,8 +703,7 @@ int vn_io_fault_uiomove(char *data, int int vfs_cache_lookup(struct vop_lookup_args *ap); void vfs_timestamp(struct timespec *); -void vfs_write_resume(struct mount *mp); -void vfs_write_resume_flags(struct mount *mp, int flags); +void vfs_write_resume(struct mount *mp, int flags); int vfs_write_suspend(struct mount *mp); int vop_stdbmap(struct vop_bmap_args *); int vop_stdfsync(struct vop_fsync_args *); Modified: head/sys/ufs/ffs/ffs_snapshot.c ============================================================================== --- head/sys/ufs/ffs/ffs_snapshot.c Fri Jan 11 06:04:46 2013 (r245285) +++ head/sys/ufs/ffs/ffs_snapshot.c Fri Jan 11 06:08:32 2013 (r245286) @@ -687,7 +687,7 @@ out1: /* * Resume operation on filesystem. */ - vfs_write_resume_flags(vp->v_mount, VR_START_WRITE | VR_NO_SUSPCLR); + vfs_write_resume(vp->v_mount, VR_START_WRITE | VR_NO_SUSPCLR); if (collectsnapstats && starttime.tv_sec > 0) { nanotime(&endtime); timespecsub(&endtime, &starttime); Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri Jan 11 06:04:46 2013 (r245285) +++ head/sys/ufs/ffs/ffs_softdep.c Fri Jan 11 06:08:32 2013 (r245286) @@ -2802,7 +2802,7 @@ journal_unsuspend(struct ufsmount *ump) jblocks->jb_suspended = 0; FREE_LOCK(&lk); mp->mnt_susp_owner = curthread; - vfs_write_resume(mp); + vfs_write_resume(mp, 0); ACQUIRE_LOCK(&lk); return (1); } Modified: head/sys/ufs/ffs/ffs_suspend.c ============================================================================== --- head/sys/ufs/ffs/ffs_suspend.c Fri Jan 11 06:04:46 2013 (r245285) +++ head/sys/ufs/ffs/ffs_suspend.c Fri Jan 11 06:08:32 2013 (r245286) @@ -252,7 +252,7 @@ ffs_susp_dtor(void *data) */ mp->mnt_susp_owner = curthread; - vfs_write_resume(mp); + vfs_write_resume(mp, 0); vfs_unbusy(mp); ump->um_writesuspended = 0; Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Jan 11 06:04:46 2013 (r245285) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Jan 11 06:08:32 2013 (r245286) @@ -292,7 +292,7 @@ ffs_mount(struct mount *mp) error = ffs_flushfiles(mp, flags, td); } if (error) { - vfs_write_resume(mp); + vfs_write_resume(mp, 0); return (error); } if (fs->fs_pendingblocks != 0 || @@ -309,7 +309,7 @@ ffs_mount(struct mount *mp) if ((error = ffs_sbupdate(ump, MNT_WAIT, 0)) != 0) { fs->fs_ronly = 0; fs->fs_clean = 0; - vfs_write_resume(mp); + vfs_write_resume(mp, 0); return (error); } if (MOUNTEDSOFTDEP(mp)) @@ -330,7 +330,7 @@ ffs_mount(struct mount *mp) * Allow the writers to note that filesystem * is ro now. */ - vfs_write_resume(mp); + vfs_write_resume(mp, 0); } if ((mp->mnt_flag & MNT_RELOAD) && (error = ffs_reload(mp, td, 0)) != 0) @@ -1294,10 +1294,8 @@ ffs_unmount(mp, mntflags) goto fail; } } - if (susp) { - vfs_write_resume(mp); - vn_start_write(NULL, &mp, V_WAIT); - } + if (susp) + vfs_write_resume(mp, VR_START_WRITE); DROP_GIANT(); g_topology_lock(); if (ump->um_fsckpid > 0) { @@ -1329,10 +1327,8 @@ ffs_unmount(mp, mntflags) return (error); fail: - if (susp) { - vfs_write_resume(mp); - vn_start_write(NULL, &mp, V_WAIT); - } + if (susp) + vfs_write_resume(mp, VR_START_WRITE); #ifdef UFS_EXTATTR if (e_restart) { ufs_extattr_uepm_init(&ump->um_extattr);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301110608.r0B68WFh088604>