Author: delphij
Date: Sat Oct  4 07:37:17 2014
New Revision: 272498
URL: https://svnweb.freebsd.org/changeset/base/272498

Log:
  5149 zvols need a way to ignore DKIOCFREE
  Reviewed by: Adam Leventhal <a...@delphix.com>
  Reviewed by: Matthew Ahrens <matthew.ahr...@delphix.com>
  Reviewed by: Sebastien Roy <sebastien....@delphix.com>
  Reviewed by: Dan McDonald <dan...@omniti.com>
  Reviewed by: Saso Kiselkov <skiselkov...@gmail.com>
  Approved by: Robert Mustacchi <r...@joyent.com>
  Author: George Wilson <george.wil...@delphix.com>
  
  illumos/illumos-gate@893c83ba3e1c87a785b5274ce2ef02f45fba6087

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

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c    Sat Oct  4 07:35:50 
2014        (r272497)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/zvol.c    Sat Oct  4 07:37:17 
2014        (r272498)
@@ -142,6 +142,11 @@ typedef struct zvol_state {
  */
 int zvol_maxphys = DMU_MAX_ACCESS/2;
 
+/*
+ * Toggle unmap functionality.
+ */
+boolean_t zvol_unmap_enabled = B_TRUE;
+
 extern int zfs_set_prop_nvlist(const char *, zprop_source_t,
     nvlist_t *, nvlist_t *);
 static int zvol_remove_zv(zvol_state_t *);
@@ -1769,6 +1774,9 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t 
                dkioc_free_t df;
                dmu_tx_t *tx;
 
+               if (!zvol_unmap_enabled)
+                       break;
+
                if (ddi_copyin((void *)arg, &df, sizeof (df), flag)) {
                        error = SET_ERROR(EFAULT);
                        break;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to