MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vfs_write_resume

Function vfs_write_resume

freebsd/kern/vfs_vnops.c:2044–2071  ·  view source on GitHub ↗

* Request a filesystem to resume write operations. */

Source from the content-addressed store, hash-verified

2042 * Request a filesystem to resume write operations.
2043 */
2044void
2045vfs_write_resume(struct mount *mp, int flags)
2046{
2047
2048 MNT_ILOCK(mp);
2049 if ((mp->mnt_kern_flag & MNTK_SUSPEND) != 0) {
2050 KASSERT(mp->mnt_susp_owner == curthread, ("mnt_susp_owner"));
2051 mp->mnt_kern_flag &= ~(MNTK_SUSPEND | MNTK_SUSPEND2 |
2052 MNTK_SUSPENDED);
2053 mp->mnt_susp_owner = NULL;
2054 wakeup(&mp->mnt_writeopcount);
2055 wakeup(&mp->mnt_flag);
2056 curthread->td_pflags &= ~TDP_IGNSUSP;
2057 if ((flags & VR_START_WRITE) != 0) {
2058 MNT_REF(mp);
2059 mp->mnt_writeopcount++;
2060 }
2061 MNT_IUNLOCK(mp);
2062 if ((flags & VR_NO_SUSPCLR) == 0)
2063 VFS_SUSP_CLEAN(mp);
2064 vfs_op_exit(mp);
2065 } else if ((flags & VR_START_WRITE) != 0) {
2066 MNT_REF(mp);
2067 vn_start_write_refed(mp, 0, true);
2068 } else {
2069 MNT_IUNLOCK(mp);
2070 }
2071}
2072
2073/*
2074 * Helper loop around vfs_write_suspend() for filesystem unmount VFS

Callers 2

vfs_write_suspendFunction · 0.85
resume_all_fsFunction · 0.85

Calls 3

vfs_op_exitFunction · 0.85
vn_start_write_refedFunction · 0.85
wakeupFunction · 0.70

Tested by

no test coverage detected