Drag another softupdates tentacle back into FFS: Now that FFS's
vop_fsync is separate from the internal use we can do the full job there.
This commit is contained in:
parent
7990a18c7b
commit
88e5b12a20
@ -89,7 +89,6 @@ static int extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
|
||||
size_t nbytes, struct thread *td);
|
||||
|
||||
int (*union_dircheckp)(struct thread *td, struct vnode **, struct file *);
|
||||
int (*softdep_fsync_hook)(struct vnode *);
|
||||
|
||||
/*
|
||||
* The module initialization routine for POSIX asynchronous I/O will
|
||||
@ -3149,9 +3148,6 @@ fsync(td, uap)
|
||||
VM_OBJECT_UNLOCK(vp->v_object);
|
||||
}
|
||||
error = VOP_FSYNC(vp, MNT_WAIT, td);
|
||||
if (error == 0 && vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP)
|
||||
&& softdep_fsync_hook != NULL)
|
||||
error = (*softdep_fsync_hook)(vp);
|
||||
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
vn_finished_write(mp);
|
||||
|
@ -89,7 +89,6 @@ static int extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
|
||||
size_t nbytes, struct thread *td);
|
||||
|
||||
int (*union_dircheckp)(struct thread *td, struct vnode **, struct file *);
|
||||
int (*softdep_fsync_hook)(struct vnode *);
|
||||
|
||||
/*
|
||||
* The module initialization routine for POSIX asynchronous I/O will
|
||||
@ -3149,9 +3148,6 @@ fsync(td, uap)
|
||||
VM_OBJECT_UNLOCK(vp->v_object);
|
||||
}
|
||||
error = VOP_FSYNC(vp, MNT_WAIT, td);
|
||||
if (error == 0 && vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP)
|
||||
&& softdep_fsync_hook != NULL)
|
||||
error = (*softdep_fsync_hook)(vp);
|
||||
|
||||
VOP_UNLOCK(vp, 0, td);
|
||||
vn_finished_write(mp);
|
||||
|
@ -568,7 +568,6 @@ struct vattr;
|
||||
struct vnode;
|
||||
|
||||
extern int (*lease_check_hook)(struct vop_lease_args *);
|
||||
extern int (*softdep_fsync_hook)(struct vnode *);
|
||||
extern int (*softdep_process_worklist_hook)(struct mount *);
|
||||
|
||||
/* cache_* may belong in namei.h. */
|
||||
|
@ -987,7 +987,6 @@ softdep_initialize()
|
||||
|
||||
/* hooks through which the main kernel code calls us */
|
||||
softdep_process_worklist_hook = softdep_process_worklist;
|
||||
softdep_fsync_hook = softdep_fsync;
|
||||
|
||||
/* initialise bioops hack */
|
||||
bioops.io_start = softdep_disk_io_initiation;
|
||||
@ -1006,7 +1005,6 @@ softdep_uninitialize()
|
||||
{
|
||||
|
||||
softdep_process_worklist_hook = NULL;
|
||||
softdep_fsync_hook = NULL;
|
||||
hashdestroy(pagedep_hashtbl, M_PAGEDEP, pagedep_hash);
|
||||
hashdestroy(inodedep_hashtbl, M_INODEDEP, inodedep_hash);
|
||||
hashdestroy(newblk_hashtbl, M_NEWBLK, newblk_hash);
|
||||
|
@ -160,6 +160,13 @@ ffs_fsync(struct vop_fsync_args *ap)
|
||||
int error;
|
||||
|
||||
error = ffs_syncvnode(ap->a_vp, ap->a_waitfor);
|
||||
#ifdef SOFTUPDATES
|
||||
if (error)
|
||||
return (error);
|
||||
if (ap->a_waitfor == MNT_WAIT &&
|
||||
(ap->a_vp->v_mount->mnt_flag & MNT_SOFTDEP))
|
||||
error = softdep_fsync(ap->a_vp);
|
||||
#endif
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user