Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Feb 26, 2013
  1. PPA release.

  2. Remove /etc/zfs/zdev.conf from the install list.

    Remove the deprecated `zdev.conf` file from the zfsutils manifest in
    anticipation of adding a `vdev_id.conf` converter and/or a debconf test.
    Git doesn't track empty directories, so also ensure that `/etc/zfs`
    stays registered to the zfsutils package by running `mkdir -p` on it
    in the rules file.
  3. Run `zfs ushare -a` before iscsi during shutdown.

    For Ubuntu, change the /etc/init.d/zfs-share sysv sequence numbers
    so that it unshares filesystems before the iSCSI target is stopped
    during system shutdown.
    This resolves the error:
    	* Removing iSCSI enterprise target modules: [fail]
    	  FATAL: Module iscsi_trgt module is in use.
    	* Killing all remaining processes... [fail]
    Closes: zfsonlinux/zfs#1271
  4. Delete stale debian/watch file.

    The watch file is still pointing to the defunct KQ repository,
    and using the obsolete Github redirector.
  5. Merge branch 'upstream'

Commits on Feb 24, 2013
  1. @dechamps @behlendorf

    Remove the bio_empty_barrier() check.

    dechamps committed with behlendorf
    To determine whether the kernel is capable of handling empty barrier
    BIOs, we check for the presence of the bio_empty_barrier() macro,
    which was introduced in 2.6.24. If this macro is defined, then we can
    flush disk vdevs; if it isn't, then flushing is disabled.
    Unfortunately, the bio_empty_barrier() macro was removed in 2.6.37,
    even though the kernel is still capable of handling empty barrier BIOs.
    As a result, flushing is effectively disabled on kernels >= 2.6.37,
    meaning that starting from this kernel version, zfs doesn't use
    barriers to guarantee on-disk data consistency. This is quite bad and
    can lead to potential data corruption on power failures.
    This patch fixes the issue by removing the configure check for
    bio_empty_barrier(), as we don't support kernels <= 2.6.24 anymore.
    Thanks to Richard Kojedzinszky for catching this nasty bug.
    Signed-off-by: Brian Behlendorf <>
    Closes #1318
  2. @dechamps @behlendorf

    Use -Werror for all kernel configure tests.

    dechamps committed with behlendorf
    As a matter of fact, we're already using -Werror for most tests because
    of a bug in kernel-bio-empty-barrier.m4 which sets -Werror without
    reverting it afterwards. This meant that all tests which ran after this
    one was using -Werror.
    This patch simply makes it clear that we're using -Werror and makes
    the code more readable and more predictable.
    Signed-off-by: Brian Behlendorf <>
    Closes #1317
Commits on Feb 21, 2013
  1. @behlendorf

    Enable zfs_arc_memory_throttle_disable by default

    behlendorf committed
    The zfs_arc_memory_throttle_disable module option was introduced
    by commit 0c5493d to resolve a
    memory miscalculation which could result in the txg_sync thread
    When this was first introduced the default behavior was left
    unchanged until enough real world usage confirmed there were no
    unexpected issues.  We've now reached that point.  Linux's
    direct reclaim is working as expected so we're enabling this
    behavior by default.
    This helps pave the way to retire the spl_kmem_availrmem()
    functionality in the SPL layer.  This was the only caller.
    Signed-off-by: Brian Behlendorf <>
    Issue #938
