Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Oct 18, 2011

  1. Richard



Oct 11, 2011

  1. Brian Behlendorf

    Fix various typos in comments

    Just clean up some of the typos and spelling mistakes in the
    comments of spl-kmem.c.
    Signed-off-by: Brian Behlendorf <>
    behlendorf authored
  2. Gunnar Beutner

    Fixed typo in spl_slab_alloc()

    The typo did not have any effect (apart from a negligible performance
    impact) because skc->skc_flags * KMC_OFFSLAB is always non-null when
    at least one bit in skc->skc_flags is set.
    Signed-off-by: Brian Behlendorf <>
    gunnarbeutner authored behlendorf committed
  3. Gunnar Beutner

    Properly destroy work items in spl_kmem_cache_destroy()

    In a non-debug build the ASSERT() would be optimized away
    which could cause pending work items to not be cancelled.
    We must also use cancel_delayed_work_sync() rather than just
    cancel_delayed_work() to actually wait until work items have
    completed.  Otherwise they might accidentally access free'd
    Signed-off-by: Brian Behlendorf <>
    Closes ZFS bugs #279, #62, #363, #418
    gunnarbeutner authored behlendorf committed
  4. Gunnar Beutner

    Fixed invalid resource re-use in file_find()

    File descriptors are a per-process resource. The same descriptor
    in different processes can refer to different files. find_file()
    incorrectly assumed that file descriptors are globally unique.
    Signed-off-by: Brian Behlendorf <>
    Closes ZFS issue #386
    gunnarbeutner authored behlendorf committed

Oct 06, 2011

  1. Brian Behlendorf

    Prep spl-0.6.0-rc6 tag

    Create the sixth 0.6.0 release candidate tag (rc6).
    behlendorf authored
  2. Brian Behlendorf

    Remove /etc/hostid missing warning

    No longer print the following warning to the console when the
    /etc/hostid file is missing.  This is the expected default behavior.
    Keeping the hostid in sync with the initramfs is now accomplished
    by creating the /etc/hostid in the initramfs not on the system.
      SPL: The /etc/hostid file is not found.
    Signed-off-by: Brian Behlendorf <>
    behlendorf authored

Sep 30, 2011

  1. Brian Behlendorf

    Revert "Stabilize the hostid for RPM installations."

    Creating an /etc/hostid file as part of the rpm post install
    causes problems for diskless systems which are sharing an image.
    While it's still critical to ensure the hostid doesn't change
    for zfs root filesystems.  This will now be done by setting
    the /etc/hostid in the initramfs created by dracut.
    This reverts commit 79593b0.
    behlendorf authored

Sep 19, 2011

  1. Brian Behlendorf

    Fix HAVE_FS_STRUCT_SPINLOCK check for gcc-4.1.2

    Older versions of gcc (gcc-4.1.2) will treat an 'incompatible
    pointer type' as a warning instead of an error.  This results
    in HAVE_FS_STRUCT_SPINLOCK being defined incorrectly.  This
    failure mode was observed when using a RHEL6 2.6.32 based kernel
    under RHEL5.5 which contains the old version of gcc.  To resolve
    the issue the warning is explicitly promoted to an error.
    Signed-off-by: Brian Behlendorf <>
    behlendorf authored

Jul 22, 2011

  1. Brian Behlendorf

    Fix the configure CONFIG_* option detection

    The latest kernels no longer define AUTOCONF_INCLUDED which was
    being used to detect the new style autoconf.h kernel configure
    options.  This results in the CONFIG_* checks always failing
    incorrectly for newer kernels.
    The fix for this is a simplification of the testing method.
    Rather than attempting to explicitly include to renamed config
    header.  It is simpler to unconditionally include <linux/module.h>
    which must pick up the correctly named header.
    Signed-off-by: Brian Behlendorf <>
    Closes #320
    behlendorf authored

Jul 20, 2011

  1. Brian Behlendorf

    Fix 'make install' overly broad 'rm'

    When running 'make install' without DESTDIR set the module install
    rules would mistakenly destroy the 'modules.*' files for ALL of
    your installed kernels.  This could lead to a non-functional system
    for the alternate kernels because 'depmod -a' will only be run for
    the kernel which was compiled against.  This issue would not impact
    anyone using the 'make <deb|rpm|pkg>' build targets to build and
    install packages.
    The fix for this issue is to only remove extraneous build products
    when DESTDIR is set.  This almost exclusively indicates we are
    building packages and installed the build products in to a temporary
    staging location.  Additionally, limit the removal the unneeded
    build products to the target kernel version.
    Signed-off-by: Brian Behlendorf <>
    Closes #328
    behlendorf authored

Jul 01, 2011

  1. Brian Behlendorf

    Prep spl-0.6.0-rc5 tag

    Create the fifth 0.6.0 release candidate tag (rc5).
    behlendorf authored

