]> git.proxmox.com Git - mirror_zfs-debian.git/blobdiff - module/zfs/zio_inject.c
Imported Upstream version 0.6.4.2
[mirror_zfs-debian.git] / module / zfs / zio_inject.c
index 39ec590b5e7e931ec38b697016041ddff8ebbcdc..5afb23c595aeddef4cb1a0f0ed3547dab81eb1d9 100644 (file)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
  */
 
 /*
@@ -64,7 +64,7 @@ static int inject_next_id = 1;
  * Returns true if the given record matches the I/O in progress.
  */
 static boolean_t
-zio_match_handler(zbookmark_t *zb, uint64_t type,
+zio_match_handler(zbookmark_phys_t *zb, uint64_t type,
     zinject_record_t *record, int error)
 {
        /*
@@ -345,9 +345,10 @@ spa_handle_ignored_writes(spa_t *spa)
 
                if (handler->zi_record.zi_duration > 0) {
                        VERIFY(handler->zi_record.zi_timer == 0 ||
-                           handler->zi_record.zi_timer +
-                           handler->zi_record.zi_duration * hz >
-                           ddi_get_lbolt64());
+                           ddi_time_after64(
+                           (int64_t)handler->zi_record.zi_timer +
+                           handler->zi_record.zi_duration * hz,
+                           ddi_get_lbolt64()));
                } else {
                        /* duration is negative so the subtraction here adds */
                        VERIFY(handler->zi_record.zi_timer == 0 ||
@@ -524,6 +525,11 @@ zio_inject_fini(void)
 }
 
 #if defined(_KERNEL) && defined(HAVE_SPL)
-module_param(zio_injection_enabled, int, 0644);
-MODULE_PARM_DESC(zio_injection_enabled, "Enable fault injection");
+EXPORT_SYMBOL(zio_injection_enabled);
+EXPORT_SYMBOL(zio_inject_fault);
+EXPORT_SYMBOL(zio_inject_list_next);
+EXPORT_SYMBOL(zio_clear_fault);
+EXPORT_SYMBOL(zio_handle_fault_injection);
+EXPORT_SYMBOL(zio_handle_device_injection);
+EXPORT_SYMBOL(zio_handle_label_injection);
 #endif