Module Name: src
Committed By: snj
Date: Sat Apr 4 17:20:00 UTC 2009
Modified Files:
src/sys/dev [netbsd-5]: vnd.c
Log Message:
Pull up following revision(s) (requested by apb in ticket #653):
sys/dev/vnd.c: revision 1.195
Add FSYNC_CACHE flag to the VOP_FSYNC() call for the DIOCCACHESYNC ioctl.
PR 41015.
To generate a diff of this commit:
cvs rdiff -u -r1.187.4.2 -r1.187.4.3 src/sys/dev/vnd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/vnd.c
diff -u src/sys/dev/vnd.c:1.187.4.2 src/sys/dev/vnd.c:1.187.4.3
--- src/sys/dev/vnd.c:1.187.4.2 Sat Apr 4 17:17:38 2009
+++ src/sys/dev/vnd.c Sat Apr 4 17:20:00 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.187.4.2 2009/04/04 17:17:38 snj Exp $ */
+/* $NetBSD: vnd.c,v 1.187.4.3 2009/04/04 17:20:00 snj Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.187.4.2 2009/04/04 17:17:38 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.187.4.3 2009/04/04 17:20:00 snj Exp $");
#if defined(_KERNEL_OPT)
#include "fs_nfs.h"
@@ -1443,10 +1443,11 @@
memcpy(data, &newlabel, sizeof (struct olddisklabel));
break;
#endif
+
case DIOCCACHESYNC:
vn_lock(vnd->sc_vp, LK_EXCLUSIVE | LK_RETRY);
error = VOP_FSYNC(vnd->sc_vp, vnd->sc_cred,
- FSYNC_WAIT|FSYNC_DATAONLY, 0, 0);
+ FSYNC_WAIT | FSYNC_DATAONLY | FSYNC_CACHE, 0, 0);
VOP_UNLOCK(vnd->sc_vp, 0);
return error;