PERFORCE change 133645 for review

Peter Wemm peter at FreeBSD.org
Sat Jan 19 01:04:55 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=133645

Change 133645 by peter at peter_overcee on 2008/01/19 09:04:08

	Add sysctl to turn off fsync

Affected files ...

.. //depot/projects/hammer/sys/kern/vfs_syscalls.c#78 edit

Differences ...

==== //depot/projects/hammer/sys/kern/vfs_syscalls.c#78 (text+ko) ====

@@ -3216,6 +3216,8 @@
 }
 #endif
 
+static int nofsync = 0;
+SYSCTL_INT(_debug, OID_AUTO, nofsync, CTLFLAG_RW, &nofsync, 0, "");
 /*
  * Sync an open file.
  */
@@ -3238,6 +3240,8 @@
 	int error;
 
 	AUDIT_ARG(fd, uap->fd);
+	if (nofsync)
+		return (0);
 	if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0)
 		return (error);
 	vp = fp->f_vnode;


More information about the p4-projects mailing list