Commits on Feb 12, 2013
  1. @behlendorf

    Fix broken RPATH in spec file

    behlendorf committed
    Rather then setting _prefix=/ and having to override all the
    default install locations.  It's cleaner, and more understandable,
    to leave prefix=/usr and only override _sbindir and _libdir.  This
    fixes three issues:
    * The commands no longer get built with an incorrect rpath for
      the libraries.   This is good because fixing this sort of
      thing is required by the Fedora packaging guidelines.
    * The various AUTHORS, COPYRIGHT, etc files are now correctly
      installed under /usr/share/doc instead of /share/doc.
    * _libexecdir is now handled properly for each distribution.
      Fedora/RHEL=/usr/libexec, OpenSUSE/SLES=/usr/lib, Debian=/usr/lib/rpm
    Signed-off-by: Brian Behlendorf <>
    Closes #1058
  2. @ryao @behlendorf

    Make spa.c assertions catch unsupported pre-feature flag pool versions

    ryao committed with behlendorf
    A couple of assertions in spa.c were designed to prevent the use of
    invalid pool versions. They were written under the assumption
    that all valid pools are less than SPA_VERSION. Since feature flags
    jumped from 28 to 5000, any numbers in the range 28 to 5000
    non-inclusive will fail to trigger them.  We switch to the new
    SPA_VERSION_IS_SUPPORTED macro to correct this.
    Signed-off-by: Richard Yao <>
    Signed-off-by: Brian Behlendorf <>
    Closes #1282
  3. @behlendorf

    Add explicit MAXNAMELEN check

    behlendorf committed
    It turns out that the Linux VFS doesn't strictly handle all cases
    where a component path name exceeds MAXNAMELEN.  It does however
    appear to correctly handle MAXPATHLEN for us.
    The right way to handle this appears to be to add an explicit
    check to the zpl_lookup() function.  Several in-tree filesystems
    handle this case the same way.
    Signed-off-by: Brian Behlendorf <>
    Closes #1279
Commits on Feb 7, 2013
  1. @behlendorf

    Update the zfs.8 "ZFS Volumes as Swap" section

    behlendorf committed
    As of 0.6.0-rc11 using ZFS volumes as Linux swap devices is
    supported.  Swapping to files in ZFS filesystems is not.
    Signed-off-by: Brian Behlendorf <>
    Closes #1189
Commits on Feb 6, 2013
  1. @nedbass @behlendorf


    nedbass committed with behlendorf
    Two more locations where KM_SLEEP was used in a call which must
    use KM_PUSHPAGE were found while using the zpool upgrade command.
    See commit b8d06fc for additional details.
    Also make a small correction to the comment block above
    Signed-off-by: Brian Behlendorf <>
    Closes #1268
Commits on Feb 5, 2013
  1. @behlendorf

    Remove unused machelf.h header

    behlendorf committed
    The machelf.h header is never included by anything in the zfs
    build process.  It is all effectively dead code which can be
    safely removed.
    Signed-off-by: Brian Behlendorf <>
    Closes #1265
  2. @ryao @behlendorf

    Fix function relocations in libzpool

    ryao committed with behlendorf
    binutils 2.23.1 fails in situations that generate function relocations
    on PowerPC and possibly other architectures. This causes linking of
    libzpool to fail because it depends on libnvpair. We add a dependency on
    libnvpair to lib/libzpool/ to correct that.
    Signed-off-by: Richard Yao <>
    Signed-off-by: Brian Behlendorf <>
    Closes #1267
  3. @behlendorf

    Cast 'zfs bad bloc' to ULL for x86

    behlendorf committed
    Explicitly case this value to an unsigned long long for 32-bit
    systems to inform the compiler that a long type should not be
    used.  Otherwise we get the following compiler error:
      dmu_send.c:376: error: integer constant is too large for
      ‘long’ type
    Signed-off-by: Brian Behlendorf <>
Commits on Feb 4, 2013
  1. @behlendorf

    Fix 1M references in zpool-features.5

    behlendorf committed
    The zpool-features(5) man page should reference the Linux zfs(8)
    and zpool(8) man pages.  The 1M convention isn't used on Linux.
    Signed-off-by: Brian Behlendorf <>
    Closes #1184
  2. @behlendorf

    Add zpool-features(5) man page

    behlendorf committed
    The zpool-features(5) man page was accidentally omitted from the
    build target when feature flags was merged.  As a result it doesn't
    get installed as part of 'make install' so none of the packages
    include this man page.
    Signed-off-by: Brian Behlendorf <>
    Closes #1262
  3. PPA release. (rc14)

    Bump the version number to reset the builders.
    Closes: zfsonlinux/zfs#1258
