Permalink
Commits on Jan 20, 2017
  1. Tag 0.7.0-rc3

    Third release candidate.
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Jan 20, 2017
  2. Fix unused variable warning

    The local mg variable is unused in non-debug builds.
    Wrap the variable in ASSERTV() so that it's only present
    in the debug build.  Introduced by OpenZFS 7303.
    
    Reviewed-by: Don Brady <don.brady@intel.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #5616
    behlendorf committed on GitHub Jan 20, 2017
Commits on Jan 19, 2017
  1. Suspend/resume zvol for recv and rollback

    When doing recv and rollback, dsl_dataset_clone_swap_sync_impl will be
    called to swap out the ds_objset and do dmu_objset_evict on the old one.
    However, currently zv->zv_objset will not be swapped out accordingly, so
    if anyone currently holds a fd on the zvol, we risk hitting a use-after-free.
    
    We fix this by introducing the suspend and resume mechanism of zsb to
    zv.  Before recv or rollback, we use zvol_suspend to block all access to
    zv_objset and shut it down. After the recv or rollback, we use zvol_resume
    to swap in zv_objset with the new ds_objset and unblock the access.
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
    Closes #4866 
    Closes #5609
    tuxoko committed with behlendorf Jan 19, 2017
  2. OpenZFS 6529 - Properly handle updates of variably-sized SA entries

    Porting notes:
    - This issue was first fixed in ZoL by commit d862cb0d.  That fix was
    then modified and an equivalent version of the patch landed in the
    upstream code base.  For additional details see the discussion in
    openzfs/openzfs#24 .
    
    This commit aligns ZoL with OpenZFS codebase.
    
    Authored by: Andriy Gapon <avg@icyb.net.ua>
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Ned Bass <bass6@llnl.gov>
    Reviewed by: Tim Chase <tim@chase2k.com>
    Approved by: Gordon Ross <gwr@nexenta.com>
    Ported-by: George Melikov mail@gmelikov.ru
    
    OpenZFS-issue: https://www.illumos.org/issues/6529
    OpenZFS-commit: openzfs/openzfs@e7e978b
    Closes #5606
    gmelikov committed with behlendorf Jan 19, 2017
  3. Disable racy test cases

    The following test cases may currently fail for benign reasons.
    Disable them until they can be updated to run reliably.
    
    - ro_props_001_pos - only recently enabled in ce43e88
    - nopwrite_volume
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #5614
    behlendorf committed on GitHub Jan 19, 2017
Commits on Jan 18, 2017
  1. OpenZFS 7659 - Missing thread_exit() in dmu_send.c

    Two threads send_traverse_thread() and receive_writer_thread() should
    end with thread_exit();
    
    Mostly a cosmetic issue under IllumOS.
    
    Authored by: Jorgen Lundman <lundman@lundman.net>
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: Matt Ahrens <mahrens@delphix.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    OpenZFS-issue: https://www.illumos.org/issues/7659
    OpenZFS-commit: openzfs/openzfs@a569268
    Closes #5603
    gmelikov committed with behlendorf Jan 18, 2017
