summaryrefslogtreecommitdiffstats
path: root/sys/sys/vnode.h
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>2006-03-08 23:43:39 +0000
committertegge <tegge@FreeBSD.org>2006-03-08 23:43:39 +0000
commit2e0e03c06ff6c78e7d6f269c98e20d8e2eeb58dc (patch)
tree8446efea303e7dd86046218298bbbd2e8b1e8a1b /sys/sys/vnode.h
parentb33c92af90c5ffdd40c36b6a8094d3ae01b92331 (diff)
downloadFreeBSD-src-2e0e03c06ff6c78e7d6f269c98e20d8e2eeb58dc.zip
FreeBSD-src-2e0e03c06ff6c78e7d6f269c98e20d8e2eeb58dc.tar.gz
Use vn_start_secondary_write() and vn_finished_secondary_write() as a
replacement for vn_write_suspend_wait() to better account for secondary write processing. Close race where secondary writes could be started after ffs_sync() returned but before the file system was marked as suspended. Detect if secondary writes or softdep processing occurred during vnode sync loop in ffs_sync() and retry the loop if needed.
Diffstat (limited to 'sys/sys/vnode.h')
-rw-r--r--sys/sys/vnode.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 79de95c..dd51d92 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -603,6 +603,7 @@ int vrecycle(struct vnode *vp, struct thread *td);
int vn_close(struct vnode *vp,
int flags, struct ucred *file_cred, struct thread *td);
void vn_finished_write(struct mount *mp);
+void vn_finished_secondary_write(struct mount *mp);
int vn_isdisk(struct vnode *vp, int *errp);
int vn_lock(struct vnode *vp, int flags, struct thread *td);
int vn_open(struct nameidata *ndp, int *flagp, int cmode, int fdidx);
@@ -620,6 +621,8 @@ int vn_rdwr_inchunks(enum uio_rw rw, struct vnode *vp, void *base,
int vn_stat(struct vnode *vp, struct stat *sb, struct ucred *active_cred,
struct ucred *file_cred, struct thread *td);
int vn_start_write(struct vnode *vp, struct mount **mpp, int flags);
+int vn_start_secondary_write(struct vnode *vp, struct mount **mpp,
+ int flags);
int vn_write_suspend_wait(struct vnode *vp, struct mount *mp,
int flags);
int vn_writechk(struct vnode *vp);
OpenPOWER on IntegriCloud