--- a/usr/src/uts/common/fs/zfs/vdev_disk.c Sun Oct 08 21:26:45 2006 -0700
+++ b/usr/src/uts/common/fs/zfs/vdev_disk.c Mon Oct 09 10:56:01 2006 -0700
@@ -37,6 +37,13 @@
* Virtual device vector for disks.
*/
+/*
+ * Tunable parameter for debugging or performance analysis. Setting
+ * zfs_nocacheflush will cause corruption on power loss if a volatile
+ * out-of-order write cache is enabled.
+ */
+boolean_t zfs_nocacheflush = B_FALSE;
+
extern ldi_ident_t zfs_li;
typedef struct vdev_disk_buf {
@@ -255,6 +262,9 @@
case DKIOCFLUSHWRITECACHE:
+ if (zfs_nocacheflush)
+ break;
+
if (vd->vdev_nowritecache) {
zio->io_error = ENOTSUP;
break;