Jun 24, 2011

  1. Brian Behlendorf

    Linux 2.6.39 compat, mutex owner

    Prior to Linux 2.6.39 when CONFIG_DEBUG_MUTEXES was defined
    the kernel stored a thread_info pointer as the mutex owner.
    From this you could get the pointer of the current task_struct
    to compare with get_current().
    As of Linux 2.6.39 this behavior has changed and now the mutex
    stores a pointer to the task_struct.  This commit detects the
    type of pointer stored in the mutex and adjusts the mutex_owner()
    and mutex_owned() functions to perform the correct comparision.
    behlendorf authored
  2. Darik Horn

    Stabilize the hostid for RPM installations.

    ZFS requires a stable hostid to recognize foreign pool imports,
    but the hostid of a Linux system can change if the /etc/hostid
    file is missing, particularly during DHCP lease updates.
    Ensure that the system hostid is stable by creating the
    /etc/hostid file from the output of the /usr/bin/hostid utility.
    The /sbin/genhostid utility that is provided by the initscripts
    package is not used because it creates a random hostid, which
    breaks upgrades on systems that already have the SPL module
    The external `printf` is used because the dash builtin lacks
    the byte format.  Conveniences like a ${HOSTID:$ii:2} substring
    range or a `sed` one-liner are similarly avoided.
    dajhorn authored behlendorf committed
  3. Darik Horn

    Read the /etc/hostid file directly.

    Deprecate the /usr/bin/hostid call by reading the /etc/hostid file
    directly. Add the spl_hostid_path parameter to override the default
    /etc/hostid path.
    Rename the set_hostid() function to hostid_exec() to better reflect
    actual behavior and complement the new hostid_read() function.
    Use HW_INVALID_HOSTID as the spl_hostid sentinel value because
    zero seems to be a valid gethostid() result on Linux.
    dajhorn authored behlendorf committed

Jun 21, 2011

  1. Brian Behlendorf

    Add linux compatibility tests

    While the splat tests were originally designed to stress test
    the Solaris primatives.  I am extending them to include some kernel
    compatibility tests.  Certain linux APIs have changed frequently.
    These tests ensure that added compatibility is working properly
    and no unnoticed regression have slipped in.
    Test 1 and 2 add basic regression tests for shrink_icache_memory
    and shrink_dcache_memory.  These are simply functional tests to
    ensure we can call these functions safely.  Checking for correct
    behavior is more difficult since other running processes will
    influence the behavior.  However, these functions are provided
    by the kernel so if we can successfully call them we assume they
    are working correctly.
    Test 3 checks that shrinker functions are being registered and
    called correctly.  As of Linux 3.0 the shrinker API has changed
    four different times so I felt the need to add a trivial test
    case to ensure each variant works as expected.
    behlendorf authored
  2. Brian Behlendorf

    Linux 3.0: Shrinker compatibility

    Update the the wrapper macros for the memory shrinker to handle
    this 4th API change.  The callback function now takes a
    shrink_control structure.  This is certainly a step in the
    right direction but it's annoying to have to accomidate yet
    another version of the API.
    behlendorf authored

Jun 16, 2011

  1. Brian Behlendorf

    Avoid 'rpm -q' bug for 'make pkg'

    RPM version 4.9.0 has been observed to generate extra debug
    messages in certain cases.  These debug messages prevent us
    from cleanly acquiring the architecture.  This is clearly
    an upstream RPM bug which will get fixed.  But until then
    a safe solution is to pipe the result through 'tail -1'
    to just grab the architecture bit we care about.
    Example 'rpm -qp spl-0.6.0-rc4.src.rpm --qf %{arch}' output:
    Freeing read locks for locker 0x166: 28031/47480843735008
    Freeing read locks for locker 0x168: 28031/47480843735008
    behlendorf authored

May 06, 2011

  1. Brian Behlendorf


    It has become necessary to be able to optionally disable
    direct memory reclaim for certain taskqs.  To support
    this the TASKQ_NORECLAIM flags has been added which sets
    the PF_MEMALLOC bit for all threads in the taskq.
    behlendorf authored

May 03, 2011

  1. Brian Behlendorf

    Prep spl-0.6.0-rc4 tag

    Create the fourth 0.6.0 release candidate tag (rc4).
    behlendorf authored

Apr 29, 2011

  1. Brian Behlendorf

    Correct MAXUID

    The uid_t on most systems is in fact and unsigned 32-bit value.
    This is almost always correct, however you could compile your
    kernel to use an unsigned 16-bit value for uid_t.  In practice
    I've never encountered a distribution which does this so I'm
    willing to overlook this corner case for now.
    behlendorf authored
  2. Gunnar Beutner

    Renamed 'struct fid' for NFS

    Renamed 'struct fid' because its name conflicts with another
    struct in the Linux kernel headers.  The fid_t typedef remains
    unchanged intentionally.
    gunnarbeutner authored behlendorf committed

Apr 25, 2011

  1. Brian Behlendorf

    Merged pull request #40 from dajhorn/spl-proc-typos.

    Correct typos in the spl proc handler.
    behlendorf authored
  2. Darik Horn

    Correct typos in the spl proc handler.

    Correct a format typo that causes /proc/sys/kernel/spl/hostid
    to return a decimal number instead of a hexadecimal number.
    dajhorn authored

