]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/vdev_file.c
OpenZFS 6531 - Provide mechanism to artificially limit disk performance
[mirror_zfs.git] / module / zfs / vdev_file.c
index a29ea7bf9515a2b5106417b4fd036e0cfc3fe616..bca4175a6ff414f7332e23b9433187a2e6584d76 100644 (file)
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
  */
 
 #include <sys/zfs_context.h>
@@ -159,7 +159,7 @@ vdev_file_io_strategy(void *arg)
        if (resid != 0 && zio->io_error == 0)
                zio->io_error = SET_ERROR(ENOSPC);
 
-       zio_interrupt(zio);
+       zio_delay_interrupt(zio);
 }
 
 static void
@@ -217,6 +217,8 @@ vdev_file_io_start(zio_t *zio)
                return;
        }
 
+       zio->io_target_timestamp = zio_handle_io_delay(zio);
+
        VERIFY3U(taskq_dispatch(system_taskq, vdev_file_io_strategy, zio,
            TQ_SLEEP), !=, 0);
 }