Commits on Feb 2, 2013
  1. Revert "Retire zpool_id infrastructure"

    On managed Debian installations, `/etc/zfs/zdev.conf` is a registered
    configuration file, so we must carry this patch until a debconf for converting
    it to the new `/etc/zfs/vdev.conf` syntax is implemented.
    This reverts commit dbf763b.
  2. Drop patches for DKMS error messages.

    The PPA has been shipping a dkms package with the BUILD_DEPENDS patch for more
    than six months, and it still seems to be the best solution vice the
    alternatives, so these patches are obsolete:
    * 0006-Improve-the-with-spl-error-for-DKMS-systems.patch
    * 0007-Improve-the-SPL-version-error-for-DKMS-systems.patch
  3. Merge branch 'upstream'

Commits on Feb 1, 2013
  1. @behlendorf

    ZFS 0.6.0-rc14

    behlendorf committed
  2. @behlendorf

    Add zfs_arc_memory_throttle_disable module option

    behlendorf committed
    The way in which virtual box ab(uses) memory can throw off the
    free memory calculation in arc_memory_throttle().  The result is
    the txg_sync thread will effectively spin waiting for memory to
    be released even though there's lots of memory on the system.
    To handle this case I'm adding a zfs_arc_memory_throttle_disable
    module option largely for virtual box users.  Setting this option
    disables free memory checks which allows the txg_sync thread to
    make progress.
    By default this option is disabled to preserve the current
    behavior.  However, because Linux supports direct memory reclaim
    it's doubtful throttling due to perceived memory pressure is ever
    a good idea.  We should enable this option by default once we've
    done enough real world testing to convince ourselve there aren't
    any unexpected side effects.
    Signed-off-by: Brian Behlendorf <>
    Closes #938
  3. @behlendorf

    Add zfs_disable_dup_eviction module option

    behlendorf committed
    Commit 1eb5bfa introduced a new zfs_disable_dup_eviction tunable.
    It should have been made available as a module option in the
    original patch but was overlooked.
    Signed-off-by: Brian Behlendorf <>