Commits on Jan 17, 2017
  1. OpenZFS 7257 - zfs manpage user property length needs to be updated

    Since zpool version 16, this limit is actually 8192 characters.
    Additionally, this limit is actually 8192 bytes, as it supports UTF-8.
    
    Authored by: Eli Rosenthal <eli.rosenthal@delphix.com>
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    OpenZFS-issue: https://www.illumos.org/issues/7257
    OpenZFS-commit: openzfs/openzfs@3bc7169
    Closes #5608
    gmelikov committed with behlendorf Jan 17, 2017
  2. OpenZFS 7235 - remove unused func dsl_dataset_set_blkptr

    Authored by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Alex Reece <alex@delphix.com>
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Approved by: Robert Mustacchi <rm@joyent.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    OpenZFS-issue: https://www.illumos.org/issues/7235
    OpenZFS-commit: openzfs/openzfs@bd56f80
    Closes #5604
    gmelikov committed with behlendorf Jan 17, 2017
  3. OpenZFS 7256 - low probability race in zfs_get_data

    Authored by: Andriy Gapon <andriy.gapon@clusterhq.com>
    Reviewed by: Matt Ahrens <mahrens@delphix.com>
    Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    OpenZFS-issue: https://www.illumos.org/issues/7256
    OpenZFS-commit: openzfs/openzfs@6ed18a8
    Closes #5601
    gmelikov committed with behlendorf Jan 17, 2017
  4. OpenZFS 7071 - lzc_snapshot does not fill in errlist on ENOENT

    Authored by: Igor Kozhukhov ikozhukhov@gmail.com
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    OpenZFS-issue: https://www.illumos.org/issues/7071
    OpenZFS-commit: openzfs/openzfs@25f7d99
    Closes #5597
    gmelikov committed with behlendorf Jan 17, 2017
  5. OpenZFS 7082 - bptree_iterate() passes wrong args to zfs_dbgmsg()

    Authored by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Approved by: Dan McDonald <danmcd@omniti.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    OpenZFS-issue: https://www.illumos.org/issues/7082
    OpenZFS-commit: openzfs/openzfs@10e67aa
    Closes #5596
    gmelikov committed with behlendorf Jan 17, 2017
  6. OpenZFS 6586 - Whitespace inconsistencies in the spa feature dependen…

    …cy arrays in zfeature_common.c
    
    Porting Notes:
    - Preserved 'static const spa_feature_t hole_birth_deps[]'.
    
    Authored by: ilovezfs <ilovezfs@icloud.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Richard Laager <rlaager@wiktel.com>
    Approved by: Robert Mustacchi <rm@joyent.com>
    Reviewed-by: George Melikov <mail@gmelikov.ru>
    Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
    Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
    
    OpenZFS-issue: https://www.illumos.org/issues/6586
    OpenZFS-commit: openzfs/openzfs@22b6687
    Closes #5592
    behlendorf committed on GitHub Jan 17, 2017
  7. OpenZFS 6550 - cmd/zfs: cleanup gcc warnings

    Porting Notes:
    - Many of the fixes proposed by this patch were already applied.
    In the cases where a different but equivalent fix was made the
    code was updated with the OpenZFS version to minimize differences.
    
    Authored by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Approved by: Dan McDonald <danmcd@omniti.com>
    Reviewed-by: George Melikov <mail@gmelikov.ru>
    Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
    
    OpenZFS-issue: https://www.illumos.org/issues/6550
    OpenZFS-commit: openzfs/openzfs@c16bcc4
    Closes #5591
    behlendorf committed on GitHub Jan 17, 2017
  8. OpenZFS 6551 - cmd/zpool: cleanup gcc warnings

    Porting Notes:
    - Many of the fixes proposed by this patch were already applied.
    In the cases where a different but equivalent fix was made the
    code was updated with the OpenZFS version to minimize differences.
    - The zpool_get_vdev_by_name() function was previously removed
    by commit  235db0a.
    
    Authored by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Approved by: Robert Mustacchi <rm@joyent.com>
    Reviewed-by: George Melikov <mail@gmelikov.ru>
    Reviewed-by: Haakan T Johansson <f96hajo@chalmers.se>
    Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
    
    OpenZFS-issue: https://www.illumos.org/issues/6551
    OpenZFS-commit: openzfs/openzfs@b327cd3
    Closes #5590
    behlendorf committed on GitHub Jan 17, 2017
