Changeset View
Changeset View
Standalone View
Standalone View
sys/ufs/ffs/ffs_vfsops.c
Show First 20 Lines • Show All 1,452 Lines • ▼ Show 20 Lines | ffs_sync_lazy_filter(struct vnode *vp, void *arg __unused) | ||||
/* | /* | ||||
* Flags are safe to access because ->v_data invalidation | * Flags are safe to access because ->v_data invalidation | ||||
* is held off by listmtx. | * is held off by listmtx. | ||||
*/ | */ | ||||
if (vp->v_type == VNON) | if (vp->v_type == VNON) | ||||
return (false); | return (false); | ||||
ip = VTOI(vp); | ip = VTOI(vp); | ||||
if (!sync_doupdate(ip) && (vp->v_iflag & VI_OWEINACT) == 0) | if (!sync_doupdate(ip) && (vp->v_irflag & VIRF_OWEINACT) == 0) | ||||
return (false); | return (false); | ||||
return (true); | return (true); | ||||
} | } | ||||
/* | /* | ||||
* For a lazy sync, we only care about access times, quotas and the | * For a lazy sync, we only care about access times, quotas and the | ||||
* superblock. Other filesystem changes are already converted to | * superblock. Other filesystem changes are already converted to | ||||
* cylinder group blocks or inode blocks updates and are written to | * cylinder group blocks or inode blocks updates and are written to | ||||
Show All 25 Lines | MNT_VNODE_FOREACH_LAZY(vp, mp, mvp, ffs_sync_lazy_filter, NULL) { | ||||
/* | /* | ||||
* The IN_ACCESS flag is converted to IN_MODIFIED by | * The IN_ACCESS flag is converted to IN_MODIFIED by | ||||
* ufs_close() and ufs_getattr() by the calls to | * ufs_close() and ufs_getattr() by the calls to | ||||
* ufs_itimes_locked(), without subsequent UFS_UPDATE(). | * ufs_itimes_locked(), without subsequent UFS_UPDATE(). | ||||
* Test also all the other timestamp flags too, to pick up | * Test also all the other timestamp flags too, to pick up | ||||
* any other cases that could be missed. | * any other cases that could be missed. | ||||
*/ | */ | ||||
if (!sync_doupdate(ip) && (vp->v_iflag & VI_OWEINACT) == 0) { | if (!sync_doupdate(ip) && (vp->v_irflag & VIRF_OWEINACT) == 0) { | ||||
VI_UNLOCK(vp); | VI_UNLOCK(vp); | ||||
continue; | continue; | ||||
} | } | ||||
if ((error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, | if ((error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK, | ||||
td)) != 0) | td)) != 0) | ||||
continue; | continue; | ||||
#ifdef QUOTA | #ifdef QUOTA | ||||
qsyncvp(vp); | qsyncvp(vp); | ||||
▲ Show 20 Lines • Show All 887 Lines • Show Last 20 Lines |