Commits on Jan 31, 2013
  1. @behlendorf

    Honor 80 character limit in 'zpool status'

    behlendorf committed
    This is a minor nit, but the second line of the 'action' message
    when you need to upgrade your pool to support feature flags exceeds
    the standard 80 character limit.  Fix it by moving the word
    'feature' on to the third line.
    Signed-off-by: Brian Behlendorf <>
  2. @nedbass @behlendorf

    Fix mismatch between SA header size and layout

    nedbass committed with behlendorf
    When a system attribute layout is created an inconsistency may occur
    between the system attribute header (sa_hdr_phys_t) size and the
    variable-sized attribute count stored in the layout.  The inconsistency
    results in the following failed assertion when SA_HDR_SIZE_MATCH_LAYOUT
    returns false:
    SPLError: 11315:0:(sa.c:1541:sa_find_idx_tab())
    tb)) || !IS_SA_BONUSTYPE(bonustype) || (IS_SA_BONUSTYPE(bonustype) &&
    hdr->sa_layout_info == 0)) failed
    The bug originates in this snippet from sa_find_sizes().
        if (is_var_sz && var_size > 1) {
                if (P2ROUNDUP(hdrsize + sizeof (uint16_t),
                    *total < full_space) {
                        hdrsize += sizeof (uint16_t);
    This assumes that the current variable-sized attribute will be stored in
    the current buffer and accounts for the space needed to store its size
    in the sa_hdr_phys_t. However if the next attribute spills over we need
    to store a blkptr_t at the end of the bonus buffer to point to the spill
    block. If the current attribute is in the way of the blkptr_t then it
    too will be relocated into the spill block. But since we've already
    accounted for it in the header size we get the inconsistency described
    To avoid this, record the index of the last variable-sized attribute
    that prompted a hdrsize increase, and reverse the increase if we later
    determine that that attribute will be relocated to the spill block.
    Signed-off-by: Matthew Ahrens <>
    Signed-off-by: Brian Behlendorf <>
    Closes #1250
  3. @nedbass @behlendorf

    Fix rounding discrepancy in sa_find_sizes()

    nedbass committed with behlendorf
    A rounding discrepancy exists between how sa_build_layouts() and
    sa_find_sizes() calculate when the spill block needs to be kicked in.
    This results in a narrow size range where sa_build_layouts() believes
    there must be a spill block allocated but due to the discrepancy there
    isn't.  A panic then occurs when the hdl->sa_spill NULL pointer is
    The following reproducer for this bug was isolated:
        truncate -s 128m /tmp/tank
        zpool create tank /tmp/tank
        zfs create -o xattr=sa tank/fish
        ln -s `perl -e 'print "z" x 41'` /tank/fish/z
        setfattr -hn -v`perl -e 'print "z"x45'` /tank/fish/z
    This test results in roughly the following system attribute (SA)
      176 bytes - "standard" SA's
       41 bytes - name of symbolic link target
      100 bytes - XDR encoded nvlist for xattr
      317 bytes - total
    Because 317 is less than DN_MAX_BONUSLEN (320), sa_find_sizes()
    decides no spill block is needed. But sa_build_layouts() rounds 41 up
    to 48 when computing the space requirements so it tries to switch to
    the spill block.
    Note that we were only able to reproduce this bug using a combination
    of symbolic links and the Linux-specific xattr=sa dataset property.
    So while this issue is not technically Linux-specific, it may be
    difficult or impossible to hit the narrow size range needed to
    reproduce it on other platforms.
    To fix the discrepancy, round the running total in sa_find_sizes() up
    to an 8-byte boundary before accounting for each SA, since this is how
    they will be stored in the bonus and (possibly) spill buffers.
    To make the intent of the code more clear, explicitly assert key
    assumptions about expected alignment of data and whether spill-over
    will occur.
    Signed-off-by: Matthew Ahrens <
    Signed-off-by: Brian Behlendorf <>
    Closes #1240
Commits on Jan 30, 2013
  1. @behlendorf

    Illumos #3447 improve the comment in txg.c

    Adam H. Leventhal committed with behlendorf
    3447 improve the comment in txg.c
    Reviewed by: Matthew Ahrens <>
    Reviewed by: Richard Lowe <>
    Reviewed by: Garrett D'Amore <>
    Reviewed by: Richard Elling <>
    Approved by: Dan McDonald <>
    Ported-by: Brian Behlendorf <>
Commits on Jan 29, 2013
  1. @behlendorf

    Retire zpool_id infrastructure

    behlendorf committed
    In the interest of maintaining only one udev helper to give vdevs
    user friendly names, the zpool_id and zpool_layout infrastructure
    is being retired.  They are superseded by vdev_id which incorporates
    all the previous functionality.
    Documentation for the new vdev_id(8) helper and its configuration
    file, vdev_id.conf(5), can be found in their respective man pages.
    Several useful example files are installed under /etc/zfs/.
    Signed-off-by: Brian Behlendorf <>
    Closes #981
  2. @behlendorf


    behlendorf committed
    Commit 4b2f65b increased the user
    space stack by 4x to resolve certain stack overflows.  As such it
    no longer makes sense to worry about a single extra page which
    might or might not be part of the process stack.  There is now
    ample headroom for normal usage.
    By eliminating this configure check we are also resolving the
    following segfault which intentionally occurs at configure time
    and may be logged in dmesg.
      conftest[22156]: segfault at 7fbf18a47e48 ip 00000000004007fe
      sp 00007fbf18a4be50 error 6 in conftest[400000+1000]
    Signed-off-by: Brian Behlendorf <>
  3. @edillmann @behlendorf

    Illumos #3035 LZ4 compression support in ZFS and GRUB

    edillmann committed with behlendorf
    3035 LZ4 compression support in ZFS and GRUB
    Reviewed by: Matthew Ahrens <>
    Reviewed by: Christopher Siden <>
    Reviewed by: George Wilson <>
    Approved by: Christopher Siden <>
    This patch has been slightly modified from the upstream Illumos
    version to be compatible with Linux.  Due to the very limited
    stack space in the kernel a lz4 workspace kmem cache is used.
    Since we are using gcc we are also able to take advantage of the
    gcc optimized __builtin_ctz functions.
    Support for GRUB has been dropped from this patch.  That code
    is available but those changes will need to made to the upstream
    GRUB package.
    Lastly, several hunks of dead code were dropped for clarity.  They
    include the functions real_LZ4_uncompress(), LZ4_compressBound()
    and the Visual Studio specific hunks wrapped in _MSC_VER.
    Ported-by: Eric Dillmann <>
    Signed-off-by: Brian Behlendorf <>
    Closes #1217
Something went wrong with that request. Please try again.