Commits on Jan 13, 2017
  1. Don't hardcode perl path but use env instead

    Also replace the deprecated "-w" argument with "use warnings;", as
    otherwise env would invoke a command called "perl -w".
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Clemens Fruhwirth <clemens@endorphin.org>
    Closes #5552
    clefru committed with behlendorf Jan 13, 2017
  2. Fix unallocated object detection for large_dnode datasets

    Fix dmu_object_next() to correctly handle unallocated objects on
    large_dnode datasets.
    
    We implement this by scanning the dnode block until we find the correct
    offset to be used in dnode_next_offset(). This is necessary because we
    can't assume *objectp is a hole even if dmu_object_info() returns
    ENOENT.
    
    This fixes a couple of issues with zfs receive on large_dnode datasets.
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Ned Bass <bass6@llnl.gov>
    Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
    Closes #5027 
    Closes #5532
    loli10K committed with behlendorf Jan 13, 2017
  3. OpenZFS 7603 - xuio_stat_wbuf_* should be declared (void)

    Porting Notes:
    - include/sys/dmu.h prototypes were already updated in 0bc8fd7
    
    Authored by: Prashanth Sreenivasa <pks@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
    Approved by: Richard Lowe <richlowe@richlowe.net>
    Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
    
    OpenZFS-issue: https://www.illumos.org/issues/7603
    OpenZFS-commit: openzfs/openzfs@99aa8b5
    Closes #5586
    behlendorf committed on GitHub Jan 13, 2017
  4. OpenZFS 7181 - race between zfs_mount and zfs_ioc_rollback

    Authored by: Andriy Gapon <andriy.gapon@clusterhq.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>
    Reviewed-by: Richard Yao <ryao@gentoo.org>
    Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
    Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
    
    OpenZFS-issue: https://www.illumos.org/issues/7181
    OpenZFS-commit: openzfs/openzfs@90f2c09
    Closes #5585
    behlendorf committed on GitHub Jan 13, 2017
  5. module/Makefile.in: use relative cp

    Assuming /bin/cp causes problems on systems where cp is
    not in /bin such as NixOS.
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Joerg Thalheim <joerg@higgsboson.tk>
    Closes #5548
    Mic92 committed with behlendorf Jan 13, 2017
  6. Add *_by-dnode routines

    Add *_by_dnode() routines for accessing objects given their
    dnode_t *, this is more efficient than accessing the object by 
    (objset_t *, uint64_t object).  This change converts some but
    not all of the existing consumers.  As performance-sensitive
    code paths are discovered they should be converted to use
    these routines.
    
    Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
    Closes #5534 
    Issue #4802
    bzzz77 committed with behlendorf Jan 13, 2017
  7. OpenZFS 7743 - per-vdev-zaps init path for upgrade

    Authored by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: Matt Ahrens <mahrens@delphix.com>
    Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Don Brady <don.brady@intel.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: Joe Stein <jas14@cs.brown.edu>
    Ported-by: Don Brady <don.brady@intel.com>
    
    When loading a pool that had been created before the existance of
    per-vdev zaps, on a system that knows about per-vdev zaps, the
    per-vdev zaps will not be allocated and initialized.
    
    This appears to be because the logic that would have done so, in
    spa_sync_config_object(), is not reached under normal operation. It is
    only reached if spa_config_dirty_list is non-empty.
    
    The fix is to add another `AVZ_ACTION_` enum that will allow this code
    to be reached when we detect that we're loading an old pool, even when
    there are no dirty configs.
    
    OpenZFS-issue: https://www.illumos.org/issues/7743
    OpenZFS-commit: openzfs/openzfs@e2d29d0
    Closes #5582
    don-brady committed with behlendorf Jan 13, 2017
  8. OpenZFS 7276 - zfs(1m) manpage could better describe space properties

    Authored by: Pavel Zakharov <pavel.zakharov@delphix.com>
    Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    OpenZFS-issue: https://www.illumos.org/issues/7276
    OpenZFS-commit: openzfs/openzfs@d750135
    OpenZFS-commit: openzfs/openzfs@29c6739
    Closes #5549
    gmelikov committed with behlendorf Jan 13, 2017
  9. Fix zfs-share systemd unit file

    Use the system /bin directory rather than the package install
    @bindir@.  This allows --prefix=/usr/local to work as intended.
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
    Closes #5559
    loli10K committed with behlendorf Jan 13, 2017