Apr 22, 2011

  1. Brian Behlendorf

    Fix 32-bit MAXOFFSET_T definition

    The correct definition of MAXOFFSET_T under Solaris is in reality
    tied to the maximum size of a 'long long' type.  With this in mind
    MAXOFFSET_T is now defined as LLONG_MAX which ensures the correct
    value is used on both 32-bit and 64-bit systems.
    behlendorf authored

Apr 21, 2011

  1. Darik Horn

    Make the SPL kernel messages consistent with ZFS.

    Change the SPL kernel messages for module loading and module
    unloading so that they are similar to the ZFS kernel messages.
    Signed-off-by: Brian Behlendorf <>
    dajhorn authored behlendorf committed
  2. Darik Horn

    Remove the gawk dependency.

    This reverts commit 1814251.
    Demote the gawk call back to awk and ensure that stderr is attached.  GNU gawk
    tolerates a missing stderr handle, but many utilities do not, which could be
    why a regular awk call was unexplainably failing on some systems.
    Use argv[0] instead of sh_path for consistency internally and with other Linux
    Signed-off-by: Brian Behlendorf <>
    dajhorn authored behlendorf committed
  3. Darik Horn

    Import spl_hostid as a module parameter.

    Provide a call_usermodehelper() alternative by letting the hostid be passed as
    a module parameter like this:
      $ modprobe spl spl_hostid=0x12345678
    Internally change the spl_hostid variable to unsigned long because that is the
    type that the coreutils /usr/bin/hostid returns.
    Move the hostid command into GET_HOSTID_CMD for consistency with the similar
    GET_KALLSYMS_ADDR_CMD invocation.
    Use argv[0] instead of sh_path for consistency internally and with other Linux
    Signed-off-by: Brian Behlendorf <>
    dajhorn authored behlendorf committed

Apr 20, 2011

  1. Brian Behlendorf

    Linux 2.6.39 compat, zlib_deflate_workspacesize()

    The function zlib_deflate_workspacesize() now take 2 arguments.
    This was done to avoid always having to allocate the maximum size
    workspace (268K).  The caller can now specific the windowBits and
    memLevel compression parameters to get a smaller workspace.
    For our purposes we introduce a spl_zlib_deflate_workspacesize()
    wrapper which accepts both arguments.  When the two argument
    version of zlib_deflate_workspacesize() is available the arguments
    are passed through.  When it's not we assume the worst case and
    a maximally sized workspace is used.
    behlendorf authored
  2. Brian Behlendorf

    Linux 2.6.39 compat, kern_path_parent()

    The path_lookup() function has been renamed to kern_path_parent()
    and the flags argument has been removed.  The only behavior now
    offered is that of LOOKUP_PARENT.  The spl already always passed
    this flag so dropping the flag does not impact us.
    behlendorf authored
  3. Brian Behlendorf

    Linux 2.6.39 compat, DEFINE_SPINLOCK()

    This is a long over due compatibility change.  Way, way, way back
    in 2007 there was a push to remove all consumers of SPIN_LOCK_UNLOCKED.
    Finally, in 2011 with 2.6.39 all the consumers have been updated
    and SPIN_LOCK_UNLOCKED was removed.  It's about time we use the
    new API as well, this change does exactly that.  DEFINE_SPINLOCK()
    was available as far back as 2.6.12 so there doesn't need to be
    any additional autoconf-foo for this change.
    behlendorf authored

Apr 19, 2011

  1. Brian Behlendorf

    Fix unused variable

    Flagged by the default -Wunused-but-set-variable gcc option when
    running under Fedora 15.  Since it's correct this variable is
    entirely unused this commit removes it.
    behlendorf authored
  2. Brian Behlendorf

    Fix gcc configure warnings

    Newer versions of gcc are getting smart enough to detect the sloppy
    syntax used for the autoconf tests.  It is now generating warnings
    for unused/undeclared variables.  Newer version of gcc even have
    the -Wunused-but-set-variable option set by default.  This isn't a
    problem except when -Werror is set and they get promoted to an error.
    In this case the autoconf test will return an incorrect result which
    will result in a build failure latter on.
    To handle this I'm tightening up many of the autoconf tests to
    explicitly mark variables as unused to suppress the gcc warning.
    Remember, all of the autoconf code can never actually be run we
    just want to get a clean build error to detect which APIs are
    available.  Never using a variable is absolutely fine for this.
    behlendorf authored
  3. Brian Behlendorf

    Linux 2.6.39 compat, invalidate_inodes()

    To resolve a potiential filesystem corruption issue a second
    argument was added to invalidate_inodes().  This argument controls
    whether dirty inodes are dropped or treated as busy when invalidating
    a super block.  When only the legacy API is available the second
    argument will be dropped for compatibility.
    behlendorf authored

Apr 08, 2011

  1. Brian Behlendorf

    Fix rebuildable RPMs for el6/ch5

    When rebuilding the source RPM under el5 you need to append the
    target_cpu.  However, under el6/ch5 things are packaged correctly
    and the arch is already part of kver.  For this reason it also
    needs to be stripped from kver when setting kverpkg.
    behlendorf authored
Something went wrong with that request. Please try again.