define PUFFS_KFLAG_WTCACHE, which makes the page cache write-through
This commit is contained in:
parent
a29785b911
commit
bc38632c58
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: puffs_msgif.h,v 1.27 2007/04/16 13:03:26 pooka Exp $ */
|
/* $NetBSD: puffs_msgif.h,v 1.28 2007/04/22 18:02:05 pooka Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
|
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
|
||||||
|
@ -105,7 +105,8 @@ struct puffs_kargs {
|
||||||
#define PUFFS_KFLAG_ALLOWCTL 0x01 /* ioctl/fcntl commands allowed */
|
#define PUFFS_KFLAG_ALLOWCTL 0x01 /* ioctl/fcntl commands allowed */
|
||||||
#define PUFFS_KFLAG_NOCACHE 0x02 /* flush page cache immediately */
|
#define PUFFS_KFLAG_NOCACHE 0x02 /* flush page cache immediately */
|
||||||
#define PUFFS_KFLAG_ALLOPS 0x04 /* ignore pa_vnopmask, send all */
|
#define PUFFS_KFLAG_ALLOPS 0x04 /* ignore pa_vnopmask, send all */
|
||||||
#define PUFFS_KFLAG_MASK 0x07
|
#define PUFFS_KFLAG_WTCACHE 0x08 /* page cache is write-through */
|
||||||
|
#define PUFFS_KFLAG_MASK 0x0f
|
||||||
|
|
||||||
#define PUFFS_FHFLAG_DYNAMIC 0x01
|
#define PUFFS_FHFLAG_DYNAMIC 0x01
|
||||||
#define PUFFS_FHFLAG_NFSV2 0x02
|
#define PUFFS_FHFLAG_NFSV2 0x02
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: puffs_vnops.c,v 1.61 2007/04/20 11:56:35 pooka Exp $ */
|
/* $NetBSD: puffs_vnops.c,v 1.62 2007/04/22 18:02:05 pooka Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
|
* Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved.
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.61 2007/04/20 11:56:35 pooka Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: puffs_vnops.c,v 1.62 2007/04/22 18:02:05 pooka Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/fstrans.h>
|
#include <sys/fstrans.h>
|
||||||
|
@ -1572,11 +1572,18 @@ puffs_write(void *v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* synchronous I/O? */
|
||||||
if (error == 0 && ap->a_ioflag & IO_SYNC) {
|
if (error == 0 && ap->a_ioflag & IO_SYNC) {
|
||||||
simple_lock(&vp->v_interlock);
|
simple_lock(&vp->v_interlock);
|
||||||
error = VOP_PUTPAGES(vp, trunc_page(origoff),
|
error = VOP_PUTPAGES(vp, trunc_page(origoff),
|
||||||
round_page(uio->uio_offset),
|
round_page(uio->uio_offset),
|
||||||
PGO_CLEANIT | PGO_SYNCIO);
|
PGO_CLEANIT | PGO_SYNCIO);
|
||||||
|
|
||||||
|
/* write though page cache? */
|
||||||
|
} else if (error == 0 && pmp->pmp_flags & PUFFS_KFLAG_WTCACHE) {
|
||||||
|
simple_lock(&vp->v_interlock);
|
||||||
|
error = VOP_PUTPAGES(vp, trunc_page(origoff),
|
||||||
|
round_page(uio->uio_offset), PGO_CLEANIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
puffs_updatenode(vp, uflags);
|
puffs_updatenode(vp, uflags);
|
||||||
|
|
Loading…
Reference in New Issue