Commits on Jan 12, 2017
  1. OpenZFS 6603 - zfeature_register() should verify ZFEATURE_FLAG_PER_DA…

    …TASET implies SPA_FEATURE_EXTENSIBLE_DATASET
    
    Authored by: ilovezfs <ilovezfs@icloud.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Richard Laager <rlaager@wiktel.com>
    Approved by: Robert Mustacchi <rm@joyent.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    OpenZFS-issue: https://www.illumos.org/issues/6603
    OpenZFS-commit: openzfs/openzfs@0803e91
    Closes #5573
    gmelikov committed with behlendorf Jan 12, 2017
  2. OpenZFS 7303 - dynamic metaslab selection

    This change introduces a new weighting algorithm to improve
    metaslab selection. The new weighting algorithm relies on the
    SPACEMAP_HISTOGRAM feature. As a result, the metaslab weight
    now encodes the type of weighting algorithm used (size-based
    vs segment-based).
    
    Porting Notes: The metaslab allocation tracing code is conditionally
    removed on linux (dependent on mdb debugger).
    
    Authored by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Alex Reece <alex@delphix.com>
    Reviewed by: Chris Siden <christopher.siden@delphix.com>
    Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
    Reviewed by: Pavel Zakharov pavel.zakharov@delphix.com
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Reviewed by: Don Brady <don.brady@intel.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Ported-by: Don Brady <don.brady@intel.com>
    
    OpenZFS-issue: https://www.illumos.org/issues/7303
    OpenZFS-commit: openzfs/openzfs@d519093
    Closes #5404
    don-brady committed with behlendorf Jan 12, 2017
  3. OpenZFS 6637 - replacing "dontclose" with "should_close"

    Authored by: David Schwartz <dschwartz783@gmail.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Prakash Surya <prakash.surya@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    I find that this is a lot easier to read. "not don't close" is somewhat tough on the eyes.
    
    OpenZFS-issue: https://www.illumos.org/issues/6637
    OpenZFS-commit: openzfs/openzfs@d189620
    Closes #5572
    gmelikov committed with behlendorf Jan 12, 2017
  4. OpenZFS 6328 - Fix cstyle errors in zfs codebase

    Authored by: Paul Dagnelie <pcd@delphix.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Alex Reece <alex@delphix.com>
    Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
    Reviewed by: Jorgen Lundman <lundman@lundman.net>
    Approved by: Robert Mustacchi <rm@joyent.com>
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Ported-by: George Melikov <mail@gmelikov.ru>
    
    OpenZFS-issue: https://www.illumos.org/issues/6328
    OpenZFS-commit: illumos/illumos-gate@9a686fb
    Closes #5579
    gmelikov committed with behlendorf Jan 12, 2017
Commits on Jan 3, 2017
  1. Further work on Github usability (issue templates)

    Make issue template more obvious about importance of
    searching the issue tracker first, and wrap logs appropriately.
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
    Closes #5542
    gmelikov committed with behlendorf Jan 3, 2017
  2. Fix TypeError: unorderable types: str() > int() in arc_summary.py

    Running arc_summary.py with a l2arc cache device around produces
    the following error:
    
      Traceback (most recent call last):
        File "/usr/bin/arc_summary.py", line 1148, in <module>
          main()
        File "/usr/bin/arc_summary.py", line 1144, in main
          page(Kstat)
        File "/usr/bin/arc_summary.py", line 724, in _l2arc_summary
          arc["l2_arc_evicts"]["reading"] > 0:
      TypeError: unorderable types: str() > int()
    
    This is due to arc["l2_arc_evicts"]['lock_retries'] and
    arc["l2_arc_evicts"]["reading"] both being strings, returned
    from fHits() earlier. Rather than adding them up and checking
    if the result is > 0, this checks if either string is != '0'.
    
    Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
    Closes #5538
    jstenback committed with behlendorf Jan 3, 2017