Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jun 2019 19:53:39 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r348576 - vendor-sys/illumos/dist/uts/common/fs/zfs
Message-ID:  <201906031953.x53JrdsH016468@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Jun  3 19:53:39 2019
New Revision: 348576
URL: https://svnweb.freebsd.org/changeset/base/348576

Log:
  9963 Seperate tunable for disabling ZIL vdev flush
  
  illumos/illumos-gate@f8fdf6812567ce1a3b76a6bee2ee3f04bd3fcaca
  
  Reviewed by: Matt Ahrens <matt@delphix.com>
  Reviewed by: Brad Lewis <brad.lewis@delphix.com>
  Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
  Approved by: Dan McDonald <danmcd@joyent.com>
  Author:     Prakash Surya <prakash.surya@delphix.com>

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c
  vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c	Mon Jun  3 19:37:14 2019	(r348575)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c	Mon Jun  3 19:53:39 2019	(r348576)
@@ -38,6 +38,13 @@
 #include <sys/fm/fs/zfs.h>
 
 /*
+ * Tunable parameter for debugging or performance analysis. Setting this
+ * will cause pool corruption on power loss if a volatile out-of-order
+ * write cache is enabled.
+ */
+boolean_t zfs_nocacheflush = B_FALSE;
+
+/*
  * Virtual device vector for disks.
  */
 

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c	Mon Jun  3 19:37:14 2019	(r348575)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c	Mon Jun  3 19:53:39 2019	(r348576)
@@ -95,11 +95,12 @@ int zfs_commit_timeout_pct = 5;
 int zil_replay_disable = 0;
 
 /*
- * 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.
+ * Disable the DKIOCFLUSHWRITECACHE commands that are normally sent to
+ * the disk(s) by the ZIL after an LWB write has completed. Setting this
+ * will cause ZIL corruption on power loss if a volatile out-of-order
+ * write cache is enabled.
  */
-boolean_t zfs_nocacheflush = B_FALSE;
+boolean_t zil_nocacheflush = B_FALSE;
 
 /*
  * Limit SLOG write size per commit executed with synchronous priority.
@@ -991,7 +992,7 @@ zil_lwb_add_block(lwb_t *lwb, const blkptr_t *bp)
 	int ndvas = BP_GET_NDVAS(bp);
 	int i;
 
-	if (zfs_nocacheflush)
+	if (zil_nocacheflush)
 		return;
 
 	mutex_enter(&lwb->lwb_vdev_lock);
@@ -1015,7 +1016,7 @@ zil_lwb_add_txg(lwb_t *lwb, uint64_t txg)
 /*
  * This function is a called after all VDEVs associated with a given lwb
  * write have completed their DKIOCFLUSHWRITECACHE command; or as soon
- * as the lwb write completes, if "zfs_nocacheflush" is set.
+ * as the lwb write completes, if "zil_nocacheflush" is set.
  *
  * The intention is for this function to be called as soon as the
  * contents of an lwb are considered "stable" on disk, and will survive



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906031953.x53JrdsH016468>