1. 15 Apr, 2019 2 commits
  2. 14 Apr, 2019 4 commits
  3. 12 Apr, 2019 3 commits
  4. 11 Apr, 2019 1 commit
    • Alek P's avatar
      Allow zfs-tests to recover from hibernation · b31cf30a
      Alek P authored
      
      When a system sleeps during a zfs-test, the time spent
      hibernating is counted against the test's runtime even
      though the test can't and isn't running.
      This patch tries to detect timeouts due to hibernation and
      reruns tests that timed out due to system sleeping.
      In this version of the patch, the existing behavior of returning
      non-zero when a test was killed is preserved. With this patch applied
      we still return nonzero and we also automatically rerun the test we
      suspect of being killed due to system hibernation.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Reviewed by: John Kennedy <john.kennedy@delphix.com>
      Signed-off-by: default avatarAlek Pinchuk <apinchuk@datto.com>
      Closes #8575 
      b31cf30a
  5. 10 Apr, 2019 3 commits
  6. 08 Apr, 2019 3 commits
  7. 06 Apr, 2019 1 commit
  8. 05 Apr, 2019 3 commits
  9. 04 Apr, 2019 2 commits
  10. 03 Apr, 2019 1 commit
  11. 02 Apr, 2019 1 commit
  12. 01 Apr, 2019 2 commits
  13. 29 Mar, 2019 4 commits
    • Michael Niewöhner's avatar
      Fix systemd-import services · e03b25a5
      Michael Niewöhner authored
      
      On debian, systemd complains about missing /bin/awk because it
      actually is located at /usr/bin/awk. It is not a good idea to
      hardcode binary paths because different linux distros use different
      paths. According to systemd's man page it is absolutely safe to
      miss paths for binaries located at standard locations (/bin,
      /sbin, /usr/bin, ...).
      
      Further, replace this more or less complicated awk command by
      grep.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Signed-off-by: default avatarMichael Niewöhner <foss@mniewoehner.de>
      Issue #8510
      e03b25a5
    • Michael Niewöhner's avatar
      Remove hard dependency on bash · 3b261892
      Michael Niewöhner authored
      
      zfs-import-* services have a hard dependency on bash while not
      everyone has bash installed. At this point /bin/sh is sufficient,
      so use that.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Signed-off-by: default avatarMichael Niewöhner <foss@mniewoehner.de>
      Issue #8510
      3b261892
    • Tom Caputi's avatar
      Update raw send documentation · dd29864b
      Tom Caputi authored
      
      This patch simply clarifies some of the limitations related to
      raw sends in the man page. No functional changes.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Reviewed-by: default avatarJason Cohen <jwittlincohen@gmail.com>
      Signed-off-by: default avatarTom Caputi <tcaputi@datto.com>
      Closes #8503
      Closes #8544 
      dd29864b
    • Brian Behlendorf's avatar
      Add TRIM support · 1b939560
      Brian Behlendorf authored
      
      UNMAP/TRIM support is a frequently-requested feature to help
      prevent performance from degrading on SSDs and on various other
      SAN-like storage back-ends.  By issuing UNMAP/TRIM commands for
      sectors which are no longer allocated the underlying device can
      often more efficiently manage itself.
      
      This TRIM implementation is modeled on the `zpool initialize`
      feature which writes a pattern to all unallocated space in the
      pool.  The new `zpool trim` command uses the same vdev_xlate()
      code to calculate what sectors are unallocated, the same per-
      vdev TRIM thread model and locking, and the same basic CLI for
      a consistent user experience.  The core difference is that
      instead of writing a pattern it will issue UNMAP/TRIM commands
      for those extents.
      
      The zio pipeline was updated to accommodate this by adding a new
      ZIO_TYPE_TRIM type and associated spa taskq.  This new type makes
      is straight forward to add the platform specific TRIM/UNMAP calls
      to vdev_disk.c and vdev_file.c.  These new ZIO_TYPE_TRIM zios are
      handled largely the same way as ZIO_TYPE_READs or ZIO_TYPE_WRITEs.
      This makes it possible to largely avoid changing the pipieline,
      one exception is that TRIM zio's may exceed the 16M block size
      limit since they contain no data.
      
      In addition to the manual `zpool trim` command, a background
      automatic TRIM was added and is controlled by the 'autotrim'
      property.  It relies on the exact same infrastructure as the
      manual TRIM.  However, instead of relying on the extents in a
      metaslab's ms_allocatable range tree, a ms_trim tree is kept
      per metaslab.  When 'autotrim=on', ranges added back to the
      ms_allocatable tree are also added to the ms_free tree.  The
      ms_free tree is then periodically consumed by an autotrim
      thread which systematically walks a top level vdev's metaslabs.
      
      Since the automatic TRIM will skip ranges it considers too small
      there is value in occasionally running a full `zpool trim`.  This
      may occur when the freed blocks are small and not enough time
      was allowed to aggregate them.  An automatic TRIM and a manual
      `zpool trim` may be run concurrently, in which case the automatic
      TRIM will yield to the manual TRIM.
      Reviewed-by: default avatarJorgen Lundman <lundman@lundman.net>
      Reviewed-by: default avatarTim Chase <tim@chase2k.com>
      Reviewed-by: default avatarMatt Ahrens <mahrens@delphix.com>
      Reviewed-by: default avatarGeorge Wilson <george.wilson@delphix.com>
      Reviewed-by: default avatarSerapheim Dimitropoulos <serapheim@delphix.com>
      Contributions-by: default avatarSaso Kiselkov <saso.kiselkov@nexenta.com>
      Contributions-by: default avatarTim Chase <tim@chase2k.com>
      Contributions-by: default avatarChunwei Chen <tuxoko@gmail.com>
      Signed-off-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Closes #8419 
      Closes #598 
      1b939560
  14. 28 Mar, 2019 1 commit
  15. 27 Mar, 2019 1 commit
    • Tom Caputi's avatar
      Fix issues with truncated files in raw sends · 5dbf8b4e
      Tom Caputi authored
      
      This patch fixes a few issues with raw receives involving
      truncated files:
      
      * dnode_reallocate() now calls dnode_set_blksz() instead of
        dnode_setdblksz(). This ensures that any remaining dbufs with
        blkid 0 are resized along with their containing dnode upon
        reallocation.
      
      * One of the calls to dmu_free_long_range() in receive_object()
        needs to check that the object it is about to free some contents
        or hasn't been completely removed already by a previous call to
        dmu_free_long_object() in the same function.
      
      * The same call to dmu_free_long_range() in the previous point
        needs to ensure it uses the object's current block size and
        not the new block size. This ensures the blocks of the object
        that are supposed to be freed are completely removed and not
        simply partially zeroed out.
      
      This patch also adds handling for DRR_OBJECT_RANGE records to
      dprintf_drr() for debugging purposes.
      Reviewed-by: default avatarMatt Ahrens <mahrens@delphix.com>
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Signed-off-by: default avatarTom Caputi <tcaputi@datto.com>
      Closes #7378 
      Closes #8528 
      5dbf8b4e
  16. 26 Mar, 2019 3 commits
  17. 25 Mar, 2019 1 commit
  18. 22 Mar, 2019 3 commits
  19. 21 Mar, 2019 1 commit
    • Olaf Faaland's avatar
      MMP interval and fail_intervals in uberblock · 060f0226
      Olaf Faaland authored
      
      When Multihost is enabled, and a pool is imported, uberblock writes
      include ub_mmp_delay to allow an importing node to calculate the
      duration of an activity test.  This value, is not enough information.
      
      If zfs_multihost_fail_intervals > 0 on the node with the pool imported,
      the safe minimum duration of the activity test is well defined, but does
      not depend on ub_mmp_delay:
      
      zfs_multihost_fail_intervals * zfs_multihost_interval
      
      and if zfs_multihost_fail_intervals == 0 on that node, there is no such
      well defined safe duration, but the importing host cannot tell whether
      mmp_delay is high due to I/O delays, or due to a very large
      zfs_multihost_interval setting on the host which last imported the pool.
      As a result, it may use a far longer period for the activity test than
      is necessary.
      
      This patch renames ub_mmp_sequence to ub_mmp_config and uses it to
      record the zfs_multihost_interval and zfs_multihost_fail_intervals
      values, as well as the mmp sequence.  This allows a shorter activity
      test duration to be calculated by the importing host in most situations.
      These values are also added to the multihost_history kstat records.
      
      It calculates the activity test duration differently depending on
      whether the new fields are present or not; for importing pools with
      only ub_mmp_delay, it uses
      
      (zfs_multihost_interval + ub_mmp_delay) * zfs_multihost_import_intervals
      
      Which results in an activity test duration less sensitive to the leaf
      count.
      
      In addition, it makes a few other improvements:
      * It updates the "sequence" part of ub_mmp_config when MMP writes
        in between syncs occur.  This allows an importing host to detect MMP
        on the remote host sooner, when the pool is idle, as it is not limited
        to the granularity of ub_timestamp (1 second).
      * It issues writes immediately when zfs_multihost_interval is changed
        so remote hosts see the updated value as soon as possible.
      * It fixes a bug where setting zfs_multihost_fail_intervals = 1 results
        in immediate pool suspension.
      * Update tests to verify activity check duration is based on recorded
        tunable values, not tunable values on importing host.
      * Update tests to verify the expected number of uberblocks have valid
        MMP fields - fail_intervals, mmp_interval, mmp_seq (sequence number),
        that sequence number is incrementing, and that uberblock values match
        tunable settings.
      Reviewed-by: default avatarAndreas Dilger <andreas.dilger@whamcloud.com>
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Reviewed-by: default avatarTony Hutter <hutter2@llnl.gov>
      Signed-off-by: default avatarOlaf Faaland <faaland1@llnl.gov>
      Closes #7842 
      060f0226