Date: Thu, 23 Jan 2020 06:06:32 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r357030 - stable/11/sys/ufs/ffs Message-ID: <202001230606.00N66W50002743@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mckusick Date: Thu Jan 23 06:06:32 2020 New Revision: 357030 URL: https://svnweb.freebsd.org/changeset/base/357030 Log: MFC of 356739 Optimize quota sync'ing Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- stable/11/sys/ufs/ffs/ffs_vfsops.c Thu Jan 23 06:02:52 2020 (r357029) +++ stable/11/sys/ufs/ffs/ffs_vfsops.c Thu Jan 23 06:06:32 2020 (r357030) @@ -1483,8 +1483,12 @@ ffs_sync_lazy(mp) allerror = 0; td = curthread; - if ((mp->mnt_flag & MNT_NOATIME) != 0) - goto qupdate; + if ((mp->mnt_flag & MNT_NOATIME) != 0) { +#ifdef QUOTA + qsync(mp); +#endif + goto sbupdate; + } MNT_VNODE_FOREACH_ACTIVE(vp, mp, mvp) { if (vp->v_type == VNON) { VI_UNLOCK(vp); @@ -1506,18 +1510,16 @@ ffs_sync_lazy(mp) if ((error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, td)) != 0) continue; +#ifdef QUOTA + qsyncvp(vp); +#endif if (sync_doupdate(ip)) error = ffs_update(vp, 0); if (error != 0) allerror = error; vput(vp); } - -qupdate: -#ifdef QUOTA - qsync(mp); -#endif - +sbupdate: if (VFSTOUFS(mp)->um_fs->fs_fmod != 0 && (error = ffs_sbupdate(VFSTOUFS(mp), MNT_LAZY, 0)) != 0) allerror = error; @@ -1610,6 +1612,9 @@ loop: } continue; } +#ifdef QUOTA + qsyncvp(vp); +#endif if ((error = ffs_syncvnode(vp, waitfor, 0)) != 0) allerror = error; vput(vp); @@ -1624,9 +1629,6 @@ loop: if (allerror == 0 && count) goto loop; } -#ifdef QUOTA - qsync(mp); -#endif devvp = ump->um_devvp; bo = &devvp->v_bufobj;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001230606.00N66W50002743>