don't do any flush-behind for async mounts.
this matches the traditional behaviour.
This commit is contained in:
parent
85b957a2b0
commit
79c365e60e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: msdosfs_vnops.c,v 1.120 2002/03/08 22:07:53 jdolecek Exp $ */
|
||||
/* $NetBSD: msdosfs_vnops.c,v 1.121 2002/03/17 23:58:09 chs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
|
||||
@ -48,7 +48,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.120 2002/03/08 22:07:53 jdolecek Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.121 2002/03/17 23:58:09 chs Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -562,6 +562,7 @@ msdosfs_write(v)
|
||||
struct denode *dep = VTODE(vp);
|
||||
struct msdosfsmount *pmp = dep->de_pmp;
|
||||
struct ucred *cred = ap->a_cred;
|
||||
boolean_t async;
|
||||
|
||||
#ifdef MSDOSFS_DEBUG
|
||||
printf("msdosfs_write(vp %p, uio %p, ioflag %x, cred %p\n",
|
||||
@ -611,6 +612,7 @@ msdosfs_write(v)
|
||||
/*
|
||||
* Remember some values in case the write fails.
|
||||
*/
|
||||
async = vp->v_mount->mnt_flag & MNT_ASYNC;
|
||||
resid = uio->uio_resid;
|
||||
osize = dep->de_FileSize;
|
||||
|
||||
@ -647,7 +649,7 @@ msdosfs_write(v)
|
||||
* XXXUBC simplistic async flushing.
|
||||
*/
|
||||
|
||||
if (oldoff >> 16 != uio->uio_offset >> 16) {
|
||||
if (!async && oldoff >> 16 != uio->uio_offset >> 16) {
|
||||
simple_lock(&vp->v_interlock);
|
||||
error = VOP_PUTPAGES(vp, (oldoff >> 16) << 16,
|
||||
(uio->uio_offset >> 16) << 16, PGO_CLEANIT);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ext2fs_readwrite.c,v 1.22 2001/11/30 07:05:54 chs Exp $ */
|
||||
/* $NetBSD: ext2fs_readwrite.c,v 1.23 2002/03/17 23:58:10 chs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 Manuel Bouyer.
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ext2fs_readwrite.c,v 1.22 2001/11/30 07:05:54 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ext2fs_readwrite.c,v 1.23 2002/03/17 23:58:10 chs Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -211,6 +211,7 @@ ext2fs_write(v)
|
||||
vsize_t bytelen;
|
||||
void *win;
|
||||
off_t oldoff;
|
||||
boolean_t async;
|
||||
|
||||
ioflag = ap->a_ioflag;
|
||||
uio = ap->a_uio;
|
||||
@ -258,6 +259,7 @@ ext2fs_write(v)
|
||||
return (EFBIG);
|
||||
}
|
||||
|
||||
async = vp->v_mount->mnt_flag & MNT_ASYNC;
|
||||
resid = uio->uio_resid;
|
||||
osize = ip->i_e2fs_size;
|
||||
|
||||
@ -295,7 +297,7 @@ ext2fs_write(v)
|
||||
* XXXUBC simplistic async flushing.
|
||||
*/
|
||||
|
||||
if (oldoff >> 16 != uio->uio_offset >> 16) {
|
||||
if (!async && oldoff >> 16 != uio->uio_offset >> 16) {
|
||||
simple_lock(&vp->v_interlock);
|
||||
error = VOP_PUTPAGES(vp, (oldoff >> 16) << 16,
|
||||
(uio->uio_offset >> 16) << 16, PGO_CLEANIT);
|
||||
|
Loading…
Reference in New Issue
Block a user