Implement VOP_FDATASYNC() for msdosfs.
Standard VOP_FSYNC() implementation just syncs data buffers, and due to this, is the correct and efficient implementation for msdosfs or any other filesystem which uses bufer cache trivially. Provide globally visible wrapper vop_stdfdatasync_buf() for future consumption by other filesystems. Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D7471
This commit is contained in:
parent
1d2537a26a
commit
47e61f6cc6
@ -1897,6 +1897,7 @@ struct vop_vector msdosfs_vnodeops = {
|
||||
.vop_close = msdosfs_close,
|
||||
.vop_create = msdosfs_create,
|
||||
.vop_fsync = msdosfs_fsync,
|
||||
.vop_fdatasync = vop_stdfdatasync_buf,
|
||||
.vop_getattr = msdosfs_getattr,
|
||||
.vop_inactive = msdosfs_inactive,
|
||||
.vop_link = msdosfs_link,
|
||||
|
@ -735,6 +735,17 @@ vop_stdfdatasync(struct vop_fdatasync_args *ap)
|
||||
return (VOP_FSYNC(ap->a_vp, MNT_WAIT, ap->a_td));
|
||||
}
|
||||
|
||||
int
|
||||
vop_stdfdatasync_buf(struct vop_fdatasync_args *ap)
|
||||
{
|
||||
struct vop_fsync_args apf;
|
||||
|
||||
apf.a_vp = ap->a_vp;
|
||||
apf.a_waitfor = MNT_WAIT;
|
||||
apf.a_td = ap->a_td;
|
||||
return (vop_stdfsync(&apf));
|
||||
}
|
||||
|
||||
/* XXX Needs good comment and more info in the manpage (VOP_GETPAGES(9)). */
|
||||
int
|
||||
vop_stdgetpages(ap)
|
||||
|
@ -720,6 +720,7 @@ int vfs_write_suspend(struct mount *mp, int flags);
|
||||
int vfs_write_suspend_umnt(struct mount *mp);
|
||||
void vnlru_free(int, struct vfsops *);
|
||||
int vop_stdbmap(struct vop_bmap_args *);
|
||||
int vop_stdfdatasync_buf(struct vop_fdatasync_args *);
|
||||
int vop_stdfsync(struct vop_fsync_args *);
|
||||
int vop_stdgetwritemount(struct vop_getwritemount_args *);
|
||||
int vop_stdgetpages(struct vop_getpages_args *);
|
||||
|
Loading…
Reference in New Issue
Block a user