Merge SPL Support

Squashed commit of the following:

commit dfe9aa577ecd611bb9cceed41eeef7fc5c1ac362
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Fri Apr 27 04:34:52 2012 -0400

    Prepare SPL for inclusion into the kernel source tree

commit 726969edc574a5cf3d9354eb7ba00ea3a60b2c0b
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Fri Apr 27 02:18:29 2012 -0400

    Fix --enable-debug regression introduced by b8ea7afc96b7674ee3e0601afece68114d23a261

    Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>

commit ed7009c2106d70ebcb0545b9bea0bd39bd244907
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Wed Apr 18 20:56:28 2012 -0400

    Make taskqueues mimic loopback device's -20 nice value

commit a777fe49da7558a5a9312f2d8c7eeca8bef3bb26
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Wed Apr 18 06:04:27 2012 -0400

    Fix kernel preemption issue with spl_debug_msg()

commit b8ea7afc96b7674ee3e0601afece68114d23a261
Author: Kyle Fuller <inbox@kylefuller.co.uk>
Date:   Wed Apr 18 04:14:12 2012 -0400

    Preemption support

    Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>

commit b29012b99994ece46019b664d67dace29e5c2586
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 6 11:29:23 2012 -0700

    Remove condition variable names

    Long ago I added support to the spl for condition variable names
    because I thought they might be needed.  It turns out they aren't.
    In fact the official Solaris cv_init(9F) man page discourages
    their use in the kernel.

      cv_init(9F)
        Parameters
          name - Descriptive string. This is obsolete and should be
                 NULL. (Non-NULL strings are legal, but they're a
                 waste of kernel memory.)

    Therefore, I'm removing them from the spl to reclaim this memory
    and adding an ASSERT() to ensure no new consumers are added which
    make use of the name.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 8920c6918a984a9624c853460fe00e9a200bbd48
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 26 11:57:13 2012 -0700

    SPL 0.6.0-rc8

commit 0835057ee7ab61b3e0c794a70da984712fce4384
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 23 12:03:57 2012 -0700

    Add SPL_META_RELEASE to module load/unload messages

    Include the ZFS_META_RELEASE in the module load/unload messages
    to more clearly indicate exactly what version of the SPL has
    been loaded.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 5d139aaa2b0d7c635e1f3ea0423dc428e844896a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 16 11:28:28 2012 -0700

    SPL 0.6.0-rc7

commit a3a69b74cdeb955b6924a534b809810e831b94fa
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 5 10:22:23 2012 -0800

    Fix distribution detection

    Improve the distribution detection by moving the tests for
    distribution specific files first.  The Ubuntu and Debian
    checks are left for last because they are the least likely
    to be unique.  This is particularly true in the case of Debian
    since so many distributions are based on Debian.

    Since this is currently only used to identify the correct
    packaging method for this system the result in many instances
    is simply cosmetic.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 3c208a5480960c9610676dbabeee35fd8b8bb3d8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Feb 27 10:42:07 2012 -0800

    Cleanly support debug packages

    Allow a source rpm to be rebuilt with debugging enabled.  This
    avoids the need to have to manually modify the spec file.  By
    default debugging is still largely disabled.  To enable specific
    debugging features use the following options with rpmbuild.

      '--with debug'               - Enables ASSERTs
      '--with debug-log'           - Enables the internal debug log
      '--with debug-kmem'          - Enables basic memory accounting
      '--with debug-kmem-tracking' - Enables detailed memory tracking

      # For example:
      $ rpmbuild --rebuild --with debug spl-modules-0.6.0-rc6.src.rpm

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit feedc4360114941021ff0053a8f979235dd673da
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 9 16:38:42 2012 -0800

    Add missing spl_debug_* helpers

    When building the spl with --disable-debug-log the __SDEBUG()
    macro and spl_debug_* helper functions were undefined.  This
    change adds the missing functions so the upper layers compiling
    against the spl don't need to be aware of how the spl was built.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 9a8b7a7458a3d76d35b26e7f2b737abd9ab4c6ef
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 30 12:15:31 2012 -0800

    Add basic dynamic kstat support

    Add the bare minimum functionality to support dynamic kstats.  A
    complete kstat implementation should be done as part of issue #84.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #84

commit 4b2220f0b937018b79154ac368c845e6176a8a66
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 20 16:39:12 2012 -0800

    Add --enable-debug-log configure option

    Until now the notion of an internal debug logging infrastructure
    was conflated with enabling ASSERT()s.  This patch clarifies things
    by cleanly breaking the two subsystem apart.  The result of this
    is the following behavior.

    --enable-debug      - Enable/disable code wrapped in ASSERT()s.
    --disable-debug       ASSERT()s are used to check invariants and
                          are never required for correct operation.
                          They are disabled by default because they
                          may impact performance.

    --enable-debug-log  - Enable/disable the debug log infrastructure.
    --disable-debug-log   This infrastructure allows the spl code and
                          its consumer to log messages to an in-kernel
                          log.  The granularity of the logging can be
                          controlled by a debug mask.  By default the
                          mask disables most debug messages resulting
                          in a negligible performance impact.  Because
                          of this the debug log is enabled by default.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 3c6ed5410beb7a4f9e0c042229eb63c4c11a5fc9
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Jan 19 10:33:19 2012 -0800

    Taskq locking optimizations

    Testing has shown that tq->tq_lock can be highly contended when a
    large number of small work items are dispatched.  The lock hold time
    is reduced by the following changes:

    1) Use exclusive threads in the work_waitq

    When a single work item is dispatched we only need to wake a single
    thread to service it.  The current implementation uses non-exclusive
    threads so all threads are woken when the dispatcher calls wake_up().
    If a large number of threads are in the queue this overhead can become
    non-negligible.

    2) Conditionally add/remove threads from work waitq

    Taskq threads need only add themselves to the work wait queue if
    there are no pending work items.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #32

commit 0bb43ca2823ab55a74565f6e17e2c36749cff3b9
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Jan 19 11:36:27 2012 -0800

    Revert "Taskq locking optimizations"

    This reverts commit ec2b41049f7f576aaa772b326d083e5971212d33.

    A race condition was introduced by which a wake_up() call can be lost
    after the taskq thread determines there is no pending work items,
    leading to deadlock:

    1. taksq thread enables interrupts
    2. dispatcher thread runs, queues work item, call wake_up()
    3. taskq thread runs, adds self to waitq, sleeps

    This could easily happen if an interrupt for an IO completion was
    outstanding at the point where the taskq thread reenables interrupts,
    just before the call to add_wait_queue_exclusive().  The handler would
    run immediately within the race window.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #32

commit 87d112392415df7604888cf343df4e48a3404513
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 17 16:14:59 2012 -0800

    Fix rpm dependencies

    This change updates the rpm spec files to have strictly correct
    package dependencies.  That means a few things:

    * Add a dependency to the spl package for the spl-modules package.
      This ensures that when running 'yum install spl' that newest
      version of the spl-modules will be installed.

    * Remove the redundant distribution release extension.  This
      is already added once because it is part of the kernel package
      release name.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit a2eda2ff48e6c38788d48b121f36ff7d280d569b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 17 16:14:35 2012 -0800

    Add the release component to headers

    When the original build system code was added the release
    component was accidentally omited from the development header
    install path.  This patch adds the missing path component so
    it's always clear exactly what release your compiling against.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit ec2b41049f7f576aaa772b326d083e5971212d33
Author: Ned Bass <bass6@llnl.gov>
Date:   Tue Jan 17 15:34:55 2012 -0800

    Taskq locking optimizations

    Testing has shown that tq->tq_lock can be highly contended when a
    large number of small work items are dispatched.  The lock hold time
    is reduced by the following changes:

    1) Use exclusive threads in the work_waitq

    When a single work item is dispatched we only need to wake a single
    thread to service it.  The current implementation uses non-exclusive
    threads so all threads are woken when the dispatcher calls wake_up().
    If a large number of threads are in the queue this overhead can become
    non-negligible.

    2) Conditionally add/remove threads from work waitq outside of tq_lock

    Taskq threads need only add themselves to the work wait queue if there
    are no pending work items.  Furthermore, the add and remove function
    calls can be made outside of the taskq lock since the wait queues are
    protected from concurrent access by their own spinlocks.

    3) Call wake_up() outside of tq->tq_lock

    Again, the wait queues are protected by their own spinlock, so the
    dispatcher functions can drop tq->tq_lock before calling wake_up().

    A new splat test taskq:contention was added in a prior commit to measure
    the impact of these changes.  The following table summarizes the
    results using data from the kernel lock profiler.

                            tq_lock time    %diff   Wall clock (s)  %diff
    original:               39117614.10     0       41.72           0
    exclusive threads:      31871483.61     18.5    34.2            18.0
    unlocked add/rm waitq:  13794303.90     64.7    16.17           61.2
    unlocked wake_up():     1589172.08      95.9    16.61           60.2

    Each row reflects the average result over 5 test runs.
    /proc/lock_stats was zeroed out before and collected after each run.
    Column 1 is the cumulative hold time in microseconds for tq->tq_lock.
    The tests are cumulative; each row reflects the code changes of the
    previous rows.  %diff is calculated with respect to "original" as
    100*(orig-new)/orig.

    Although calling wake_up() outside of the taskq lock dramatically
    reduced the taskq lock hold time, the test actually took slightly more
    wall clock time.  This is because the point of contention shifts from
    the taskq lock to the wait queue lock.  But the change still seems
    worthwhile since it removes our taskq implementation as a bottleneck,
    assuming the small increase in wall clock time to be statistical
    noise.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #32

commit cf5d23fa1e953db970b04f593f83d7ffa9e9e0df
Author: Ned Bass <bass6@llnl.gov>
Date:   Tue Jan 17 14:23:58 2012 -0800

    Add taskq contention splat test

    Add a test designed to generate contention on the taskq spinlock by
    using a large number of threads (100) to perform a large number (131072)
    of trivial work items from a single queue.  This simulates conditions
    that may occur with the zio free taskq when a 1TB file is removed from a
    ZFS filesystem, for example.  This test should always pass.  Its purpose
    is to provide a benchmark to easily measure the effectiveness of taskq
    optimizations using statistics from the kernel lock profiler.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #32

commit 966e5200d35a2c38cdb9e14bfaf698a10b31603b
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Fri Jan 13 22:20:07 2012 -0600

    Fix `make distclean` for `--with-config=user`

    Apply the same fix to SPL that was applied to ZFS earlier at:
    zfsonlinux/zfs@d433c206515e567c52ce09589033405a0ae3716e

    Additionally quote @LINUX_SYMBOLS@ because it is a null substitution
    in this configuration, which results in a `[ -f  ]` expression that
    incorrectly evaluates to true.

      # ./configure --with-config=user
      # make distclean

      Making distclean in module
      make[1]: Entering directory `/spl/module'
      make -C  SUBDIRS=`pwd`  clean
      make: Entering an unknown directory
      make: *** SUBDIRS=/spl/module: No such file or directory.  Stop.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 0b14b9f32729f0e4b2c9da8b19a2bd848781d683
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 13 09:08:12 2012 -0800

    Run SPL_AC_PACMAN only if $VENDOR is "arch"

    Unfortunately, Arch's package manager `pacman` shares it's name with a
    popular arcade video game. Thus, in order to refrain from executing the
    video game when we mean to execute the package manager, SPL_AC_PACMAN is
    now only run when $VENDOR is determined to be "arch".

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes zfsonlinux/zfs#517

commit 588d900433b03e33e4bbbfee7309bd15f71148fb
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Wed Jan 11 11:44:34 2012 -0600

    Linux 3.2 compat: rw_semaphore.wait_lock is raw

    The wait_lock member of the rw_semaphore struct became a raw_spinlock_t
    in Linux 3.2 at torvalds/linux@ddb6c9b58a19edcfac93ac670b066c836ff729f1.

    Wrap spin_lock_* function calls in a new spl_rwsem_* interface to
    ensure type safety if raw_spinlock_t becomes architecture specific,
    and to satisfy these compiler warnings:

      warning: passing argument 1 of ‘spinlock_check’
        from incompatible pointer type [enabled by default]
      note: expected ‘struct spinlock_t *’
        but argument is of type ‘struct raw_spinlock_t *’

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes: #76
    Closes: zfsonlinux/zfs#463

commit 5f6c14b1eda9c7b47d11a3b90e78dea6a7f429e0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 21 14:22:45 2011 -0800

    Proxmox VE kernel compat, invalidate_inodes()

    The Proxmox VE kernel contains a patch which renames the function
    invalidate_inodes() to invalidate_inodes_check().  In the process
    it adds a 'check' argument and a '#define invalidate_inodes(x)'
    compatibility wrapper for legacy callers.  Therefore, if either
    of these functions are exported invalidate_inodes() can be
    safely used.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #58

commit cd2817f8a6a3c0f7675c3ce954800c29eade5319
Author: Prakash Surya <surya1@llnl.gov>
Date:   Fri Dec 16 22:16:47 2011 -0800

    Move Arch Linux's VENDOR check above Ubuntu's

    If the lsb-release package is installed on an Arch Linux distribution,
    the configure step will incorrectly detect the running distribution as
    Ubuntu. This is a result of both distributions providing an
    /etc/lsb-release file, and the Ubuntu VENDOR check being performed
    first.

    Since the Arch Linux test check's for a file more specific to the Arch
    Linux distribution, moving Arch Linux's VENDOR check above Unbuntu's
    check provides a quick and easy solution.

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #72

commit 8f2503e0af490ea253d6db1a15b4901437171cc1
Author: Prakash Surya <surya1@llnl.gov>
Date:   Fri Dec 16 14:57:31 2011 -0800

    Store copy of tqent_flags prior to servicing task

    A preallocated taskq_ent_t's tqent_flags must be checked prior to
    servicing the taskq_ent_t. Once a preallocated taskq entry is serviced,
    the ownership of the entry is handed back to the caller of
    taskq_dispatch, thus the entry's contents can potentially be mangled.

    In particular, this is a problem in the case where a preallocated taskq
    entry is serviced, and the caller clears it's tqent_flags field. Thus,
    when the function returns and task_done is called, it looks as though
    the entry is **not** a preallocated task (when in fact it **is** a
    preallocated task).

    In this situation, task_done will place the preallocated taskq_ent_t
    structure onto the taskq_t's free list. This is a **huge** mistake. If
    the taskq_ent_t is then freed by the caller of taskq_dispatch, the
    taskq_t's free list will hold a pointer to garbage data. Even worse, if
    nothing has over written the freed memory before the pointer is
    dereferenced, it may still look as though it points to a valid list_head
    belonging to a taskq_ent_t structure.

    Thus, the task entry's flags are now copied prior to servicing the task.
    This copy is then checked to see if it is a preallocated task, and
    determine if the entry needs to be passed down to the task_done
    function.

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #71

commit e7e5f78e7bf6dc86337483f4d9f01becc017d185
Author: Prakash Surya <surya1@llnl.gov>
Date:   Fri Dec 16 09:44:31 2011 -0800

    Swap taskq_ent_t with taskqid_t in taskq_thread_t

    The taskq_t's active thread list is sorted based on its
    tqt_ent->tqent_id field. The list is kept sorted solely by inserting
    new taskq_thread_t's in their correct sorted location; no other
    means is used. This means that once inserted, if a taskq_thread_t's
    tqt_ent->tqent_id field changes, the list runs the risk of no
    longer being sorted.

    Prior to the introduction of the taskq_dispatch_prealloc() interface,
    this was not a problem as a taskq_ent_t actively being serviced under
    the old interface should always have a static tqent_id field. Thus,
    once the taskq_thread_t is added to the taskq_t's active thread list,
    the taskq_thread_t's tqt_ent->tqent_id field would remain constant.

    Now, this is no longer the case. Currently, if using the
    taskq_dispatch_prealloc() interface, any given taskq_ent_t actively
    being serviced _may_ have its tqent_id value incremented. This happens
    when the preallocated taskq_ent_t structure is recursively dispatched.
    Thus, a taskq_thread_t could potentially have its tqt_ent->tqent_id
    field silently modified from under its feet. If this were to happen
    to a taskq_thread_t on a taskq_t's active thread list, this would
    compromise the integrity of the order of the list (as the list
    _may_ no longer be sorted).

    To get around this, the taskq_thread_t's taskq_ent_t pointer was
    replaced with its own static copy of the tqent_id. So, as a taskq_ent_t
    is pulled off of the taskq_t's pending list, a static copy of its
    tqent_id is made and this copy is used to sort the active thread
    list. Using a static copy is key in ensuring the integrity of the
    order of the active thread list. Even if the underlying taskq_ent_t
    is recursively dispatched (as has its tqent_id modified), this
    static copy stored inside the taskq_thread_t will remain constant.

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #71

commit c2dceb5cd5221f7e1bde915218f5d2cf69920959
Author: Prakash Surya <surya1@llnl.gov>
Date:   Tue Dec 6 17:33:51 2011 -0800

    Add make rule for building Arch Linux packages

    Added the necessary build infrastructure for building packages
    compatible with the Arch Linux distribution. As such, one can now run:

        $ ./configure
        $ make pkg     # Alternatively, one can run 'make arch' as well

    on an Arch Linux machine to create two binary packages compatible with
    the pacman package manager, one for the spl userland utilties and
    another for the spl kernel modules. The new packages can then be
    installed by running:

        # pacman -U $package.pkg.tar.xz

    In addition, source-only packages suitable for an Arch Linux chroot
    environment or remote builder can also be built using the 'sarch' make
    rule.

    NOTE: Since the source dist tarball is created on the fly from the head
    of the build tree, it's MD5 hash signature will be continually influx.
    As a result, the md5sum variable was intentionally omitted from the
    PKGBUILD files, and the '--skipinteg' makepkg option is used. This may
    or may not have any serious security implications, as the source tarball
    is not being downloaded from an outside source.

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes: #68

commit 699d5ee8a99471b49b07e69108045301b865b0d6
Author: Prakash Surya <surya1@llnl.gov>
Date:   Tue Dec 6 10:11:36 2011 -0800

    Exercise new taskq interface in splat-taskq tests

    The splat-taskq test functions were slightly modified to exercise
    the new taskq interface in addition to the old interface.  If the
    old interface passes each of its tests, the new interface is
    exercised.  Both sub tests (old interface and new interface) must
    pass for each test as a whole to pass.

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #65

commit 44217f7aad12225c09e5fefbbce97ac6bf2f2d16
Author: Prakash Surya <surya1@llnl.gov>
Date:   Tue Dec 6 10:04:51 2011 -0800

    Implement taskq_dispatch_prealloc() interface

    This patch implements the taskq_dispatch_prealloc() interface which
    was introduced by the following illumos-gate commit.  It allows for
    a preallocated taskq_ent_t to be used when dispatching items to a
    taskq.  This eliminates a memory allocation which helps minimize
    lock contention in the taskq when dispatching functions.

        commit 5aeb94743e3be0c51e86f73096334611ae3a058e
        Author: Garrett D'Amore <garrett@nexenta.com>
        Date:   Wed Jul 27 07:13:44 2011 -0700

        734 taskq_dispatch_prealloc() desired
        943 zio_interrupt ends up calling taskq_dispatch with TQ_SLEEP

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #65

commit ac1e5b6033811e15f6e471e720bf506e4e3b4a08
Author: Prakash Surya <surya1@llnl.gov>
Date:   Tue Dec 6 09:48:06 2011 -0800

    Add Test: "Single task queue, recursive dispatch"

    Added another splat taskq test to ensure tasks can be recursively
    submitted to a single task queue without issue. When the
    taskq_dispatch_prealloc() interface is introduced, this use case
    can potentially cause a deadlock if a taskq_ent_t is dispatched
    while its tqent_list field is not empty. This _should_ never be
    a problem with the existing taskq_dispatch() interface.

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #65

commit 2c02b71b1411176905228666abf7a50a2e5f85dc
Author: Prakash Surya <surya1@llnl.gov>
Date:   Mon Dec 5 17:32:48 2011 -0800

    Replace tq_work_list and tq_threads in taskq_t

    To lay the ground work for introducing the taskq_dispatch_prealloc()
    interface, the tq_work_list and tq_threads fields had to be replaced
    with new alternatives in the taskq_t structure.

    The tq_threads field was replaced with tq_thread_list. Rather than
    storing the pointers to the taskq's kernel threads in an array, they are
    now stored as a list. In addition to laying the ground work for the
    taskq_dispatch_prealloc() interface, this change could also enable taskq
    threads to be dynamically created and destroyed as threads can now be
    added and removed to this list relatively easily.

    The tq_work_list field was replaced with tq_active_list. Instead of
    keeping a list of taskq_ent_t's which are currently being serviced, a
    list of taskq_threads currently servicing a taskq_ent_t is kept. This
    frees up the taskq_ent_t's tqent_list field when it is being serviced
    (i.e. now when a taskq_ent_t is being serviced, it's tqent_list field
    will be empty).

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #65

commit 046a70c93b2951bd4c705fb09592d2555a8858f0
Author: Prakash Surya <surya1@llnl.gov>
Date:   Fri Nov 11 15:06:35 2011 -0800

    Replace struct spl_task with struct taskq_ent

    The spl_task structure was renamed to taskq_ent, and all of
    its fields were renamed to have a prefix of 'tqent' rather
    than 't'. This was to align with the naming convention which
    the ZFS code assumes.  Previously these fields were private
    so the name never mattered.

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #65

commit ed948fa72b28b0769758081d71d5ce5d30b428f9
Author: Prakash Surya <surya1@llnl.gov>
Date:   Fri Dec 2 14:05:06 2011 -0800

    Add SPLAT_TEST_FINI call for SPLAT_TASKQ_TEST6_ID

    This change adds the neglected SPLAT_TEST_FINI call for the
    SPLAT_TASKQ_TEST6_ID, just as is done for the other 5 SPLAT_TASKQ_*
    tests.

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #64

commit 93806f58a620e3e0fabd75db538c789cdc653afe
Author: Prakash Surya <surya1@llnl.gov>
Date:   Mon Dec 12 15:37:30 2011 -0800

    Fix usage of MUTEX macro in mutex_enter_nested

    A call site of the MUTEX macro had incorrectly placed its closing
    parenthesis, causing two parameters to be passed rather than one. This
    change moves the misplaced parenthesis to fix the typographical error.

    Signed-off-by: Prakash Surya <surya1@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #70

commit 791dc876eb59f1543fee0bcfc1a97691c643ea3c
Author: Chris Dunlop <chris@onthe.net.au>
Date:   Tue Dec 6 15:29:58 2011 +1100

    Allow 64-bit timestamps to be set on 64-bit kernels

    ZFS and 64-bit linux are perfectly capable of dealing with 64-bit
    timestamps, but ZFS deliberately prevents setting them.  Adjust
    the SPL such that TIMESPEC_OVERFLOW will not always assume 32-bit
    values and instead use the correct values for your kernel build.
    This effectively allows 64-bit timestamps on 64-bit systems.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes ZFS issue #487

commit e05bec805b066e72266281a03e57e61e7dd53264
Author: Prakash Surya <surya1@llnl.gov>
Date:   Fri Nov 18 14:27:37 2011 -0800

    Fix a typo referencing an incorrect symbol

    The splat_taskq_test4_common function was incorrectly referencing
    the splat_taskq-test13_func symbol, when it meant to be using the
    splat_taskq_test4_func symbol.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #61

commit 1114ae6ae74a287478cd8a34770fc4a907f84134
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 11 09:03:31 2011 -0800

    Prepend spl_ to all init/fini functions

    This is a bit of cleanup I'd been meaning to get to for a while
    to reduce the chance of a type conflict.  Well that conflict
    finally occurred with the kstat_init() function which conflicts
    with a function in the 2.6.32-6-pve kernel.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #56

commit 948914d2f10f6bf274bb51b96dd5337f01165b45
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Nov 10 10:36:21 2011 -0800

    Fix depmod warning

    The depmod utility from module-init-tools 3.12-pre3 generates a
    warning when the -e option is used without -E or -F.  This was
    observed under OpenSuse 11.4.  To resolve the issue when the
    exact System.map-* for your kernel cannot be found fallback to
    a generic safe '/sbin/depmod -a'.

      WARNING: -e needs -E or -F

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit fe71c0e5677d35cbdb3a6bf0a81c71d12a2aff4a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 9 16:31:03 2011 -0800

    Linux 3.1 compat, shrink_*cache_memory

    As of Linux 3.1 the shrink_dcache_memory and shrink_icache_memory
    functions have been removed.  This same task is now accomplished
    more cleanly with per super block shrinkers.  This unfortunately
    leaves us no easy way to support the dnlc_reduce_cache() function.

    This support has always been entirely optional.  So when no
    reasonable interface is available allow the dnlc_reduce_cache()
    function to effectively become a no-op.

    The downside of this change is that it will prevent the zfs arc
    meta data limts from being enforced.  However, the current zfs
    implementation in this regard is already flawed and needs to
    be reworked.  If the arc needs to enfore a meta data limit it
    will need to be extended to coordinate directly with the zpl.
    This will allow us to drop all this compatibility code and get
    more fine grained control over the cache management.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #52

commit 0d0b523728b348b2d762fd9b27511ed9b138607b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 9 12:45:35 2011 -0800

    Linux 3.1 compat, vfs_fsync()

    Preferentially use the vfs_fsync() function.  This function was
    initially introduced in 2.6.29 and took three arguments.  As
    of 2.6.35 the dentry argument was dropped from the function.
    For older kernels fall back to using file_fsync() which also
    took three arguments including the dentry.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #52

commit 12ff95ff579d0203790aff69632c7ab12ce56140
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 9 12:29:51 2011 -0800

    Linux 3.1 compat, kern_path_parent()

    Prior to Linux 3.1 the kern_path_parent symbol was exported for
    use by kernel modules.  As of Linux 3.1 it is now longer easily
    available.  To handle this case the spl will now dynamically
    look up address of the missing symbol at module load time.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Issue #52

commit b8b6e4c453929596b630fa1cca1ee26a532a2ab4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 1 13:35:12 2011 -0700

    Fix NULL deref in balance_pgdat()

    Be careful not to unconditionally clear the PF_MEMALLOC bit in
    the task structure.  It may have already been set when entering
    kv_alloc() in which case it must remain set on exit.  In
    particular the kswapd thread will have PF_MEMALLOC set in
    order to prevent it from entering direct reclaim.  By clearing
    it we allow the following NULL deref to potentially occur.

      BUG: unable to handle kernel NULL pointer dereference at (null)
      IP: [<ffffffff8109c7ab>] balance_pgdat+0x25b/0x4ff

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes ZFS issue #287

commit 16952a68f25d55da21578f562b3813559fd01c6b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Oct 19 11:23:38 2011 -0700

    Include distribution in release

    Common practice is to include the distribution in the package release.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit f5e76dea03453c72fb46ad90dd2e01c73b70654f
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Wed Oct 19 18:04:40 2011 +0200

    Cleaned up MUTEX() #define

    The old define assumed a specific layout of the kmutex_t struct. This
    patch makes the macro independent from the actual struct layout.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 66cdc93b8c030db70a50563ac26f02301dde30ff
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Tue Oct 18 02:54:35 2011 +0200

    Remove the spinlocks for mutex_enter()/mutex_exit()

    The m_owner variable is protected by the mutex itself. Reading the variable
    is guaranteed to be atomic (due to it being a word-sized reference) and
    ACCESS_ONCE() takes care of read cache effects.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 3160d4f56bf35492e9c400094f8c1ff2066d4459
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Tue Oct 18 02:32:50 2011 +0200

    Fix race condition in mutex_exit()

    On kernels with CONFIG_DEBUG_MUTEXES mutex_exit() clears the mutex
    owner after releasing the mutex. This would cause mutex_owner()
    to return an incorrect owner if another thread managed to lock the
    mutex before mutex_exit() had a chance to clear the owner.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes ZFS issue #167

commit f3989ed3223363330af014062caeeb1afbd0503f
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Wed Oct 12 12:49:18 2011 +0200

    vn_rdwr() didn't properly advance the file position

    This would cause problems when using 'zfs send' with a file as the
    target (rather than a pipe or a socket as is usually the case) as
    for each write the destination offset in the file would be 0.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes ZFS issue #391

commit a49bc996897fb0f4c38ea6d3bbeafbe27dc82e72
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Oct 17 16:40:38 2011 -0700

    Fix package URLs to use the github repository

    The URL field in the spl-modules and spl package spec files were
    updated to point to the ZFS on Linux repository hosted by github.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit ecc39810077bbf3836fe9be0800c0d7668e33fc4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Oct 11 10:11:26 2011 -0700

    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 <behlendorf1@llnl.gov>

commit 8d177c181fb21c7cedd41e27aec2072ef2aed42e
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Tue Oct 11 10:03:29 2011 -0700

    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 <behlendorf1@llnl.gov>

commit 64c075c3f4381df02d206008b94498248cc49324
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Tue Oct 11 09:59:02 2011 -0700

    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
    memory.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes ZFS bugs #279, #62, #363, #418

commit 763b2f3b57af1febb0fd72c4976992e672a350b4
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Tue Oct 11 09:50:52 2011 -0700

    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 <behlendorf1@llnl.gov>
    Closes ZFS issue #386

commit 4a777c028c7e52ccfc1fb721448c84e10b9ee0f8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Oct 6 14:07:00 2011 -0700

    Prep spl-0.6.0-rc6 tag

    Create the sixth 0.6.0 release candidate tag (rc6).

commit 6b3b569df30d13ed7bbbff877cffc71290a52f12
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Oct 6 14:55:17 2011 -0700

    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 <behlendorf1@llnl.gov>

commit 39a87c69211aceef23889ceb4a33291e476237b9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 30 09:36:35 2011 -0700

    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 79593b0dec57ee94c5bb56cdc2770ebde81ecea9.

commit 97fd6a07c2c2fd1d27fc79938eb1a451c92fbfc4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Sep 19 13:35:03 2011 -0700

    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 <behlendorf1@llnl.gov>

commit c064bdee95583102e216354bbdece4818d59b644
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 22 14:23:12 2011 -0700

    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 <behlendorf1@llnl.gov>
    Closes #320

commit e80cd06b8e0428f3ca2c62e4cb0e4ec54fda1d5c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 19 21:06:50 2011 -0700

    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 <behlendorf1@llnl.gov>
    Closes #328

commit d9365224ea04562af1b0cf2a1c2e84ab429a13b2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 1 15:23:17 2011 -0700

    Prep spl-0.6.0-rc5 tag

    Create the fifth 0.6.0 release candidate tag (rc5).

commit 86fd39f354778eb10e77a7c1660b59ca16ffcc16
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 24 11:57:14 2011 -0700

    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.

commit 79593b0dec57ee94c5bb56cdc2770ebde81ecea9
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Thu Jun 23 22:10:27 2011 -0500

    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
    installed.

    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.

commit 0d54dcb56685ac58e68e46b7848f0f2c2863dc6e
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Mon Jun 20 14:53:56 2011 -0500

    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.

commit bf0c60c060ac58c9bb835cb62b49f0cb68bb68e4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jun 21 10:57:48 2011 -0700

    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.

commit a55bcaad181096d764e12d847e3091cd7b15509a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 16 15:39:08 2011 -0700

    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.

commit a32661a6c976c1d8100ddd8e60c958ae8db98747
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 16 11:49:38 2011 -0700

    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
    x86_64

commit 372c2572336468cbf60272aa7e735b7ca0c3807c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 6 15:21:58 2011 -0700

    Add TASKQ_NORECLAIM flag

    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.

commit dde6b7b137f56894a45723e7b49227629cfd3bd5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue May 3 10:31:12 2011 -0700

    Prep spl-0.6.0-rc4 tag

    Create the fourth 0.6.0 release candidate tag (rc4).

commit c1f95c2b94c0ee71b1fe1f71fd5e471802ffd73d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 29 13:58:45 2011 -0700

    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.

commit 9d4b7c17a0820a1bf48a7a3fd9dfb6e87b0306dd
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sun Apr 24 10:19:28 2011 +0200

    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.

commit 4c16d2471ac3ada642db156df1f0f4444fa1c336
Merge: d837ae3 c95b308
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Apr 25 14:51:48 2011 -0700

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

    Correct typos in the spl proc handler.

commit c95b308d12be1a7f317d5b280a9f14e7d0b1f104
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sun Apr 24 20:48:56 2011 -0500

    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.

commit d837ae395b3368bcdc13a7ef1ad8abfc8d24e88f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 22 16:17:13 2011 -0700

    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.

commit 5b8f76ea16f5634c6a28490f149e699afce09cdf
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Thu Apr 21 10:11:45 2011 -0500

    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 <behlendorf1@llnl.gov>

commit ad35b6a6e99a0e0962d6a33e181784cada44c3c0
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Thu Apr 14 14:01:22 2011 -0500

    Remove the gawk dependency.

    This reverts commit 1814251453c8140f50170ad29d9105c1273d7e08.

    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
    drivers.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit fa6f7d8f9d4760975ea5fe116a7366604f286195
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Mon Apr 11 14:49:50 2011 -0500

    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
    drivers.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 3dfc591ac4003d1c92159b5dfe8970f24e008f81
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Apr 20 14:22:35 2011 -0700

    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.

commit b1cbc4610c8b5a9b5de80cb850a6eb58bb811a1d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Apr 20 12:25:59 2011 -0700

    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.

commit 83c623aa1a8895879f03f07b060e1c53a9757f71
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Apr 20 12:01:11 2011 -0700

    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.

commit 98e2afd1c5fc491413a80c7ef005127ac3add5d9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 19 09:45:36 2011 -0700

    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.

commit 03318641afc3e2d6dc18614aaa75d6a0125cb933
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 19 09:26:48 2011 -0700

    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.

commit 9b0f9079d22f5a13903d3da4d94e8e306cfa40dd
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Apr 18 13:47:43 2011 -0700

    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.

commit 96cdefab84061e807f54ed17b93e0586393f9448
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 8 10:20:08 2011 -0700

    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.

commit a40c3fca6f6c8765c09d007283d0957a0b71dead
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Apr 6 20:10:57 2011 -0700

    Prep spl-0,6,0-rc3 tag

    Create the third 0.6.0 release candidate tag (rc3).

commit e76f4bf11d54479fe767d9647a10e8b98d7ffc4f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 30 17:44:35 2011 -0700

    Add dnlc_reduce_cache() support

    Provide the dnlc_reduce_cache() function which attempts to prune
    cached entries from the dcache and icache.  After the entries are
    pruned any slabs which they may have been using are reaped.

    Note the API takes a reclaim percentage but we don't have easy
    access to the total number of cache entries to calculate the
    reclaim count.  However, in practice this doesn't need to be
    exactly correct.  We simply need to reclaim some useful fraction
    (but not all) of the cache.  The caller can determine if more
    needs to be done.

commit 83150861e610701d44510816e2062bcf407f51ab
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 29 22:38:53 2011 -0700

    Decrease target objects per slab

    By decreasing the number of target objects per slab we increase
    the likelyhood that a slab can be freed.  This reduces the level
    of fragmentation in the slab which has been observed to be a
    problem for certain workloads.  The penalty for this is that we
    also decrease the speed which need objects can be allocated.

commit 3336e29cc2e328c6e665de9f4563aa8a4b874194
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sat Mar 26 00:03:32 2011 -0700

    Add slab usage summeries to /proc

    One of the most common things you want to know when looking at
    the slab is how much memory is being used.  This information was
    available in /proc/spl/kmem/slab but only on a per-slab basis.
    This commit adds the following /proc/sys/kernel/spl/kmem/slab*
    entries to make total slab usage easily available at a glance.

      slab_kmem_total - Total kmem slab size
      slab_kmem_avail - Alloc'd kmem slab size
      slab_kmem_max   - Max observed kmem slab size
      slab_vmem_total - Total vmem slab size
      slab_vmem_avail - Alloc'd vmem slab size
      slab_vmem_max   - Max observed vmem slab size

    NOTE: The slab_*_max values are expected to over report because
    they show maximum values since boot, not current values.

commit d0a1038ff39a082a098fc710dc16f8125369d084
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 25 21:50:40 2011 -0700

    Update /proc/spl/kmem/slab output

    The 'slab_fail', 'slab_create', and 'slab_destroy' columns in the slab
    output have been removed because they are virtually always zero and
    not very useful.

    The much more useful 'size' and 'alloc' columns have been added which
    show the total slab size and how much of the total size has been
    allocated to objects.

    Finally, the formatting has been updated to be much more human
    readable while still being friendly for tool like awk to parse.

commit 495bd532ab4aaef46b57094d59707bad91e6ec25
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 23 15:45:55 2011 -0700

    Linux shrinker compat

    The Linux shrinker has gone through three API changes since 2.6.22.
    Rather than force every caller to understand all three APIs this
    change consolidates the compatibility code in to the mm-compat.h
    header.  The caller then can then use a single spl provided
    shrinker API which does the right thing for your kernel.

    SPL_SHRINKER_CALLBACK_PROTO(shrinker_callback, cb, nr_to_scan, gfp_mask);
    SPL_SHRINKER_DECLARE(shrinker_struct, shrinker_callback, seeks);
    spl_register_shrinker(&shrinker_struct);
    spl_unregister_shrinker(&&shrinker_struct);
    spl_exec_shrinker(&shrinker_struct, nr_to_scan, gfp_mask);

commit 91cb1d91a4cf0dfa360f09747915699d0bef3d6f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 29 22:46:38 2011 -0700

    Add .va_dentry helper

    While this extra structure memory does not exist under Solaris
    it is needed under Linux to pass the dentry.  This allows the
    dentry to be easily instantiated before the inode is unlocked.

commit af67391e45967dfa63346fe5cc8d2748e79b8406
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 31 13:43:49 2011 -0700

    Update CHAOS 5 Packaging

    The CHAOS 5 kernels are now packaged identially to the RHEL6 kernels.
    Therefore we can simply use the RHEL6 rules in the spec file when
    building packages.

commit 734fcac78d8c430aeb3731590b77dfcfa6de224f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 22 11:18:15 2011 -0700

    Add crgetfsuid()/crgetfsgid() helpers

    Solaris credentials don't have an fsuid/fsguid field but Linux
    credentials do.  To handle this case the Solaris API is being
    modestly extended to include the crgetfsuid()/crgetfsgid()
    helper functions.

    Addititionally, because the crget*() helpers are implemented
    identically regardless of HAVE_CRED_STRUCT they have been
    moved outside the #ifdef to common code.  This simplification
    means we only have one version of the helper to keep to to date.

commit 9b0c3b2aa87610690cf6e1a792ff1484274a392d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 21 16:32:29 2011 -0700

    Load zlib_inflate.ko

    Certain stock kernels (Debian Lenny) are built with zlib_inflate.ko
    as a kernel module.  To ensure 'make check' works in-tree load this
    module before loading the spl module.  This is now required for the
    zlib splat regression test.

commit 2092cf68d89a51eb0d6193aeadabb579dfc4b4a0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sun Mar 20 15:03:18 2011 -0700

    Disable vmalloc() direct reclaim

    As part of vmalloc() a __pte_alloc_kernel() allocation may occur.  This
    internal allocation does not honor the gfp flags passed to vmalloc().
    This means even when vmalloc(GFP_NOFS) is called it is possible that a
    synchronous reclaim will occur.  This reclaim can trigger file IO which
    can result in a deadlock.  This issue can be avoided by explicitly
    setting PF_MEMALLOC on the process to subvert synchronous reclaim when
    vmalloc() is called with !__GFP_FS.

    An example stack of the deadlock can be found here (1), along with the
    upstream kernel bug (2), and the original bug discussion on the
    linux-mm mailing list (3).  This code can be properly autoconf'ed
    when the upstream bug is fixed.

    1) http://github.com/behlendorf/zfs/issues/labels/Vmalloc#issue/133
    2) http://bugzilla.kernel.org/show_bug.cgi?id=30702
    3) http://marc.info/?l=linux-mm&m=128942194520631&w=4

commit cb255ae57278be3206693b5116eff95e612e809a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sat Mar 19 13:49:14 2011 -0700

    Remove default GFP_NOFS allocations

    As originally described in commit 82b8c8fa64737edfb203156b245b48840139d2c1
    this was done to prevent certain deadlocks from occuring in the system.
    However, as suspected the price for doing this proved to be too high.
    The VM is having a hard time effectively reclaiming memory thus we are
    reverting this change.

    However, we still need to fundamentally handle the issue.  Under
    Solaris the KM_PUSHPAGE mask is used commonly in I/O paths to ensure
    a memory allocations will succeed.  We leverage this fact and redefine
    KM_PUSHPAGE to include GFP_NOFS.  This ensures that in these common
    I/O path we don't trigger additional reclaim.  This minimizes the
    change to the Solaris code.

commit 181a9b89988a00a3faa06203b94cc155f10fe1e7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 9 15:16:10 2011 -0800

    Prep spl-0.6.0-rc2 tag

    Create the second 0.6.0 release candidate tag (rc2).

commit 6788762766d137754d164ced45d1e80540391531
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 7 13:52:00 2011 -0800

    Linux 2.6.31 compat, include linux/seq_file.h

    Explicitly include the linux/seq_file.h header in vfs.h.  This header
    is required for the sequence handlers and is included indirectly in
    newer kernels.

commit 912fd84d13e2aa539695598df4daffeeec549c43
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 7 12:59:30 2011 -0800

    Make Missing Modules.symvers Fatal

    Detect early on in configure if the Modules.symvers file is missing.
    Without this file there will be build failures later and it's best
    to catch this early and provide a useful error.  In this case the
    most likely problem is the kernel-devel packages are not installed.
    It may also be possible that they are using an unbuilt custom kernel
    in which case they must build the kernel first.

commit 7731d46b69bd893d515c55e87ffa8a9bd2ddfb38
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 7 10:58:07 2011 -0800

    Make CONFIG_PREEMPT Fatal

    Until support is added for preemptible kernels detect this at
    configure time and make it fatal.  Otherwise, it is possible to
    have a successful build and kernel modules with flakey behavior.

commit 47995fa691a789132373acaedf1e2a64cf213be1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 1 14:02:06 2011 -0800

    Remove xvattr support

    The xvattr support in the spl has always simply consisted of
    defining a couple structures and a few #defines.  This was enough
    to enable compilation of code which just passed xvattr types
    around but not enough to effectively manipulate them.

    This change removes even this minimal support leaving it up
    to packages which leverage the spl to prove the full xvattr
    support.  By removing it from the spl we ensure not conflict
    with the higher level packages.

    This just leaves minimal vnode support for basical manipulation
    of files.  This code is does have the proper support functions
    in the spl and a set of regression tests.

    Additionally, this change removed the unused 'caller_context_t *'
    type and replaces it with a 'void *'.

commit a4a1e1ecb42c3a0d9a25b5b0e0b400147b91bdb3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 1 15:21:38 2011 -0800

    Add TIMESPEC_OVERFLOW helper

    Add the TIMESPEC_OVERFLOW helper macro to allow easy checking
    of timespec overflow.

commit 19c1eb829d014cc64a5742710dae042bdaef25ae
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 25 15:48:18 2011 -0800

    Add zlib regression test

    A zlib regression test has been added to verify the correct behavior
    of z_compress_level() and z_uncompress.  The test case simply takes
    a 128k buffer, it compresses the buffer, it them uncompresses the
    buffer, and finally it compares the buffers after the transform.
    If the buffers match then everything is fine and no data was lost.
    It performs this test for all 9 zlib compression levels.

commit 5c1967ebe2ad28f3c3229cba85159ccbd4dfe93a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 25 13:26:19 2011 -0800

    Fix zlib compression

    While portions of the code needed to support z_compress_level() and
    z_uncompress() where in place.  In reality the current implementation
    was non-functional, it just was compilable.

    The critical missing component was to setup a workspace for the
    compress/uncompress stream structures to use.  A kmem_cache was
    added for the workspace area because we require a large chunk
    of memory.  This avoids to need to continually alloc/free this
    memory and vmap() the pages which is very slow.  Several objects
    will reside in the per-cpu kmem_cache making them quick to acquire
    and release.  A further optimization would be to adjust the
    implementation to additional ensure the memory is local to the cpu.
    Currently that may not be the case.

commit 5a52a782a0a04efee3846e1a8f0bb4796930e0e4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sun Feb 20 14:02:48 2011 -0800

    Use Linux flock struct

    Rather than defining our own structure which will conflict with
    Linux's version when building 32-bit.  Simply setup a typedef
    to always use the correct Linux version for both 32 ad 64-bit
    builds.

commit 914b063133365a17b1f607cbe96102259e497753
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 23 12:25:45 2011 -0800

    Linux compat 2.6.37, invalidate_inodes()

    In the 2.6.37 kernel the function invalidate_inodes() is no longer
    exported for use by modules.  This memory management functionality
    is needed to invalidate the inodes attached to a super block without
    unmounting the filesystem.

    Because this function still exists in the kernel and the prototype
    is available is a common header all we strictly need is the symbol
    address.  The address is obtained using spl_kallsyms_lookup_name()
    and assigned to the variable invalidate_inodes_fn.  Then a #define
    is used to replace all instances of invalidate_inodes() with a
    call to the acquired address.  All the complexity is hidden behind
    HAVE_INVALIDATE_INODES and invalidate_inodes() can be used as usual.

    Long term we should try to get this, or another, interface made
    available to modules again.

commit bf665d4075e9777af089e669c65f72d5d652f26e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 18 09:20:02 2011 -0800

    Prep spl-0.6.0-rc1 tag

    Create the first 0.6.0 release candidate tag (rc1).

commit 22ccfaa8b5f6a6e8a770667a9d412828906a4332
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 10 14:40:57 2011 -0800

    Prefer /lib/modules/$(uname -r)/ links

    Preferentially use the /lib/modules/$(uname -r)/source and
    /lib/modules/$(uname -r)/build links.  Only if neither of these
    links exist fallback to alternate methods for deducing which
    kernel to build with.  This resolves the need to manually
    specify --with-linux= and --with-linux-obj= on Debian systems.

commit 0d33908cdfb5502e35717adc14d2a0db8b596cd5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Feb 7 16:41:08 2011 -0800

    Update META to 0.6.0

    Roll the version forward to 0.6.0.  While no major changes
    really warrant this I want to keep the version in step with
    ZFS for now which is the only SPL consumer.

commit d599e4fa793b304609d32e336c668b70831b6b3b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 4 14:09:08 2011 -0800

    Block in cv_destroy() on all waiters

    Previously we would ASSERT in cv_destroy() if it was ever called
    with active waiters.  However, I've now seen several instances in
    OpenSolaris code where they do the following:

      cv_broadcast();
      cv_destroy();

    This leaves no time for active waiters to be woken up and scheduled
    and we trip the ASSERT.  This has not been observed to be an issue
    on OpenSolaris because their cv_destroy() basically does nothing.
    They still do run the risk of the memory being free'd after the
    cv_destroy() and hitting a bad paging request.  But in practice
    this race is so small and unlikely it either doesn't happen, or
    is so unlikely when it does happen the root cause has not yet been
    identified.

    Rather than risk the same issue in our code this change updates
    cv_destroy() to block until all waiters have been woken and
    scheduled.  This may take some time because each waiter must
    acquire the mutex.

    This change may have an impact on performance for frequently
    created and destroyed condition variables.  That however is a price
    worth paying it avoid crashing your system.  If performance issues
    are observed they can be addressed by the caller.

commit 0aff071d18bbef2fb6b2ab41f60ab3b957ae58c7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 22 13:45:02 2010 -0800

    Minor policy interface

    Simply add the policy function wrappers.  They are completely
    non-functional and always return that everything is OK, but once
    again they simplify compilation of dependent packages for now.
    These can/should be removed once the security policy of the
    dependent application is completely understood and intergrade
    as appropriate with Linux.

commit ef57fb98e4525e57973cbbe7279e39f0e7fef451
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 22 13:41:57 2010 -0800

    Add missing headers

    Dependent packages require the following missing headers to
    simplify compilation.  The headers are basically just stubbed
    out with minimal content required.

commit 3fc97f93359ed6a74ea7165b102995cfe5d2c16d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 12 11:34:07 2011 -0800

    Add VSA_ACE_* and MAX_ACL_ENTRIES defines

    The following flags are use to get the proper mask when getting
    and setting ACLs.  I'm hopeful this can all largely go away at
    some point.

    We also add a define for the maximum number of ACL entries.
    MAX_ACL_ENTRIES is used as the maximum number of entries for
    each type.

commit e2b25f698cecc7ab3a3073861ab81a8258644f89
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 12 11:29:17 2011 -0800

    Add MAXUID define

    For Linux the maximum uid can vary depending on how your kernel
    is built.  The Linux kernel still can be compiled with 16 but uids
    and gids, although I'm not aware of a major distribution which does
    this (maybe an embedded one?).  Given that caviot it is reasonably
    safe to define the MAXUID as 2147483647.

commit 5f46a517f17affc89591f0130870bca48a5b093e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 12 11:27:07 2011 -0800

    Add FIGNORECASE define

    The FIGNORECASE case define is now needed, place it with the
    related flags.

commit 3e5d3d32858683d3410a63c712412167c345853b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 12 11:25:20 2011 -0800

    Add ksid_index_t and ksid_t types

    Add the ksid_index_t enum and ksid_t type for use.  These types
    are now used by packages which depend on the SPL.

commit d700637207b7e3870badcdb8389646a865835627
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 12 11:22:34 2011 -0800

    Minimal VFS additions

    This patch simply removes the place holder vfs_t type and includes
    some generic Linux VFS headers.  It also makes some minor fid_t
    additions for compatibility.

commit 647fa73cf33930f36259d00fd86c52b8e8113c30
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 11 11:46:49 2011 -0800

    Remove VN_HOLD/VN_RELE/VOP_PUTPAGE

    Previously these were defined to noops but rather than give
    the misleading impression that these are actually implemented
    I'm removing the type entirely for clarity.

commit bd6ac72b03701a3f37e6c8e706cec16192f873cd
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 11 12:00:35 2011 -0800

    Add a few additional vnode #defines

    These additional constants now have users in dependant packages.

commit a5b40eed179887d8486c1831008400ec316c81cf
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 11 11:57:02 2011 -0800

    Make vn_cache|vn_file_cache kmem caches

    Both of these caches were previously allowed to be either a
    vmem or kmem cache based on the size of the object involved.
    Since we know the object won't be to large and performce is
    much better for a kmem cache for them to be kmem backed.

commit dcd9cb5a17014b39a4440b26df1dbf78c0dde637
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 11 11:56:00 2011 -0800

    Clean vattr_t and vsecattr_t types

    Minor cleanup for the vattr_t and vsecattr_t types.

commit 1b439713f127db3ef5aad60aac63aad9b8384f6d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 11 11:54:21 2011 -0800

    FRSYNC Should Use O_SYNC

    The Solaris FRSYNC maps most logically to the Linux O_SYNC.  There
    is no O_RSYNC on Linux but this wasn't noticed until just recently.

commit 4295b530eeb68aaacbbeb5b2197ed14bf9295c2b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 11 11:53:05 2011 -0800

    Add vn_mode_to_vtype/vn_vtype to_mode helpers

    Add simple helpers to convert a vnode->v_type to a inode->i_mode.
    These should be used sparingly but they are handy to have.

commit 3f688a8c381d298062467a318994bb5849b1c8c1
Author: Neependra Khare <neependra@kqinfotech.com>
Date:   Mon Dec 6 17:05:58 2010 +0530

    Add cv_timedwait_interruptible() function

    The cv_timedwait() function by definition must wait unconditionally
    for cv_signal()/cv_broadcast() before waking.  This causes processes
    to go in the D state which increases the load average.  The load
    average is the summation of processes in D state and run queue.

    To avoid this it can be desirable to sleep interruptibly.  These
    processes do not count against the load average but may be woken by
    a signal.  It is up to the caller to determine why the process
    was woken it may be for one of three reasons.

      1) cv_signal()/cv_broadcast()
      2) the timeout expired
      3) a signal was received

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 6bf4d76f4782a13f3ed378d77a0bc17967c3642a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 10 12:35:22 2011 -0800

    Linux Compat: inode->i_mutex/i_sem

    Create spl_inode_lock/spl_inode_unlock compability macros to simply
    access to the inode mutex/sem.  This avoids the need to have to ugly
    up the code with the required #define's at every call site.  At the
    moment the SPL only uses this in one place but higher layers can
    benefit from the macro.

commit b7dc3138375ed4c73f55183371b48db4e6e25d79
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 3 15:49:57 2010 -0800

    Add Thread Specific Data (TSD) Regression Test

    To validate the correct behavior of the TSD interfaces it's
    important that we add a regression test.  This test is designed
    to minimally exercise the fundamental TSD behavior, it does not
    attempt to validate all potential corner cases.

    The test will first create 32 keys via tsd_create() and register
    a common destructor.  Next 16 wait threads will be created each
    of which set/verify a random value for all 32 keys, then block
    waiting to be released by the control thread.  Meanwhile the
    control thread verifies that none of the destructors have been
    run prematurely.

    The next phase of the test is to create 16 exit threads which
    set/verify a random value for all 32 keys.  They then immediately
    exit.  This is is designed to verify tsd_exit() which will be
    called via thread_exit().  This must result in all registered
    destructors being run and the memory for the tsd being free'd.

    After this tsd_destroy() is verified by destroying all 32 keys.
    Once again we must see the expected number of destructors run
    and the tsd memory free'd.  At this point the blocked threads
    are released and they exit calling tsd_exit() which should do
    very little since all the tsd has already been destroyed.

    If this all goes off without a hitch the test passes.  To ensure
    no memory has been leaked, I have manually verified that after
    spl module unload no memory is reported leaked.

commit 9fe45dc1ac5d0292a69cc91f951b984f21ae0aaa
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 30 09:51:46 2010 -0800

    Add Thread Specific Data (TSD) Implementation

    Thread specific data has implemented using a hash table, this avoids
    the need to add a member to the task structure and allows maximum
    portability between kernels.  This implementation has been optimized
    to keep the tsd_set() and tsd_get() times as small as possible.

    The majority of the entries in the hash table are for specific tsd
    entries.  These entries are hashed by the product of their key and
    pid because by design the key and pid are guaranteed to be unique.
    Their product also has the desirable properly that it will be uniformly
    distributed over the hash bins providing neither the pid nor key is zero.
    Under linux the zero pid is always the init process and thus won't be
    used, and this implementation is careful to never to assign a zero key.
    By default the hash table is sized to 512 bins which is expected to
    be sufficient for light to moderate usage of thread specific data.

    The hash table contains two additional type of entries.  They first
    type is entry is called a 'key' entry and it is added to the hash during
    tsd_create().  It is used to store the address of the destructor function
    and it is used as an anchor point.  All tsd entries which use the same
    key will be linked to this entry.  This is used during tsd_destory() to
    quickly call the destructor function for all tsd associated with the key.
    The 'key' entry may be looked up with tsd_hash_search() by passing the
    key you wish to lookup and DTOR_PID constant as the pid.

    The second type of entry is called a 'pid' entry and it is added to the
    hash the first time a process set a key.  The 'pid' entry is also used
    as an anchor and all tsd for the process will be linked to it.  This
    list is using during tsd_exit() to ensure all registered destructors
    are run for the process.  The 'pid' entry may be looked up with
    tsd_hash_search() by passing the PID_KEY constant as the key, and
    the process pid.  Note that tsd_exit() is called by thread_exit()
    so if your using the Solaris thread API you should not need to call
    tsd_exit() directly.

commit 8beea9ac2428bd3b4652e484f46726e0a261523a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 30 10:36:58 2010 -0800

    Refresh autogen.sh products

    Refresh the autogen.sh products based on the versions which are
    installed by default in the GA RHEL6.0 release.

    autoconf (GNU Autoconf) 2.63
    automake (GNU automake) 1.11.1
    ltmain.sh (GNU libtool) 2.2.6b

commit c2f997b0b3b9a79b7146c8883aa09326e5def253
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Mon Nov 22 00:20:58 2010 -0800

    Make kmutex_t typesafe in all cases.

    When HAVE_MUTEX_OWNER and CONFIG_SMP are defined, kmutex_t is just
    a typedef for struct mutex.

    This is generally OK but has the downside that it can make mistakes
    such as mutex_lock(&kmutex_var) to pass by unnoticed until someone
    compiles the code without HAVE_MUTEX_OWNER or CONFIG_SMP (in which
    case kmutex_t is a real struct). Note that the correct API to call
    should have been mutex_enter() rather than mutex_lock().

    We prevent these kind of mistakes by making kmutex_t a real structure
    with only one field. This makes kmutex_t typesafe and it shouldn't
    have any impact on the generated assembly code.

    Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 058de03caaefe63086559662f2abaed1edf0e086
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 23 10:56:55 2010 -0800

    Clear cv->cv_mutex when not in use

    For debugging purposes the condition varaibles keep track of the
    mutex used during a wait.  The idea is to validate that all callers
    always use the same mutex.  Unfortunately, we have seen cases where
    the caller reuses the condition variable with a different mutex but
    in a way which is known to be safe.  My reading of the man pages
    suggests you should not do this and always cv_destroy()/cv_init()
    a new mutex.  However, there is overhead in doing this and it does
    appear to be allowed under Solaris.

    To accomidate this behavior cv_wait_common() and __cv_timedwait()
    have been modified to clear the associated mutex when the last
    waiter is dropped.  This ensures that while the condition variable
    is in use the incorrect mutex case is detected.  It also allows the
    condition variable to be safely recycled without requiring the
    overhead of a cv_destroy()/cv_init() as long as it isn't currently
    in use.

    Finally, spin lock cv->cv_lock was removed because it is not required.
    When the condition variable is used properly the caller will always
    be holding the mutex so the spin lock is redundant.  The lock was
    originally added because I expected to need to protect more than
    just the cv->cv_mutex.  It turns out that was not the case.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 00ba7ef9002a7dc7919260240f58fd8f31cea24f
Author: Ned Bass <bass6@llnl.gov>
Date:   Tue Nov 9 14:06:13 2010 -0800

    Give ENOTSUP a valid user space error value

    The ZFS module returns ENOTSUP for several error conditions where an operation
    is not (yet) supported.  The SPL defined ENOTSUP in terms of ENOTSUPP, but that
    is an internal Linux kernel error code that should not be seen by user
    programs.  As a result the zfs utilities print a confusing error message if an
    unsupported operation is attempted:

        internal error: Unknown error 524
        Aborted

    This change defines ENOTSUP in terms of EOPNOTSUPP which is consistent with
    user space.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 8655ce492fff8ebcc432cd841411634510ca09ac
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 10 12:58:07 2010 -0800

    Linux 2.6.36 compat, use fops->unlocked_ioctl()

    As of linux-2.6.36 the last in-tree consumer of fops->ioctl() has
    been removed and thus fops()->ioctl() has also been removed.  The
    replacement hook is fops->unlocked_ioctl() which has existed in
    kernel since 2.6.12.  Since the SPL only contains support back
    to 2.6.18 vintage kernels, I'm not adding an autoconf check for
    this and simply moving everything to use fops->unlocked_ioctl().

commit 9b2048c26b2579f2de40a185dc56261dd98e7ea3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 9 11:15:32 2010 -0800

    Linux 2.6.36 compat, fs_struct->lock type change

    In the linux-2.6.36 kernel the fs_struct lock was changed from a
    rwlock_t to a spinlock_t.  If the kernel would export the set_fs_pwd()
    symbol by default this would not have caused us any issues, but they
    don't.  So we're forced to add a new autoconf check which sets the
    HAVE_FS_STRUCT_SPINLOCK define when a spinlock_t is used.  We can
    then correctly use either spin_lock or write_lock in our custom
    set_fs_pwd() implementation.

commit a50cede3880ca0f7f7f10acc01bebd8617fc48ad
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 9 10:34:10 2010 -0800

    Linux 2.6.36 compat, wrap RLIM64_INFINITY

    As of linux-2.6.36 RLIM64_INFINITY is defined in linux/resource.h.
    This is handled by conditionally defining RLIM64_INFINITY in the
    SPL only when the kernel does not provide it.

commit 1e18307b6109a5b2491cd519a312b870b2e7522b
Author: Brian Behlendorf <behlendo@myhost.(none)>
Date:   Mon Nov 8 21:32:47 2010 -0800

    Fix incorrect krw_type_t type

    Flagged by the default compile options on archlinux 2010.05, we should
    be using the krw_t type not the krw_type_t type in the private data.

      module/splat/splat-rwlock.c: In function ‘splat_rwlock_test4_func’:
      module/splat/splat-rwlock.c:432:6: warning: case value ‘1’ not in
      enumerated type ‘krw_type_t’

commit c11908c75d72d291ea451fb2c35f05dafc8c9647
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 5 11:52:46 2010 -0700

    Prep for 0.5.2 tag

    Update META file to prep for 0.5.2 tag.

commit 8294c69bb759d2a4dc2e73f164cb37c297722ada
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 3 15:56:53 2010 -0700

    Clear owner after dropping mutex

    It's important to clear mp->owner after calling mutex_unlock()
    because when CONFIG_DEBUG_MUTEXES is defined the mutex owner
    is verified in mutex_unlock().  If we set it to NULL this check
    fails and the lockdep support is immediately disabled.

commit 23aa63cbf5e712493d9439f888e426f89bb97857
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Oct 22 14:16:43 2010 -0700

    Fix 2.6.35 shrinker callback API change

    As of linux-2.6.35 the shrinker callback API now takes an additional
    argument.  The shrinker struct is passed to the callback so that users
    can embed the shrinker structure in private data and use container_of()
    to access it.  This removes the need to always use global state for the
    shrinker.

    To handle this we add the SPL_AC_3ARGS_SHRINKER_CALLBACK autoconf
    check to properly detect the API.  Then we simply setup a callback
    function with the correct number of arguments.  For now we do not make
    use of the new 3rd argument.

commit a68d91d770c0d4b8b72d9d07e65a79f3f99f03c6
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Fri Sep 17 16:03:15 2010 -0700

    atomic_*_*_nv() functions need to return the new value atomically.

    A local variable must be used for the return value to avoid a
    potential race once the spin lock is dropped.

    Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit d5fcc5f51c9c3f65db5d521c53b696c074b92247
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 15 09:05:34 2010 -0700

    Fix markdown rendering

    These two lines were being rendered incorrectly on the GitHub
    site.  To fix the issue there needs to be leading whitespace
    before each line to ensure each command is rendered on its
    own line.

    $ ./configure
    $ make pkg

commit 4bc4f6d854ed783dcd40d4dc95f3f862ba063774
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Sep 14 15:54:15 2010 -0700

    Reference new zfsonlinux.org website

    The wiki contents have been converted to html and made available
    at their new home http://zfsonlinux.org.  The wiki has also been
    disabled the html pages are now the official documentation.

commit a7958f7eef5ba55987810336d887437767941d26
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Sep 2 12:12:39 2010 -0700

    Support custom build directories

    One of the neat tricks an autoconf style project is capable of
    is allow configurion/building in a directory other than the
    source directory.  The major advantage to this is that you can
    build the project various different ways while making changes
    in a single source tree.

    For example, this project is designed to work on various different
    Linux distributions each of which work slightly differently.  This
    means that changes need to verified on each of those supported
    distributions perferably before the change is committed to the
    public git repo.

    Using nfs and custom build directories makes this much easier.
    I now have a single source tree in nfs mounted on several different
    systems each running a supported distribution.  When I make a
    change to the source base I suspect may break things I can
    concurrently build from the same source on all the systems each
    in their own subdirectory.

    wget -c http://github.com/downloads/behlendorf/spl/spl-x.y.z.tar.gz
    tar -xzf spl-x.y.z.tar.gz
    cd spl-x-y-z

    ------------------------- run concurrently ----------------------
    <ubuntu system>  <fedora system>  <debian system>  <rhel6 system>
    mkdir ubuntu     mkdir fedora     mkdir debian     mkdir rhel6
    cd ubuntu        cd fedora        cd debian        cd rhel6
    ../configure     ../configure     ../configure     ../configure
    make             make             make             make
    make check       make check       make check       make check

    This is something the project has almost supported for a long time
    but finishing this support should save me lots of time.

commit d8a1b739359b04f016e2b81844a29c4d0de60bd8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Sep 2 13:15:20 2010 -0700

    Remove spl-x.y.z.zip creation in 'make dist'

    Do no create a spl-x.y.z.zip file as part of 'make dist'.  Simply
    create the standard spl-x.y.z.tar.gz file.

commit 73fc084e9272e773efa4194bc5ead654f44c4846
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Sep 2 15:39:08 2010 -0700

    Move vendor check to spl-build.m4

    This check was previously done with a hack in config.guess.
    However, since a new config.guess is copied in to place when
    forcing a full autoreconf this change was easily lost and
    never a good idea.  This commit also updates all of the
    autoconf style support scripts in config.

commit 6295556b716df883ca719d24838281ccbcce5c44
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 1 10:24:44 2010 -0700

    Prep for spl-0.5.1 tag

commit 53be2266e198134014a859fa0bb6e90196c9df0c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 1 10:23:05 2010 -0700

    Add quick build instructions

    Full update to date build information will stay on the wiki for
    now, but there is no harm in adding the bare bones instructions
    to the README.  They shouldn't change and are a reasonable
    quick start.

commit 8371f981f172426271635adf0e37b2b4aeccbe0e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 27 13:51:25 2010 -0700

    Add list_link_replace() function

    The list_link_replace() function with swap a new item it to the place
    of an old item in a list.  It is the callers responsibility to ensure
    all lists involved are locked properly.

commit d85e28ad69d87e63894308c34739da59420a582d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 27 13:36:24 2010 -0700

    Add MUTEX_NOT_HELD() function

    Simply implement the missing MUTEX_NOT_HELD() function using
    the !MUTEX_HELD construct.

commit 2b3543025cb2e61c55b4ba79a524d10fe951e3be
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 27 13:28:10 2010 -0700

    Stub out kmem cache defrag API

    At some point we are going to need to implement the kmem cache
    move callbacks to allow for kmem cache defragmentation.  This
    commit simply lays a small part of the API ground work, it does
    not actually implement any of this feature.  This is safe for
    now because the move callbacks are just an optimization.  Even
    if they are registered we don't ever really have to call them.

commit 8dbd3fbd5e7b66eb68447a9cef44d7c4542a8867
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 27 12:36:31 2010 -0700

    Add missing atomic functions

    These functions were not previous needed so they were not added.
    Now they are so add the full set.

    atomic_inc_32_nv()
    atomic_dec_32_nv()
    atomic_inc_64_nv()
    atomic_dec_64_nv()

commit 1db69544ccbbb923a419757bc8b3d1a1e8c2ef0f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 13 09:33:50 2010 -0700

    Prep for spl-0.5.0 tag

commit 4be55565fe550febc92af2e26db7d5125f58d3b5
Author: Li Wei <W.Li@Sun.COM>
Date:   Thu Aug 12 09:24:31 2010 -0700

    Fix stack overflow in vn_rdwr() due to memory reclaim

    Unless __GFP_IO and __GFP_FS are removed from the file mapping gfp
    mask we may enter memory reclaim during IO.  In this case shrink_slab()
    entered another file system which is notoriously hungry for stack.
    This additional stack usage may cause a stack overflow.  This patch
    removes __GFP_IO and __GFP_FS from the mapping gfp mask of each file
    during vn_open() to avoid any reclaim in the vn_rdwr() IO path.  The
    original mask is then restored at vn_close() time.  Hats off to the
    loop driver which does something similiar for the same reason.

      [...]
      shrink_slab+0xdc/0x153
      try_to_free_pages+0x1da/0x2d7
      __alloc_pages+0x1d7/0x2da
      do_generic_mapping_read+0x2c9/0x36f
      file_read_actor+0x0/0x145
      __generic_file_aio_read+0x14f/0x19b
      generic_file_aio_read+0x34/0x39
      do_sync_read+0xc7/0x104
      vfs_read+0xcb/0x171
      :spl:vn_rdwr+0x2b8/0x402
      :zfs:vdev_file_io_start+0xad/0xe1
      [...]

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 46aa7b3939bbbac86d2a4cfc556b33398ec12d08
Author: Ned Bass <bass6@llnl.gov>
Date:   Tue Aug 10 11:01:46 2010 -0700

    Correctly handle rwsem_is_locked() behavior

    A race condition in rwsem_is_locked() was fixed in Linux 2.6.33 and the fix was
    backported to RHEL5 as of kernel 2.6.18-190.el5.  Details can be found here:

    https://bugzilla.redhat.com/show_bug.cgi?id=526092

    The race condition was fixed in the kernel by acquiring the semaphore's
    wait_lock inside rwsem_is_locked().  The SPL worked around the race condition
    by acquiring the wait_lock before calling that function, but with the fix in
    place it must not do that.

    This commit implements an autoconf test to detect whether the fixed version of
    rwsem_is_locked() is present.  The previous version of rwsem_is_locked() was an
    inline static function while the new version is exported as a symbol which we
    can check for in module.symvers.  Depending on the result we correctly
    implement the needed compatibility macros for proper spinlock handling.

    Finally, we do the right thing with spin locks in RW_*_HELD() by using the
    new compatibility macros.  We only only acquire the semaphore's wait_lock if
    it is calling a rwsem_is_locked() that does not itself try to acquire the lock.

    Some new overhead and a small harmless race is introduced by this change.
    This is because RW_READ_HELD() and RW_WRITE_HELD() now acquire and release
    the wait_lock twice: once for the call to rwsem_is_locked() and once for
    the call to rw_owner().  This can't be avoided if calling a rwsem_is_locked()
    that takes the wait_lock, as it will in more recent kernels.

    The other case which only occurs in legacy kernels could be optimized by
    taking the lock only once, as was done prior to this commit.  However, I
    decided that the performance gain probably wasn't significant enough to
    justify the messy special cases required.

    The function spl_rw_get_owner() was only used to enable the afore-mentioned
    optimization.  Since it is no longer used, I removed it.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 5ec44a37c3857b178a958352d63c5367133526e1
Author: Ned Bass <bass6@llnl.gov>
Date:   Fri Aug 6 14:04:00 2010 -0700

    Correctly detect atomic64_cmpxchg support

    The RHEL5 2.6.18-194.7.1.el5 kernel added atomic64_cmpxchg to
    asm-x86_64/atomic.h.  That macro is defined in terms of cmpxchg which
    is provided by asm/system.h. However, asm/system.h is not #included by
    atomic.h in this kernel nor by the autoconf test for atomic64_cmpxchg, so
    the test failed with "implicit declaration of function 'cmpxchg'". This
    leads the build system to erroneously conclude that the kernel does not
    define atomic64_cmpxchg and enable the built-in definition.  This in
    turn produces a '"atomic64_cmpxchg" redefined' build warning which is fatal
    when building with --enable-debug.  This commit fixes this by including
    asm/system.h in the autoconf test.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 26f7245c7cfa77f25aedf1a500db689343644ead
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Mon Aug 2 09:24:01 2010 +0000

    Fix taskq code to not drop tasks when TQ_SLEEP is used.

    When TQ_SLEEP is used, taskq_dispatch() should always succeed even if the
    number of pending tasks is above tq->tq_maxalloc. This semantic is similar
    to KM_SLEEP in kmem allocations, which also always succeed.

    However, we cannot block forever otherwise there is a risk of deadlock.
    Therefore, we still allow the number of pending tasks to go above
    tq->tq_maxalloc with TQ_SLEEP, but we may sleep up to 1 second per task
    dispatch, thereby throttling the task dispatch rate.

    One of the existing splat tests was also augmented to test for this scenario.
    The test would fail with the previous implementation but now it succeeds.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 41f84a8d56c00f3c95a4bf0b6027bedd7abb5b15
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 30 22:20:58 2010 -0700

    Strfree() should call kfree() not kmem_free()

    Using kmem_free() results in deducting X bytes from the memory
    accounting when --enable-debug is set.  Unfortunately, currently
    the counterpart kmem_asprintf() and friends do not properly
    account for memory allocated, so we must do the same on free.
    If we don't then we end up with a negative number of lost bytes
    reported when the module is unloaded.

    A better long term fix would be to add the accounting in to the
    allocation side but that's a project for another day.

commit 099dc9c2d275b4475f130f3d03bab88516101b36
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 28 13:59:18 2010 -0700

    Add uninstall Makefile targets

    Extend the Makefiles with an uninstall target to cleanly
    remove a package which was installed with 'make install'.

    Additionally, ensure a 'depmod -a' is run as part of the
    install to update the module dependency information.

commit 287b2fb117f1ce964dc79c1f694e7d473a6b9db0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 27 10:19:44 2010 -0700

    Add Debian and Slackware style packaging via alien

    The long term fix for Debian and Slackware style packaging is
    to add native support for building these packages.  Unfortunately,
    that is a large chunk of work I don't have time for right now.
    That said it would be nice to have at least basic packages for
    these distributions.

    As a quick short/medium term solution I've settled on using alien
    to convert the RPM packages to DEB or TGZ style packages.  The
    build system has been updated with the following build targets
    which will first build RPM packages and then convert them as
    needed to the target package type:

      make rpm: Create .rpm packages
      make deb: Create .deb packages
      make tgz: Create .tgz packages
      make pkg: Create the right package type for your distribution

    The solution comes with lot of caveats and your mileage may vary.
    But basically the big limitations are that the resulting packages:

      1) Will not have the correct dependency information.
      2) Will not not include the kernel version in the release.
      3) Will not handle all differences between distributions.

    But the resulting packages should be easy to install and remove
    from your system and take care of running 'depmod -a' and such.
    As I said at the top this is not the right long term solution.
    If any of the upstream distribution maintainers want to jump in
    and help do this right for their distribution I'd love the help.

commit 10129680f860168a61932f0011d9ab864286bfcd
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jul 26 15:47:55 2010 -0700

    Ensure kmem_alloc() and vmem_alloc() never fail

    The Solaris semantics for kmem_alloc() and vmem_alloc() are that they
    must never fail when called with KM_SLEEP.  They may only fail if
    called with KM_NOSLEEP otherwise they must block until memory is
    available.  This is quite different from how the Linux memory
    allocators work, under Linux a memory allocation failure is always
    possible and must be dealt with.

    At one point in the past the kmem code did properly implement this
    behavior, however as the code evolved this behavior was overlooked
    in places.  This patch goes through all three implementations of
    the kmem/vmem allocation functions and ensures that they will all
    block in the KM_SLEEP case when memory is not available.  They
    may still fail in the KM_NOSLEEP case in which case the caller
    is responsible for handling the failure.

    Special care is taken in vmalloc_nofail() to avoid thrashing the
    system on the virtual address space spin lock.  The down side of
    course is if you do see a failure here, which is unlikely for
    64-bit systems, your allocation will delay for an entire second.
    Still this is preferable to locking up your system and it is the
    best we can do given the constraints.

    Additionally, the code was cleaned up to be much more readable
    and comments were added to describe the various kmem-debug-*
    configure options.  The default configure options remain:
    "--enable-debug-kmem --disable-debug-kmem-tracking"

commit 849c50e7f2487dd3f1dce1417e51dff3a12338d6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jul 26 10:24:26 2010 -0700

    Fix two minor compiler warnings

    In cmd/splat.c there was a comparison between an __u32 and an int.  To
    resolve the issue simply use a __u32 and strtoul() when converting the
    provided user string.

    In module/spl/spl-vnode.c we should explicitly cast nd->last.name to
    a const char * which is what is expected by the prototype.

commit 8b0eb3f0dcf293467ddfd4b0f0d7e757f2369452
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 21 16:31:42 2010 -0700

    Remove deadcode caused by removal of format1 arg

    Commit 55abb0929e4fbe326a9737650a167a1a988ad86b removed the never
    used format1 argument of spl_debug_msg().  That in turn resulted
    in some deadcode which should be removed since it's now useless.

commit 15b52c083ee886d9cb102655b4313ae7c027784a
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Tue Jul 20 15:44:28 2010 -0700

    Fix max_ncpus definition.

    It was being defined as the constant 64 and at first I changed it to be
    NR_CPUS instead.

    However, NR_CPUS can be a large value on recent kernels (4096), and this
    may cause too large kmem allocations to happen.

    Therefore, now we use num_possible_cpus(), which should return a (typically)
    small value which represents the maximum number of CPUs than can be brought
    online in the running hardware (this value is determined at boot time by
    arch-specific kernel code).

    Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 81672c012249f1ba81a27a1ff8f9b19b4a8048a8
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Tue Jul 20 15:25:45 2010 -0700

    Display DEBUG keyword during module load when --enable-debug is used.

    Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 2c762de8303e441154a0c38c0cf78170b5d45013
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Tue Jul 20 13:51:42 2010 -0700

    Fix buggy kmem_{v}asprintf() functions

    When the kvasprintf() call fails they should reset the arguments
    by calling va_start()/va_copy() and va_end() inside the loop,
    otherwise they'll try to read more arguments rather than starting
    over and reading them from the beginning.

    Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 9dd5d138b2326201f4258b126f2bfdb0b4c6138d
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Tue Jul 20 13:48:51 2010 -0700

    Fix bcopy() to allow memory area overlap

    Under Solaris bcopy() allows overlapping memory areas so we
    must use memmove() instead of memcpy().

    Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 22cd0f19b170394ac98ca3984e8f5b119fa32c7e
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Tue Jul 20 13:47:37 2010 -0700

    Fix compilation error due to undefined ACCESS_ONCE macro.

    When CONFIG_DEBUG_MUTEXES is turned on in RHEL5's kernel config, the mutexes
    store the owner for debugging purposes, therefore the SPL will enable
    HAVE_MUTEX_OWNER. However, the SPL code uses ACCESS_ONCE() to access the
    owner, and this macro is not defined in the RHEL5 kernel, therefore we define it
    ourselves in include/linux/compiler_compat.h.

    Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit b17edc10a9c66543bef54b08e4655832aefe8939
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 20 11:55:37 2010 -0700

    Prefix all SPL debug macros with 'S'

    To avoid conflicts with symbols defined by dependent packages
    all debugging symbols have been prefixed with a 'S' for SPL.
    Any dependent package needing to integrate with the SPL debug
    should include the spl-debug.h header and use the 'S' prefixed
    macros.  They must also build with DEBUG defined.

commit 55abb0929e4fbe326a9737650a167a1a988ad86b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jul 19 14:16:05 2010 -0700

    Split <sys/debug.h> header

    To avoid symbol conflicts with dependent packages the debug
    header must be split in to several parts.  The <sys/debug.h>
    header now only contains the Solaris macro's such as ASSERT
    and VERIFY.  The spl-debug.h header contain the spl specific
    debugging infrastructure and should be included by any package
    which needs to use the spl logging.  Finally the spl-trace.h
    header contains internal data structures only used for the log
    facility and should not be included by anythign by spl-debug.c.

    This way dependent packages can include the standard Solaris
    headers without picking up any SPL debug macros.  However, if
    the dependant package want to integrate with the SPL debugging
    subsystem they can then explicitly include spl-debug.h.

    Along with this change I have dropped the CHECK_STACK macros
    because the upstream Linux kernel now has much better stack
    depth checking built in and we don't need this complexity.

    Additionally SBUG has been replaced with PANIC and provided as
    part of the Solaris macro set.  While the Solaris version is
    really panic() that conflicts with the Linux kernel so we'll
    just have to make due to PANIC.  It should rarely be called
    directly, the prefered usage would be an ASSERT or VERIFY.

    There's lots of change here but this cleanup was overdue.

commit 8f813bb168eb21cd5d64b930ee015dcf93575331
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Jul 15 09:49:38 2010 -0700

    Proposed fix for oops on SIGINT in splat atomic:64-bit test.

    The threads in the splat atomic:64-bit test share the data structure
    atomic_priv_t ap, which lives on the kernel stack of the splat user-space
    utility.  If splat terminates before the threads, accesses to that memory
    location by the other threads become invalid.  Splat synchronizes with
    the threads with the call:

    wait_event_interruptible(ap.ap_waitq, splat_atomic_test1_cond(&ap, i));

    Apparently, the SIGINT wakes and terminates splat prematurely, so that
    GPFs or other bad things happen when the threads subsequently access ap.
    This commit prevents this by using the uninterruptible form:

    wait_event(ap.ap_waitq, splat_atomic_test1_cond(&ap, i));

commit d0bd694ca93b7e43dc6aa87a2dd39d51ee3478ea
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 14 11:53:57 2010 -0700

    Fix -Werror=format-security compiler option

    Noticed under Ubuntu kernel builds we should be passing a
    format specifier and the string, not just the string.

commit f0ff89fc86873a96a3f60e86e1694775b664663e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 14 11:26:54 2010 -0700

    Linux 2.6.35 compat: filp_fsync() dropped 'stuct dentry *'

    The prototype for filp_fsync() drop the unused argument 'stuct dentry *'.
    I've fixed this by adding the needed autoconf check and moving all of
    those filp related functions to file_compat.h.  This will simplify
    handling any further API changes in the future.

commit 82b8c8fa64737edfb203156b245b48840139d2c1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 13 21:30:56 2010 -0700

    Proposed fix for low memory ZFS deadlocks

    Deadlocks in the zvol were observed when one of the ZFS threads
    performing IO trys to allocate memory while the system is low
    on memory.  The low memory condition causes dirty pages to be
    synced to the zvol but this can't progress because the original
    thread is blocked waiting on a memory allocation.  Thus we end
    up deadlocking.

    A proper solution proposed by Wizeman is to change KM_SLEEP from
    GFP_KERNEL top GFP_NOFS.  This will prevent the memory allocation
    which is trying to allocate memory from forcing a sync to the
    zvol in shrink_page_list()->pageout().

    The down side to all of this is that we are using a pretty big
    hammer by changing KM_SLEEP.  This change means ALL of the zfs
    memory allocations will be until to trigger dirty data to be
    synced.  The caller still should be able to reclaim memory from
    the various slab caches.  We will be totally dependent of other
    kernel processes which happen to be running and a small number
    of asynchronous reclaim threads to trigger the reclaim of dirty
    data pages.  This should be OK but I think we may see some
    slightly longer allocation times when under memory pressure.

    We shall see.

commit a4bfd8ea1b58d8797ec91b18982de243675e63bc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jul 12 12:38:34 2010 -0700

    Add __divdi3(), remove __udivdi3() kernel dependency

    Up until now no SPL consumer attempted to perform signed 64-bit
    division so there was no need to support this.  That has now
    changed so I adding 64-bit division support for 32-bit platforms.
    The signed implementation is based on the unsigned version.

    Since the have been several bug reports in the past concerning
    correct 64-bit division on 32-bit platforms I added some long
    over due regression tests.  Much to my surprise the unsigned
    64-bit division regression tests failed.

    This was surprising because __udivdi3() was implemented by simply
    calling div64_u64() which is provided by the kernel.  This meant
    that the linux kernels 64-bit division algorithm on 32-bit platforms
    was flawed.  After some investigation this turned out to be exactly
    the case.

    Because of this I was forced to abandon the kernel helper and
    instead to fully implement 64-bit division in the spl.  There are
    several published implementation out there on how to do this
    properly and I settled on one proposed in the book Hacker's Delight.
    Their proposed algoritm is freely available without restriction
    and I have just modified it to be linux kernel friendly.

    The update implementation now passed all the unsigned and signed
    regression tests.  This should be functional, but not fast, which is
    good enough for out purposes.  If you want fast too I'd strongly
    suggest you upgrade to a 64-bit platform.  I have also reported the
    kernel bug and we'll see if we can't get it fixed up stream.

commit d466208f1e76c80fe14751739273b1932c4329f3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 2 14:41:54 2010 -0700

    Update config.guess to recognize additional distros

    The following distros were added: redhat, fedora, debian,
    ubuntu, sles, slackware, and gentoo.

commit dbe561d8ab3c4787e8d7f1233e6013d9c79bfbcd
Author: Lars Johannsen <laj@it.dk>
Date:   Thu Jul 1 10:38:32 2010 +0159

    Allow config/build to work with autoconf-2.65

    As of autoconf-2.65 the AC_LANG_SOURCE source macro no longer
    includes the confdef.h results when expanded.  To handle this
    simply explicitly include confdef.h in conftest.c.  This will
    cause two copies to of confdef.h to be added to the test for
    earlier autoconf versions but this is not harmful.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 1814251453c8140f50170ad29d9105c1273d7e08
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 1 16:20:11 2010 -0700

    Require gawk the usermode helper fails with awk

    For some reason when awk invoked by the usermode helper the command
    always fails.  Interestingly gawk does not suffer from this problem
    which is why I never observed this failure since the distro I tested
    with all had gawk installed instead of awk.  Anyway, the simplest
    thing to do here is to just make gawk mandatory.  I've added a
    configure check for gawk specifically and have updated the command
    to call gawk not awk.

commit 7119bf704490bcb9abca9fa80214313024d381a2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 1 13:37:43 2010 -0700

    Add configure check for user_path_dir()

    I didn't notice at the time but user_path_dir() was not introduced
    at the same time as set_fs_pwd() change.  I had lumped the two
    together but in fact user_path_dir() was introduced in 2.6.27 and
    set_fs_pwd() taking 2 args was introduced in 2.6.25.  This means
    builds against 2.6.25-2.6.26 kernels were broken.

    To fix this I've added a check for user_path_dir() and no longer
    assume that if set_fs_pwd() takes 2 args then user_path_dir() is
    also available.

commit e2d28a3743807c8708727cf51b94e4e8407bea65
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 1 13:27:30 2010 -0700

    Use $target_cpu instead of `arch`

    We should not be using arch for a few reasons.  First off it might
    not be installed on their system, and secondly they may be trying
    to cross-compile.

commit 8fd4e3af2e7e4d7c45288f9dad1290b7532d7dc9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 1 13:25:34 2010 -0700

    Check sourcelink is set before passing to readlink

    When no source was found in any of the expected paths treat
    this as fatal and provide the user with a hint as to what
    they should do.

commit 55f10ae5e91817e339f89e312a747ef6bc2dde66
Author: Ned Bass <bass6@llnl.gov>
Date:   Wed Jun 30 17:34:57 2010 -0700

    Implementation of a regression test for TQ_FRONT.

    Use 3 threads and 8 tasks.  Dispatch the final 3 tasks with TQ_FRONT.
    The first three tasks keep the worker threads busy while we stuff the
    queues.  Use msleep() to force a known execution order, assuming
    TQ_FRONT is properly honored.  Verify that the expected completion
    order occurs.

    The splat_taskq_test5_order() function may be useful in more than
    one test.  This commit generalizes it by renaming the function to
    splat_taskq_test_order() and adding a name argument instead of
    assuming SPLAT_TASKQ_TEST5_NAME as the test name.

    The documentation for splat taskq regression test #5 swaps the two required
    completion orders in the diagram.  This commit corrects the error.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 1a73940d39f07332921a7f78eaca9bd9266c5c7a
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Jul 1 10:12:57 2010 -0700

    Initialize the /dev/splatctl device buffer

    On open() and initialize the buffer with the SPL version string.  The
    user space splat utility expects to find the SPL version string when
    it opens and reads from /dev/splatctl.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit f0d8bb26b492dca0da1faff50b097b1665143bf4
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Jul 1 10:07:51 2010 -0700

    Implementation of the TQ_FRONT flag.

    Adds a task queue to receive tasks dispatched with TQ_FRONT.  Worker
    threads pull tasks from this high priority queue before the default
    pending queue.

    Executing tasks out of FIFO order potentially breaks taskq_lowest_id()
    if we do not preserve the ordering of the work list by taskqid.
    Therefore, instead of always appending to the work list, we search for
    the appropriate place to insert a task.  The common case is to append
    to the list, so we make this operation efficient by searching the work
    list in reverse order.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit c2688979a4ee3b9c0b1d00e94ce2a37ba71b6af6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 1 09:40:29 2010 -0700

    Remove AC_DEFINE for DEBUG/NDEBUG

    Whoops, I momentarilly forgot I had explicitly set these as CC
    options so dependent packages which need to include spl_config.h
    would not end up having these defined which can result in
    accidentally hanging debug enabled at best, or a build failure
    at worst.

commit c950d1480dc2bf72b4ea69f32976be016c66135f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jun 30 17:05:36 2010 -0700

    Only make compiler warnings fatal with --enable-debug

    While in theory I like the idea of compiler warnings always being
    fatal.  In practice this causes problems when small harmless errors
    cause build failures for end users.  To handle this I've updated
    the build system such that -Werror is only used when --enable-debug
    is passed to configure.  This is how I always build when developing
    so I'll catch all build warnings and end users will not get stuck
    by minor issues.

commit 6801b7154ccd8df47564d0f888166f3da931f3ff
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jun 30 10:47:36 2010 -0700

    Linux-2.6.33 compat, O_DSYNC flag added

    Prior to linux-2.6.33 only O_DSYNC semantics were implemented and
    they used the O_SYNC flag.  As of linux-2.6.33 this behavior was
    properly split in to O_SYNC and O_DSYNC respectively.

commit 79a3bf130b78cae41be339917788dde0b45c7d84
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jun 30 10:36:20 2010 -0700

    Linux-2.6.33 compat, .ctl_name removed from struct ctl_table

    As of linux-2.6.33 the ctl_name member of the ctl_table struct
    has been entirely removed.  The upstream code has been updated
    to depend entirely on the the procname member.  To handle this
    all references to ctl_name are wrapped in a CTL_NAME macro which
    simply expands to nothing for newer kernels.  Older kernels are
    supported by having it expand to .ctl_name = X just as before.

commit fd921c2e0c36c0c658031bc8bf4a3f912a3349f7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jun 30 09:47:57 2010 -0700

    Linux-2.6.33 compat, check <generated/utsrelease.h> for UTS_RELEASE

    It seems the upstream community moved the definition of UTS_RELEASE
    yet again as of linux-2.6.33.  Update the build system to check in
    all three possible locations where your kernel version may be defined.

    	$kernelbuild/include/linux/version.h
    	$kernelbuild/include/linux/utsrelease.h
    	$kernelbuild/include/generated/utsrelease.h

commit 1e48754059046c01ac8e35c8686e2d1940d984f9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jun 29 14:13:07 2010 -0700

    Add basic README

    A simple README with a short summary of the project and a link
    directing people to the online documentation.

commit ede0bdffb6d36915ad610b0bdf7d790f858f448c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jun 28 12:48:20 2010 -0700

    Treat mutex->owner as volatile

    When HAVE_MUTEX_OWNER is defined and we are directly accessing
    mutex->owner treat is as volative with the ACCESS_ONCE() helper.
    Without this you may get a stale cached value when accessing it
    from different cpus.  This can result in incorrect behavior from
    mutex_owned() and mutex_owner().  This is not a problem for the
    !HAVE_MUTEX_OWNER case because in this case all the accesses
    are covered by a spin lock which similarly gaurentees we will
    not be accessing stale data.

    Secondly, check CONFIG_SMP before allowing access to mutex->owner.
    I see that for non-SMP setups the kernel does not track the owner
    so we cannot rely on it.

    Thirdly, check CONFIG_MUTEX_DEBUG when this is defined and the
    HAVE_MUTEX_OWNER is defined surprisingly the mutex->owner will
    not be cleared on mutex_exit().  When this is the case the SPL
    needs to make sure to do it to ensure MUTEX_HELD() behaves as
    expected or you will certainly assert in mutex_destroy().

    Finally, improve the mutex regression tests.  For mutex_owned() we
    now minimally check that it behaves correctly when checked from the
    owner thread or the non-owner thread.  This subtle behaviour has bit
    me before and I'd like to catch it early next time if it reappears.

    As for mutex_owned() regression test additonally verify that
    mutex->owner is always cleared on mutex_exit().

commit 616df2dd8bf76e6eb73b546d75e4c4291e104ecf
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jun 28 12:34:20 2010 -0700

    Fix subtle race in threads test case

    The call to wake_up() must be moved under the spin lock because
    once we drop the lock 'tp' may no longer be valid because the
    creating thread has exited.  This basic thread implementation
    was correct, this was simply a flaw in the test case.

commit 5be4767ae1cc1b864faad47eda7009193a60759e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jun 28 11:39:43 2010 -0700

    Accept but ignore TASKQ_DC_BATCH and TQ_FRONT

    For the moment the SPL accepts the TASKQ_DC_BATCH and TQ_FRONT
    flags however they get silently ignored.  This is harmless for
    the moment but it does need to be implemented at some point.

commit e6de04b73cfaa1b17eee531d472cbbd37c247502
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 24 09:41:59 2010 -0700

    Add kmem_vasprintf function

    We might as well have both asprintf() variants.  This allows us
    to safely pass a va_list through several levels of the stack
    using va_copy() instead of va_start().

commit 438683c0a9c9a045106f27aca85dc1855d926497
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jun 21 10:19:44 2010 -0700

    Revert "Support TQ_FRONT flag used by taskq_dispatch()"

    This reverts commit eb12b3782c94113d2d40d2da22265dc4111a672b.

commit 3cb77549d1bbfd246e6321d8fe34dce480f31eda
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jun 16 15:57:04 2010 -0700

    Update warnings in kmem debug code

    This fix was long overdue.  Most of the ground work was laid long
    ago to include the exact function and line number in the error message
    which there was an issue with a memory allocation call.  However,
    probably due to lack of time at the moment that informatin never
    made it in to the error message.  This patch fixes that and trys
    to standardize the kmem debug messages as well.

commit 8ffef449efa88c7d22d3235fe98ae30c1cdc4ef3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jun 14 14:20:31 2010 -0700

    Add missing header util/sscanf.h

commit def465ad4bfdddaf0e2f776f524fa596defcb4ea
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jun 14 14:18:48 2010 -0700

    Include kstat.h from kmem.h

    It turns out Solaris incidentally includes kstat.h from kmem.h.  As
    a side effect of this certain higher level .c files which should
    explicitly include kstat.h don't because they happen to get it
    via kmem.h.  To make like easier for everyone I do the same.

commit eb12b3782c94113d2d40d2da22265dc4111a672b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 11 14:53:23 2010 -0700

    Support TQ_FRONT flag used by taskq_dispatch()

    Allow taskq_dispatch() to insert work items at the head of the
    queue instead of just the tail by passing the TQ_FRONT flag.

commit 32c6147dee702e6033a9f3b4999a0b9025a88260
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 11 14:57:49 2010 -0700

    Minor cleanup and Solaris API additions.

    Minor formatting cleanups.

    API additions:
    * {U}INT8_{MIN,MAX}, {U}INT16_{MIN,MAX} macros.
    * id_t typedef
    * ddi_get_lbolt(), ddi_get_lbolt64() functions.

commit b868e22f05fd85be16afee800207f72b8e310d32
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 11 14:48:18 2010 -0700

    Add kmem_asprintf(), strfree(), strdup(), and minor cleanup.

    This patch adds three missing Solaris functions: kmem_asprintf(), strfree(),
    and strdup().  They are all implemented as a thin layer which just calls
    their Linux counterparts.  As part of this an autoconf check for kvasprintf
    was added because it does not appear in older kernels.  If the kernel does
    not provide it then spl-generic implements it.

    Additionally the dead DEBUG_KMEM_UNIMPLEMENTED code was removed to clean
    things up and make the kmem.h a little more readable.

commit bb1bb2c4c49659b47d65beb8ac24dc2c86989553
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 11 15:02:24 2010 -0700

    Add xuio_* structures and typedefs.

    Add the basic xuio structure and typedefs for Solaris style zero copy.
    There's a decent chance this will not be the way I handle this on Linux
    but providing the basic types simplifies things for now.

commit 750a7101f8deecc4e8187f16c880cded2667cef8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 11 14:45:42 2010 -0700

    Stub out additional missing headers

commit ae4c36adce9228eb444c1d5e19f00e83303dbeee
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 11 14:37:46 2010 -0700

    Cleanly split Linux proc.h (fs) from conflicting Solaris proc.h (process)

    Under linux the proc.h header is for the /proc filesystem, and under
    Solaris the proc/h header if for processes.  This patch correctly
    moves the Linux proc functionality in a linux/proc_compat.h header
    and leaves the sys/proc.h for use by Solaris.  Minor updates were
    required to all the call sites where it was included of course.

commit 71b1242e677d1e44d9273f9bbe1206a2184eabf8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 11 14:42:16 2010 -0700

    Update META to version 0.5.0

commit 1b4ad25e2f29172c86d3293b61f0c5232d4a2da8
Author: Alex Zhuravlev <Alex.Zhuravlev@Sun.COM>
Date:   Wed Jun 2 22:01:14 2010 -0700

    Stack overflow on 64-bit modulus operations on 32-bit architectures.

    Running 'zpool create' on a 32-bit machine with an SPL compiled with
    gcc 4.4.4 led to a stack overlow.  This turned out to be due to some
    sort of 'optimization' by gcc:

    uint64_t __umoddi3(uint64_t dividend, uint64_t divisor)
    {
       return dividend - divisor * (dividend / divisor);
    }

    This code was supposed to be using __udivdi3 to implement /, but gcc
    instead implemented it via __umoddi3 itself.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 8a1c9a02fb66ac5885990ec4d82faf03f820085b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sun May 23 09:51:17 2010 -0700

    Minor 32-bit fix cast to hrtime_t before the mutliply.

    It's important to cast to hrtime_t before doing the multiply because
    the ts.tv_sec type is only 32-bits and we need to promote it to 64-bits.

commit 49638d838846b551f033037c2ff13368e6fdd166
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 21 15:52:06 2010 -0700

    Refresh autogen.sh products with automake 1.11.1.

commit 3cca28a7859b78ec9add4e38c3c12cf1527e3e87
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 21 14:17:44 2010 -0700

    Re-Prep for 0.4.9 tag with a few more fixes and updated ChangeLog

commit edbbb609bd4418997282e4fe7110eb8073dd66cb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 21 11:53:49 2010 -0700

    Minor spec file cleanup for RHEL6 package dependency.

commit 32f5faff694b30c7992181057e3028571f834d41
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu May 20 14:20:34 2010 -0700

    Simplify rwlock implementation.

    Remove RW_COUNT() from the rwlock implementation.  The idea was that it
    could be used as a generic wrapper for getting at the internal state
    of a rwlock.  While a good idea it's proven problematic to keep it
    correct for multiple archs and internal implementation changes.  In
    short it hasn't been worth the trouble.

    With that and simplicity in mind things have been updated to use the
    rwsem_is_locked() function instead of RW_COUNT for the RW_*_HELD()
    functions.  As for rw_upgrade() it remains only implemented for
    the generic rwsem implemenation.  It remains to be determined if its
    worth the effort of adding a custom implementation for each arch.

commit 23d91792efdc42779605025e15b03d63226cff6a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu May 20 14:16:59 2010 -0700

    Use KM_NODEBUG macro in preference to __GFP_NOWARN.

commit 3626ae6a7008b2d4d16ddd01defd45a8d7aac3b8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu May 20 10:15:51 2010 -0700

    Disable spl_debug_panic_on_bug by default.

    While I may prefer to have the system panic on an SBUG and to get
    crash dump for analysis.  I suspect most peoples systems are not
    configured from crash dump and the best thing to so is to simply
    halt the thread and print an error to the console.  This way they
    have a good chance of actually saving the stack trace and debug log.

commit e0dcb22e4ee6b7205e7cc1acd6de24d02509e9cc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu May 20 09:52:37 2010 -0700

    Adjust 'large' object sizes in kmem:slab_large test.

    64K objects are large for a kmem based slab (2M slabs)
    1M objects are large for a vmem cased slab (32M slabs)

commit 5198ea0e713895efc06f1254e009e2271436fc6f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 19 16:53:13 2010 -0700

    Remove kmem_set_warning() interface replace with __GFP_NOWARN flag.

    Remove the kmem_set_warning() hack used by the kmem-splat regression
    tests with a per-allocation flag called __GFP_NOWARN.  This matches
    the lower level linux flag of similar by slightly different function.
    The idea is you can then explicitly set this flag on requests where
    you know your breaking the max 8k rule but you need/want to do it
    anyway.

    This is currently used by the regression tests where we intentionally
    push things to the limit but don't want the log noise.  Additionally,
    we are forced to use it in spl_kmem_cache_create() because by default
    NR_CPUS is very large and theres no easy way to handle that.

    Finally, I've added a stack_dump() call to the warning when it is
    trigger to make to clear exactly where the allocation is taking place.

commit 627a74972c23ddd2d27163213317cdfa878eb4d7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 19 16:17:06 2010 -0700

    Set default debug log patch to /tmp/spl-log.

    Using /tmp/ is a preferable default, it can always be overriden
    using the module option on a case-by-case basis.

    Additionally standardize some log messages based on the same
    default log level used by the kernel.

commit 99879b257c509a1571dc412128b9b2cfbaac8ba4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue May 18 09:18:20 2010 -0700

    Minor spec file cleanup for srpm case.

    Ensure kdevpkg is defined is srpm case before using it to define
    the devel_requires macro.  Interestingly this is not an issue for
    rpm-4.7.1-4 but it is for rpm-4.4.2.3-18.

commit de7cc348212af1b6bdc836be61943ba9e9cfcea7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon May 17 15:47:24 2010 -0700

    Prep for 0.4.9 tag, updated META and ChangeLog

commit 716154c5926eb391eb8178203496430ffa7ebed8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon May 17 15:18:00 2010 -0700

    Public Release Prep

    Updated AUTHORS, COPYING, DISCLAIMER, and INSTALL files.  Added
    standardized headers to all source file to clearly indicate the
    copyright, license, and to give credit where credit is due.

commit 8e2140b770152df7aa91e495f11a73308bfc6c13
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 14 09:42:53 2010 -0700

    Add 3 missing typedefs.

    Add processorid_t, pc_t, index_t.

commit a76df2dc0fde313d1ecaab61d0dcd46c3cdd6151
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 14 09:40:52 2010 -0700

    Add console_*printf() functions.

    Add support for the missing console_vprintf() and console_printf()
    functions.

commit 6020190e8f5a94bee7e65a787a1b784cb0f4c4d0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 14 09:31:22 2010 -0700

    Use do_posix_clock_monotonic_gettime() as described by comment.

    While this does incur slightly more overhead we should be using
    do_posix_clock_monotonic_gettime() for gethrtime() as described
    by the existing comment.

commit f752b46eb3c3b889d62465ea800cf17c980becd1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 14 09:24:51 2010 -0700

    Add cv_wait_interruptible() function.

    This is a minor extension to the condition variable API to allow
    for reasonable signal handling on Linux.  The cv_wait() function by
    definition must wait unconditionally for cv_signal()/cv_broadcast()
    before waking it.  This makes it impossible to woken by a signal
    such as SIGTERM.  The cv_wait_interruptible() function was added
    to handle this case.  It behaves identically to cv_wait() with the
    exception that it waits interruptibly allowing a signal to wake it
    up.  This means you do need to be careful and check issig() after
    waking.

commit 97f8f6d78999ab41d23cf5942d55ea3ad0ca4f3e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 23 15:55:02 2010 -0700

    Dump log from current process when required

    When dumping a debug log first check that it is safe to create
    a new thread and block waiting for it.  If we are in an atomic
    context or irqs and disabled it is not safe to sleep and we
    must write out of the debug log from the current process.

commit d05ec4b45f77c0f401098d88b5299ef090c73ca9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 23 14:39:47 2010 -0700

    Assume TQ_SLEEP when not explicitly specified.

commit 663e02a135953a432c8497916657a29cbcd93c01
Author: Ricardo Correia <Ricardo.M.Correia@Sun.COM>
Date:   Fri Apr 23 12:19:10 2010 -0700

    Handle the FAPPEND option in vn_rdwr().

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 82a358d9c0750a84232adf5c092aeec339c9dd3a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Apr 22 12:48:40 2010 -0700

    Update vn_set_pwd() to allow user|kernal address for filename

    During module init spl_setup()->The vn_set_pwd("/") was failing
    with -EFAULT because user_path_dir() and __user_walk() both
    expect 'filename' to be a user space address and it's not in
    this case.  To handle this the data segment size is increased
    to to ensure strncpy_from_user() does not fail with -EFAULT.

    Additionally, I've added a printk() warning to catch this and
    log it to the console if it ever reoccurs.  I thought everything
    was working properly here because there consequences of this
    failing are subtle and usually non-critical.

commit ef6c1368848f364ac08ccba60bb88010548d9930
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 20 15:16:27 2010 -0700

    Disable rw_tryupgrade() for newer kernels

    For kernels using the CONFIG_RWSEM_GENERIC_SPINLOCK implementation
    nothing has changed.  But if your kernel is building with arch
    specific rwsems rw_tryupgrade() has been disabled until it can
    be implemented correctly.  In particular, the x86 implementation
    now leverages atomic primatives for serialization rather than
    spinlocks.  So to get this working again it will need to be
    implemented as a cmpxchg for x86 and likely something similiar
    for other arches we are interested in.  For now it's safest
    to simply disable it.

commit 8934764e6049d1eebae3eca8af99b8ee7140c0ab
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 26 15:21:06 2010 -0700

    Add support for 'make -s' silent builds

    The cleanest way to do this is to set AM_LIBTOOLFLAGS = --silent.  However,
    AM_LIBTOOLFLAGS is not honored by automake-1.9.6-2.1 which is what I have
    been using.  To cleanly handle this I am updating to automake-1.11-3 which
    is why it looks like there is a lot of churn in the Makefiles.

commit 16b719f0066047aaf404756a0b4fe8c74eec6a2a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 22 14:45:33 2010 -0700

    Allow spl_config.h to be included by dependant packages (updated)

    We need dependent packages to be able to include spl_config.h to
    build properly.  This was partially solved in commit 0cbaeb1 by using
    AH_BOTTOM to #undef common #defines (PACKAGE, VERSION, etc) which
    autoconf always adds and cannot be easily removed.  This solution
    works as long as the spl_config.h is included before your projects
    config.h.  That turns out to be easier said than done.  In particular,
    this is a problem when your package includes its config.h using the
    -include gcc option which ensures the first thing included is your
    config.h.

    To handle all cases cleanly I have removed the AH_BOTTOM hack and
    replaced it with an AC_CONFIG_HEADERS command.  This command runs
    immediately after spl_config.h is written and with a little awk-foo
    it strips the offending #defines from the file.  This eliminates
    the problem entirely and makes header safe for inclusion.

    Also in this change I have removed the few places in the code where
    spl_config.h is included.  It is now added to the gcc compile line
    to ensure the config results are always available.

    Finally, I have also disabled the verbose kernel builds.  If you
    want them back you can always build with 'make V=1'.  Since things
    are working now they don't need to be on by default.

commit aa600d8a3843755be1dd621ecd00401f26f3bb49
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 18 13:39:51 2010 -0700

    Reduce max kmem based slab size

    Allowing MAX_ORDER-1 sized allocations for kmem based slabs have
    been observed to result in deadlocks.  To help prvent this limit
    max kmem based slab size to MAX_ORDER-3.  Just for the record
    callers should not be creating slabs like this, but if they do
    we should still handle it as safely as we can.

commit c5c3d402f7109e37eeee54cd69d15c8d6cabf5d6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 11 15:36:50 2010 -0800

    Prep for 0.4.8 tag, updated META and ChangeLog

commit 6f088fde276e75c3b1cc824024f712c55d450651
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 11 14:29:17 2010 -0800

    Ignore unsigned module build products

    Along with the addition of signed kernel modules in newer kernel
    we have a few new build products we need to ignore.   LKLM has the
    whole thread for those interested: http://lkml.org/lkml/2007/2/14/164

commit 3cce0f13652dd3476cb6939df2656631b2dee4b8
Author: Brian J. Murrell <brian@sun.com>
Date:   Mon Mar 8 15:12:22 2010 -0800

    Fix definitions for the unknown distro/installation

    If the distro/installation really is unsupported (i.e. unknown) we should
    not make it look like a known distribution (i.e. RHEL) complete with
    dependencies on other RPMs and trying to find kenrel source in the RH
    standard location.

    Additionally add 'k' prefix for kernel requires for consistency.

commit 534c4e38cb2e070e8502798e3eecf297ff82f480
Author: Brian J. Murrell <brian@sun.com>
Date:   Mon Mar 8 14:19:30 2010 -0800

    When no kernel source has been pointed to, first attempt to use
    /lib/modules/$(uname -r)/source.  This will likely fail when building
    under a mock (http://fedoraproject.org/wiki/Projects/Mock) chroot
    environment since `uname -r` will report the running kernel which
    likely is not the kernel in your chroot.  To cleanly handle this
    we fallback to using the first kernel in your chroot.

    The kernel-devel package which contains all the kernel headers and
    a few build products such as Module.symver{s} is all the is required.
    Full source is not needed.

commit 21006d08af406344fafc97d2eb43b73e781e49ff
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 8 13:08:09 2010 -0800

    Remove Module.markers and Module.symver{s} in clean target

    Split 'modules' and 'clean' Makefile targets to allow us to
    cleanly remove the Module.* build products with a 'make clean'.

commit 3977f8370f8caf57600deff6795894410f0e715e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 4 12:14:56 2010 -0800

    Linux 2.6.32 compat, proc_handler() API change

    As of linux-2.6.32 the 'struct file *filp' argument was dropped from
    the proc_handle() prototype.  It was apparently unused _almost_
    everywhere in the kernel and this was simply cleanup.

    I've added a new SPL_AC_5ARGS_PROC_HANDLER autoconf check for this and
    the proper compat macros to correctly define the prototypes and some
    helper functions.  It's not pretty but API compat changes rarely are.

commit 694921bc49b3267b3fc0bc3a9e753fbc206e1a61
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Fri Jan 8 01:19:49 2010 +0000

    sun-misc-gitignore

    Add .gitignore files.

    Signed-off-by: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>

commit f7e8739c940c4175b5298de9a00c8c7974aff489
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Thu Jan 7 16:58:30 2010 +0000

    sun-fix-whitespace

    Whitespace fixes.

    Signed-off-by: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>

commit b520b14305975bc8b18d3b8e3844ba6c4e119a0d
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Thu Jan 7 16:58:29 2010 +0000

    sun-fix-panic-str

    Fix panic() string, which was being used as a format string, instead of an already-formatted string.

    Signed-off-by: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>

commit 5562e5d105aa5120a828b38c5d1a635d852bcdde
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 5 13:34:09 2010 -0800

    Added splat taskq task ordering test case.

    This test case verifies the correct behavior of taskq_wait_id().
    In particular it ensure the the following two cases are handled
    properly:

    1) Task ids larger than the waited for task id can run and
       complete as long as there is an available worker thread.
    2) All task ids lower than the waited one must complete before
       unblocking even if the waited task id itself has completed.

commit 82387586af283ac5fa6cde5d316f7ed4c587efec
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 4 15:52:26 2010 -0800

    Optimize lowest outstanding taskqid calculation in taskq_lowest_id()

    In the initial version of taskq_lowest_id() the entire pending and
    work list was locked under the tq->tq_lock to determine the lowest
    outstanding taskqid.  At the time this done because I was rushed
    and wanted to make sure it was right... fast was secondary.  Well now
    fast is important too so I carefully thought through the pending
    and work list management and convinced myself it is safe and correct
    to simply check the first entry.  I added a large comment to the source
    to explain this.  But basically as long as we are careful to ensure the
    pending and work list stay sorted this is safe and fast.

    The motivation for this chance was that I was observing as much as
    10% of the total CPU time go to waiting on the tq->tq_lock when the
    pending list was long.  This resolves that problems and frees up
    that CPU time for something useful.

commit ef1c7a069131512458be75aae1e4857fcd8f133b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 23 12:57:10 2009 -0800

    Strip __GFP_ZERO from kmalloc it is not available for older kernels.

    This is needed to avoid a BUG_ON() on RHEL5.4 kernel 2.6.18-164.6.1,
    since __GFP_ZERO is not a valid flag for kmalloc().

commit 641bebe35f0675489357fd2db5d20e1bfc055648
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 23 12:46:11 2009 -0800

    Fix kmem:slab_overcommit regression test locking

    This regression test could crash in splat_kmem_cache_test_reclaim()
    due to a race between the slab relclaim and the normal exiting of
    the thread.  Specifically, the kct structure could be free'd by
    the thread performing the allocations while the reclaim function
    was also working on that's threads kct structure.  The simplest
    fix is to extend the kcp->kcp_lock over the reclaim to prevent
    the kct from being freed.  A better fix would be to ref count
    these structures, but since is just a regression this locking
    change is enough.  Surprisingly this was only observed commonly
    under RHEL5.4 but all platform could have hit this.

commit 3a03ce5cbf61def830905dfab0f43d5b6074f921
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 17 11:57:44 2009 -0800

    Check for changed gaurd macro in 2.6.28+ for rwsem implementation.

    As part of the 2.6.28 cleanup which moved all the linux/include/asm/
    headers in to linux/arch, the guard headers for many header files
    changed.  The i386 rwsem implementation keys off this header to
    ensure the internal members of the rwsem structure are interpreted
    correctly.  This change checks for the new guard macro in addition
    to the only one, the implementation of the rwsem has not changed
    for i386 so this is safe and correct.

commit 242f539a2ea886769a6408192a6a263fb2a45eaf
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 11 11:20:08 2009 -0800

    Add skc_flags and full header to /proc/spl/kmem/slab.

commit f60a5f5221c594372d96767d9859a334ed0a80a6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 10 15:06:07 2009 -0800

    Splat vnode tests must return negative error codes.

    I must have been in a hurry when I wrote the vnode regression tests
    because the error code handling is not correct.  The Solaris vnode
    API returns positive errno's, these need to be converted to negative
    errno's for Linux before being passed back to user space.  Otherwise
    the test hardness with report the failure but errno will not be set
    with the correct error code.

    Additionally tests 3, 4, 6, and 7 may fail in the test file already
    exists.  To avoid false positives a user mode helper has added to
    remove the test files in /tmp/ before running the actual test.

commit d04c8a563c09d6449d5663aa2b57840653defae5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 4 15:54:12 2009 -0800

    Atomic64 compatibility for 32-bit systems without kernel support.

    This patch is another step towards updating the code to handle the
    32-bit kernels which I have not been regularly testing.  This changes
    do not really impact the common case I'm expected which is the latest
    kernel running on an x86_64 arch.

    Until the linux-2.6.31 kernel the x86 arch did not have support for
    64-bit atomic operations.  Additionally, the new atomic_compat.h support
    for this case was wrong because it embedded a spinlock in the atomic
    variable which must always and only be 64-bits total.  To handle these
    32-bit issues we now simply fall back to the --enable-atomic-spinlock
    implementation if the kernel does not provide the 64-bit atomic funcs.

    The second issue this patch addresses is the DEBUG_KMEM assumption that
    there will always be atomic64 funcs available.  On 32-bit archs this may
    not be true, and actually that's just fine.  In that case the kernel will
    will never be able to allocate more the 32-bits worth anyway.  So just
    check if atomic64 funcs are available, if they are not it means this
    is a 32-bit machine and we can safely use atomic_t's instead.

commit db1aa22297d50fa19939e487b5cc7d1f5088c64e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 1 15:53:28 2009 -0800

    Correctly handle division on 32-bit RHEL5 systems by returning dividend.

commit 5652e7b497256647cdcd4d5825cdb23b1b797dd0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 1 15:47:27 2009 -0800

    When using x86 specific rwsem correctly intepret rwsem->count.

commit 4e5691faf69cd5a3db5c7d6c12c5dc588f9e4b3d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 1 11:40:47 2009 -0800

    Only run the kmem overcommit test on 64-bit systems.

commit a5d6f6020aeeebfabd0bb5e48d8736d63b44b875
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 1 10:15:27 2009 -0800

    Add missing atomic64 compat helpers for 32-bit systems.

    The use of these functions was added with the recent atomic work
    and not tested on 32-bit systems.  Add the missing compat functions:
    atomic64_inc, atomic64_dec, atomic64_add_return, atomic64_sub_return,
    atomic64_inc_return, atomic64_dec_return.

commit 6ff686c44dbc39f12cb57e930fb20199203514d9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 1 10:14:01 2009 -0800

    Type long expected explicitly cast for 32-bit systems.

commit f6ea161924b3fe4166faa1de709fce0049bf4b11
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 24 15:24:36 2009 -0800

    spl-modules-devel package must depend on the exact version of kernel
    devel package it was built against.

commit c1541dfef13041f945aa21985249bd24ee5449e0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 24 14:21:45 2009 -0800

    Add 'srpm' --with-config option for creation of spec files.

commit ea385742dbe619f25d5a2b80aee9c9fd35ef2eed
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 24 13:15:35 2009 -0800

    Add chaos5 and rhel6 macro's to the spl-modules.spec.in

commit 958dc9e737ffe14e6253479a903700e5e8416580
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 20 16:52:29 2009 -0800

    Prep for 0.4.7 tag, updated META and ChangeLog.

commit fe883092b937eb574fd748174e951b52244813e3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 20 16:01:00 2009 -0800

    Ensure *.order and *.markers build products are removed by distclean rule.

commit 0a6c005959c168262cc9e146c0b66b64ba5d94d3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sun Nov 15 15:04:33 2009 -0800

    Ensure spl_config.h is include in spl-generic.c

commit 1273cf284b4e916fdf6dfbdf1fdb720d62738663
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sun Nov 15 15:04:02 2009 -0800

    Always use the generic mutex_destroy().

commit 05b48408fb8bc420908d93d97231bb6727b17e9a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sun Nov 15 14:27:15 2009 -0800

    Add mutex_enter_nested() as wrapper for mutex_lock_nested().

    This symbol can be used by GPL modules which use the SPL to handle
    cases where a call path takes a two different locks by the same
    name.  This is needed to avoid a false positive in the lock checker.

commit 8b45dda2bc82ee821992b928ea9d7278a953e8f9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 13 11:12:43 2009 -0800

    Linux 2.6.31 kmem cache alignment fixes and cleanup.

    The big fix here is the removal of kmalloc() in kv_alloc().  It used
    to be true in previous kernels that kmallocs over PAGE_SIZE would
    always be pages aligned.  This is no longer true atleast in 2.6.31
    there are no longer any alignment expectations.  Since kv_alloc()
    requires the resulting address to be page align we no only either
    directly allocate pages in the KMC_KMEM case, or directly call
    __vmalloc() both of which will always return a page aligned address.
    Additionally, to avoid wasting memory size is always a power of two.

    As for cleanup several helper functions were introduced to calculate
    the aligned sizes of various data structures.  This helps ensure no
    case is accidentally missed where the alignment needs to be taken in
    to account.  The helpers now use P2ROUNDUP_TYPE instead of P2ROUNDUP
    which is safer since the type will be explict and we no longer count
    on the compiler to auto promote types hopefully as we expected.

    Always wnforce minimum (SPL_KMEM_CACHE_ALIGN) and maximum (PAGE_SIZE)
    alignment restrictions at cache creation time.

    Use SPL_KMEM_CACHE_ALIGN in splat alignment test.

commit c89fdee4d3530e22270ec2b700f697c5e0d46d71
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Nov 12 15:11:24 2009 -0800

    Remove __GFP_NOFAIL in kmem and retry internally.

    As of 2.6.31 it's clear __GFP_NOFAIL should no longer be used and it
    may disappear from the kernel at any time.  To handle this I have simply
    added *_nofail wrappers in the kmem implementation which perform the
    retry for non-atomic allocations.

    From linux-2.6.31 mm/page_alloc.c:1166
    /*
     * __GFP_NOFAIL is not to be used in new code.
     *
     * All __GFP_NOFAIL callers should be fixed so that they
     * properly detect and handle allocation failures.
     *
     * We most definitely don't want callers attempting to
     * allocate greater than order-1 page units with
     * __GFP_NOFAIL.
     */
    WARN_ON_ONCE(order > 1);

commit baf2979ed35c1a9c2e90e84416e220ab3d25140a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 10 14:06:57 2009 -0800

    Linux 2.6.31 Compatibility Updates

    SPL_AC_2ARGS_SET_FS_PWD macro updated to explicitly include
    linux/fs_struct.h which was dropped from linux/sched.h.

    min_wmark_pages, low_wmark_pages, high_wmark_pages macros
    introduced in newer kernels.  For older kernels mm_compat.h
    was introduced to define them as needed as direct mappings
    to per zone min_pages, low_pages, max_pages.

commit f97cd5fd875e8c28c6411ef86845ad0ec283f115
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Nov 2 10:24:12 2009 -0800

    Prep for 0.4.6 tag, updated META and ChangeLog.

commit 055ffd98cf80bfc72c28d730753c7d139b704d44
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Oct 30 13:58:51 2009 -0700

    Autoconf --enable-debug-* cleanup

    Cleanup the --enable-debug-* configure options, this has been pending
    for quite some time and I am glad I finally got to it.  To summerize:

    1) All SPL_AC_DEBUG_* macros were updated to be a more autoconf
    friendly.  This mainly involved shift to the GNU approved usage of
    AC_ARG_ENABLE and ensuring AS_IF is used rather than directly using
    an if [ test ] construct.

    2) --enable-debug-kmem=yes by default.  This simply enabled keeping
    a running tally of total memory allocated and freed and reporting a
    memory leak if there was one at module unload.  Additionally, it
    ensure /proc/spl/kmem/slab will exist by default which is handy.
    The overhead is low for this and it should not impact performance.

    3) --enable-debug-kmem-tracking=no by default.  This option was added
    to provide a configure option to enable to detailed memory allocation
    tracking.  This support was always there but you had to know where to
    turn it on.  By default this support is disabled because it is known
    to badly hurt performence, however it is invaluable when chasing a
    memory leak.

    4) --enable-debug-kstat removed.  After further reflection I can't see
    why you would ever really want to turn this support off.  It is now
    always on which had the nice side effect of simplifying the proc handling
    code in spl-proc.c.  We can now always assume the top level directory
    will be there.

    5) --enable-debug-callb removed.  This never really did anything, it was
    put in provisionally because it might have been needed.  It turns out
    it was not so I am just removing it to prevent confusion.

commit 302b88e6abc3efe86411f9622b0a27a5b8b1f417
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Oct 30 13:53:17 2009 -0700

    Add autoconf checks for atomic64_cmpxchg + atomic64_xchg

    These functions didn't exist for all archs prior to 2.6.24.  This
    patch addes an autoconf test to detect this and add them when needed.
    The autoconf check is needed instead of just an #ifndef because in
    the most modern kernels atomic64_{cmp}xchg are implemented as in
    inline function and not a #define.

commit 5e9b5d832b228b0628a61c9c1c9bf0b05d2fe122
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Oct 30 10:55:25 2009 -0700

    Use Linux atomic primitives by default.

    Previously Solaris style atomic primitives were implemented simply by
    wrapping the desired operation in a global spinlock.  This was easy to
    implement at the time when I wasn't 100% sure I could safely layer the
    Solaris atomic primatives on the Linux counterparts.  It however was
    likely not good for performance.

    After more investigation however it does appear the Solaris primitives
    can be layered on Linux's fairly safely.  The Linux atomic_t type really
    just wraps a long so we can simply cast the Solaris unsigned value to
    either a atomic_t or atomic64_t.  The only lingering problem for both
    implementations is that Solaris provides no atomic read function.  This
    means reading a 64-bit value on a 32-bit arch can (and will) result in
    word breaking.  I was very concerned about this initially, but upon
    further reflection it is a limitation of the Solaris API.  So really
    we are just being bug-for-bug compatible here.

    With this change the default implementation is layered on top of Linux
    atomic types.  However, because we're assuming a lot about the internal
    implementation of those types I've made it easy to fall-back to the
    generic approach.  Simply build with --enable-atomic_spinlocks if
    issues are encountered with the new implementation.

commit 2b5adaf18fde25b963a9d21407773544f2cbed6f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Oct 27 16:17:06 2009 -0700

    I should not have removed these, they are important.

commit 4bd577d069985e7b79357cb9744a46b03cdf881b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Oct 27 15:54:45 2009 -0700

    Rebase cmn_err on vcmn_err and don't warn about missing \n

    The cmn_err/vcmn_err functions are layered on top of the debug
    system which usually expects a newline at the end.  However, there
    really doesn't need to be a newline there and there in fact should
    not be for the CE_CONT case so let's just drop the warning.

    Also we make a half-hearted attempt to handle a leading ! which
    means only send it to the syslog not the console.  In this case
    we just send to the the debug logs and not the console.

commit f44078fad5a941f2489ce0bbb8ed2c521f13f26e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Oct 5 12:51:58 2009 -0700

    Remove usage of the __id_u macro for portability.

    This macro was removed from the default RPM macro file.  Interestly,
    some of the arch specific macro's add it back it based on your distro
    but it should not be counted on.  However, __id still exists and its
    command line args have historically been fairly stable so we will
    directly use %{__id} -un to get the user name.

commit 39ab544079015f2b7ad854ef9c8815290d971f17
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Oct 2 16:21:59 2009 -0700

    Use kobject_set_name() for increased portability.

    As of 2.6.25 kobj->k_name was replaced with kobj->name.  Some distros
    such as RHEL5 (2.6.18) add a patch to prevent this from being a problem
    but other older distros such as SLES10 (2.6.16) have not.  To avoid
    the whole issue I'm updating the code to use kobject_set_name() which
    does what I want and has existed all the way back to 2.6.11.

commit 51a727e90f1dd11194737e64e85ca09d34be5d8b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Oct 1 16:06:15 2009 -0700

    Set cwd to '/' for the process executing insmod.

    Ricardo has pointed out that under Solaris the cwd is set to '/'
    during module load, while under Linux it is set to the callers cwd.
    To handle this cleanly I've reworked the module *_init()/_exit()
    macros so they call a *_setup()/_cleanup() function when any SPL
    dependent module is loaded or unloaded.  This gives us a chance to
    perform any needed modification of the process, in this case changing
    the cwd.  It also handily provides a way to avoid creating wrapper
    init()/exit() functions because the Solaris and Linux prototypes
    differ slightly.  All dependent modules should now call the spl
    helper macros spl_module_{init,exit}() instead of the native linux
    versions.

    Unfortunately, it appears that under Linux there has been no consistent
    API in the kernel to set the cwd in a module.  Because of this I have
    had to add more autoconf magic than I'd like.  However, what I have
    done is correct and has been tested on RHEL5, SLES11, FC11, and CHAOS
    kernels.

    In addition, I have change the rootdir type from a 'void *' to the
    correct 'vnode_t *' type.  And I've set rootdir to a non-NULL value.

commit 0e77fc118e2c105af0df5d1c7aa6627ed601bfa1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Sep 29 03:19:09 2009 -0700

    Expand SEM() outside init_rwsem and directly call __init_rwsem().

    We need to directly call __init_rwsem() or the name gets expanded
    to SEM(lock-name).  This is safe and correct for the support arches
    x86/x86_64/ppc/ppc64.

commit 4d54fdee1d774ddaef381893434a3721067e2c56
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 25 14:47:01 2009 -0700

    Reimplement mutexs for Linux lock profiling/analysis

    For a generic explanation of why mutexs needed to be reimplemented
    to work with the kernel lock profiling see commits:
      e811949a57044d60d12953c5c3b808a79a7d36ef and
      d28db80fd0fd4fd63aec09037c44408e51a222d6

    The specific changes made to the mutex implemetation are as follows.
    The Linux mutex structure is now directly embedded in the kmutex_t.
    This allows a kmutex_t to be directly case to a mutex struct and
    passed directly to the Linux primative.

    Just like with the rwlocks it is critical that these functions be
    implemented as '#defines to ensure the location information is
    preserved.  The preprocessor can then do a direct replacement of
    the Solaris primative with the linux primative.

    Just as with the rwlocks we need to track the lock owner.  Here
    things get a little more interesting because depending on your
    kernel version, and how you've built your kernel Linux may already
    do this for you.  If your running a 2.6.29 or newer kernel on a
    SMP system the lock owner will be tracked.  This was added to Linux
    to support adaptive mutexs, more on that shortly.  Alternately, your
    kernel might track the lock owner if you've set CONFIG_DEBUG_MUTEXES
    in the kernel build.  If neither of the above things is true for
    your kernel the kmutex_t type will include and track the lock owner
    to ensure correct behavior.  This is all handled by a new autoconf
    check called SPL_AC_MUTEX_OWNER.

    Concerning adaptive mutexs these are a very recent development and
    they did not make it in to either the latest FC11 of SLES11 kernels.
    Ideally, I'd love to see this kernel change appear in one of these
    distros because it does help performance.  From Linux kernel commit:
      0d66bf6d3514b35eb6897629059443132992dbd7
      "Testing with Ingo's test-mutex application...
      gave a 345% boost for VFS scalability on my testbox"
    However, if you don't want to backport this change yourself you
    can still simply export the task_curr() symbol.  The kmutex_t
    implementation will use this symbol when it's available to
    provide it's own adaptive mutexs.

    Finally, DEBUG_MUTEX support was removed including the proc handlers.
    This was done because now that we are cleanly integrated with the
    kernel profiling all this information and much much more is available
    in debug kernel builds.  This code was now redundant.

    Update mutexs validated on:
        - SLES10   (ppc64)
        - SLES11   (x86_64)
        - CHAOS4.2 (x86_64)
        - RHEL5.3  (x86_64)
        - RHEL6    (x86_64)
        - FC11     (x86_64)

commit d28db80fd0fd4fd63aec09037c44408e51a222d6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 25 14:14:35 2009 -0700

    Update rwlocks to track owner to ensure correct semantics

    The behavior of RW_*_HELD was updated because it was not quite right.
    It is not sufficient to return non-zero when the lock is help, we must
    only do this when the current task in the holder.

    This means we need to track the lock owner which is not something
    tracked in a Linux semaphore.  After some experimentation the
    solution I settled on was to embed the Linux semaphore at the start
    of a larger krwlock_t structure which includes the owner field.
    This maintains good performance and allows us to cleanly intergrate
    with the kernel lock analysis tools.  My reasons:

    1) By placing the Linux semaphore at the start of krwlock_t we can
    then simply cast krwlock_t to a rw_semaphore and pass that on to
    the linux kernel.  This allows us to use '#defines so the preprocessor
    can do direct replacement of the Solaris primative with the linux
    equivilant.  This is important because it then maintains the location
    information for each rw_* call point.

    2) Additionally, by adding the owner to krwlock_t we can keep this
    needed extra information adjacent to the lock itself.  This removes
    the need for a fancy lookup to get the owner which is optimal for
    performance.  We can also leverage the existing spin lock in the
    semaphore to ensure owner is updated correctly.

    3) All helper functions which do not need to strictly be implemented
    as a define to preserve location information can be done as a static
    inline function.

    4) Adding the owner to krwlock_t allows us to remove all memory
    allocations done during lock initialization.  This is good for all
    the obvious reasons, we do give up the ability to specific the lock
    name.  The Linux profiling tools will stringify the lock name used
    in the code via the preprocessor and use that.

    Update rwlocks validated on:
    - SLES10   (ppc64)
    - SLES11   (x86_64)
    - CHAOS4.2 (x86_64)
    - RHEL5.3  (x86_64)
    - RHEL6    (x86_64)
    - FC11     (x86_64)

commit e811949a57044d60d12953c5c3b808a79a7d36ef
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 18 16:09:47 2009 -0700

    Reimplement rwlocks for Linux lock profiling/analysis.

    It turns out that the previous rwlock implementation worked well but
    did not integrate properly with the upstream kernel lock profiling/
    analysis tools.  This is a major problem since it would be awfully
    nice to be able to use the automatic lock checker and profiler.

    The problem is that the upstream lock tools use the pre-processor
    to create a lock class for each uniquely named locked.  Since the
    rwsem was embedded in a wrapper structure the name was always the
    same.  The effect was that we only ended up with one lock class for
    the entire SPL which caused the lock dependency checker to flag
    nearly everything as a possible deadlock.

    The solution was to directly map a krwlock to a Linux rwsem using
    a typedef there by eliminating the wrapper structure.  This was not
    done initially because the rwsem implementation is specific to the arch.
    To fully implement the Solaris krwlock API using only the provided rwsem
    API is not possible.  It can only be done by directly accessing some of
    the internal data member of the rwsem structure.

    For example, the Linux API provides a different function for dropping
    a reader vs writer lock.  Whereas the Solaris API uses the same function
    and the caller does not pass in what type of lock it is.  This means to
    properly drop the lock we need to determine if the lock is currently a
    reader or writer lock.  Then we need to call the proper Linux API function.
    Unfortunately, there is no provided API for this so we must extracted this
    information directly from arch specific lock implementation.  This is
    all do able, and what I did, but it does complicate things considerably.

    The good news is that in addition to the profiling benefits of this
    change.  We may see performance improvements due to slightly reduced
    overhead when creating rwlocks and manipulating them.

    The only function I was forced to sacrafice was rw_owner() because this
    information is simply not stored anywhere in the rwsem.  Luckily this
    appears not to be a commonly used function on Solaris, and it is my
    understanding it is mainly used for debugging anyway.

    In addition to the core rwlock changes, extensive updates were made to
    the rwlock regression tests.  Each class of test was extended to provide
    more API coverage and to be more rigerous in checking for misbehavior.

    This is a pretty significant change and with that in mind I have been
    careful to validate it on several platforms before committing.  The full
    SPLAT regression test suite was run numberous times on all of the following
    platforms.  This includes various kernels ranging from 2.6.16 to 2.6.29.

    - SLES10   (ppc64)
    - SLES11   (x86_64)
    - CHAOS4.2 (x86_64)
    - RHEL5.3  (x86_64)
    - RHEL6    (x86_64)
    - FC11     (x86_64)

commit 73358d5a1dc6278fd20eed0a9872c0b1572caacc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 14 14:09:16 2009 -0700

    Various spec file tweaks to handle rpm building of several distros.
    Supported and tested distros now include SLES10, SLES11, Chaos 4.x,
    RHEL5, and Fedora 11.  This update was mainly to address rebuildable
    kernel module rpms, and correct rpm dependencies for each distro.

commit 26d77c4493b631b7faa26da50be120c9dabb3a60
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 13 15:02:34 2009 -0700

    Explicit check for requires_* rpm defines
    Due to different distros and/or versions of rpm mishandling the shorthand
    syntax simply use the longer version which get interpreted correctly.

commit 68ada11e5ccd5aab3485d77953b446937d12852b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Aug 4 12:22:33 2009 -0700

    Tag spl-0.4.5.
    Update the ChangeLog with a summary of the changes since the last release
    and update the META file to reflect the new version number.

commit 16f4a92c1019229c50d43adcc9141eb46a75f20d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 31 12:44:34 2009 -0700

    Required missing symbols for FC11 kernels (2.6.29.4-167.fc11.x86_64)

commit c65d62d8bfbc3e800e17a580267fa77de5d01d6b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 30 13:52:11 2009 -0700

    Disable stack overflow checking by default.
    The run time stack overflow checking is being disabled by default
    because it is not safe for use with 2.6.29 and latter kernels.  These
    kernels do now have their own stack overflow checking so this support
    has become redundant anyway.  It can be re-enabled for older kernels or
    arches without stack overflow checking by redefining CHECK_STACK().

commit 6ae7fef5b94275e50cc1dcd48c4ecf3b70d7f9d9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 28 15:06:42 2009 -0700

    Update global_page_state() support for 2.6.29 kernels.
    Basically everything we need to monitor the global memory state of
    the system is now cleanly available via global_page_state().  The
    problem is that this interface is still fairly recent, and there
    has been one change in the page state enum which we need to handle.
    These changes basically boil down to the following:
    - If global_page_state() is available we should use it.  Several
      autoconf checks have been added to detect the correct enum names.
    - If global_page_state() is not available check to see if
      get_zone_counts() symbol is available and use that.
    - If the get_zone_counts() symbol is not exported we have no choice
      be to dynamically aquire it at load time.  This is an absolute
      last resort for old kernel which we don't want to patch to
      cleanly export the symbol.

commit 6b09f739398a644384bfbab87792e4681707aef1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 28 15:04:21 2009 -0700

    Remove get/put_task_struct as they are not available for SLES11
    This interface is going away, and it's not as if most callers actually
    use crhold/crfree when working with credentials.  So it'll be okay
    they we're not taking a reference on the task structure the odds of
    it going away while working with a credential and pretty small.

commit ec7d53e99aee17ae1500701520649d3b54b31676
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jul 27 17:18:59 2009 -0700

    Add basic credential support and splat tests.
    The previous credential implementation simply provided the needed types and
    a couple of dummy functions needed.  This update correctly ties the basic
    Solaris credential API in to one of two Linux kernel APIs.

    Prior to 2.6.29 the linux kernel embeded all credentials in the task
    structure.  For these kernels, we pass around the entire task struct as if
    it were the credential, then we use the helper functions to extract the
    credential related bits.

    As of 2.6.29 a new credential type was added which we can and do fairly
    cleanly layer on top of.  Once again the helper functions nicely hide
    the implementation details from all callers.

    Three tests were added to the splat test framework to verify basic
    correctness.  They should be extended as needed when need credential
    functions are added.

commit 3d0cb2d31dbeef37382249ceb9f16a46c2ccd819
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jul 27 09:52:01 2009 -0700

    Remove LINUXINCLUDE from autoconf wrapper, breaks 2.6.28+ kernels.
    Modern kernel build systems at least post 2.6.16 will set this properly
    so we should not.  In fact post 2.6.28 the include headers have moved
    under arch so the guess we make here is completely wrong.  Letting
    the kernel build system set this ensure it will be correct.

commit 7064b767c22eba639ef20180f03b6a25b40ff2e1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 23 16:14:52 2009 -0700

    Positive Solaris ioctl return codes need to be negated for use by libc

commit 3c9ce2bf695a70887b4391a268e6f6c6f7868b91
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 23 13:50:53 2009 -0700

    Allow kmem or vmem based slab for slab_lock and slab_overcommit tests.
    The slab_overcommit test case could hang on a system with fragmented
    memory because it was creating a kmem based slab with 256K objects.
    To avoid this I've removed the KMC_KMEM flag which allows the slab
    to decide if it should be kmem or vmem backed based on the object
    side.  The slab_lock test shares this code and will also be effected.
    But the point of these two tests is to stress cache locking and
    memory overcommit, the type of slab is not critical.  In fact, allowing
    the slab to do the default smart thing is preferable.

commit 2141116167c36051f757f426f1fb2242ab85d2a4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 22 14:28:19 2009 -0700

    The HAVE_PATH_IN_NAMEIDATA compat macros should have been used here.

commit 749e5eb1edaa86b60e3b0c925a587925873ec560
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 22 06:59:28 2009 -0700

    Check arch/default/ path when detecting kernel objects on SLES
    We still preferentially use arch/arch looking for a native version
    but if that fails it is acceptable to use default.

commit 78d6de97bd0749b03af86ff5f76edae4bfb18b42
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 21 10:13:58 2009 -0700

    Register a basic compat ioctl handler (32 vs 64 bit compat)
    Simply pass the ioctl on to the normal handler.  If the ioctl
    helper macros are used correctly this should be safe as they
    will handle the packing/unpacking of the data encoded in the
    ioctl command.  And actually, if the caller does not use the
    IO* macros at all, and just passes small values, it will probably
    be OK as well.  We only get in to trouble if they try and use
    the upper 32-bits.  Endianness is not really a concern here, we
    we are pretty much assumed they user and kernel will match.

commit ac95d0974bb36000b979f5b2dd404638ea87baf7
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Tue Jul 14 15:24:59 2009 -0700

    Fixed NULL dereference by tcd_for_each() when the kmalloc() call in module/spl/spl-debug.c:1163 returns NULL.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit e004f04c8b110ee598baa6b86148c8148d737a44
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Tue Jul 14 15:23:25 2009 -0700

    Prevent integer overflow after ~164 days of uptime.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit b11b08ed641b8c677b529e108c2b28dc0183d34c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 14 14:28:04 2009 -0700

    Add a little paranoia here to ensure endianess is set correctly.

commit 06dea103807ed57621d5711edafc4da2f2d9bbc6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 10 10:58:06 2009 -0700

    Add basic groupmember() function, not sup groups.

commit d3126abe75a6502d55bfa2339b48d4fa263e1b02
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 10 10:56:32 2009 -0700

    Add ddi_copyin/ddi_copyout support for fake kernel originated ioctls.

commit 2a734e9c266f5fd31db84153a61263b529167732
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 9 15:00:25 2009 -0700

    Define ACE_ALL_PERMS for use by ACLs

commit c18cbcfe66880f17408ad252e77947669e12975a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 9 14:59:41 2009 -0700

    Define FKIOCTL which is used on Solaris to mark an in-kernel ioctl.

commit 3a68dc5374dd864726ae23389f03c5ca69af7c95
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 9 12:15:23 2009 -0700

    Add ASSERTV macro to simplify removing variables (the V in ASSERTV)
    which are only used in ASSERT().

commit 915404bd509e5231c134042560d86e3ac86c1ab4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 9 10:07:52 2009 -0700

    Add basic support for TASKQ_THREADS_CPU_PCT taskq flag which is
    used to scale the number of threads based on the number of online
    CPUs.  As CPUs are added/removed we should rescale the thread
    count appropriately, but currently this is only done at create.

commit aaad2f7226d26c8ca3575830d07aa08363f346b3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 2 14:19:11 2009 -0700

    Update ChangeLog

commit bb339d067054174f218ead91105472558f278fc2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 2 10:47:28 2009 -0700

    Cleanly handle --with-linux=NONE option when used to generate source
    rpms.  These should not be fatal because we actually don't need them
    until we build the source rpm.  When doing mock builds this is
    important because these dependent rpms will only be installed if
    they are specificed in the source rpms spec file.

commit 86933a6e510bb00edb097095ffe3deb7a4fbe533
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 1 14:37:44 2009 -0700

    Simplify rpm build rules, added config/rpm.am.
    Distro friendly changes such that the kernel modules are packaged seperately.

commit 5c3c70adece1ea8724cae0cf0c6cd164a4439f19
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jun 29 16:41:21 2009 -0700

    Add spl.release to spl-devel to simply dependent package version check.

commit f4f9cd75a1e4654bf50cac6dbb5496ba93bb1662
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 26 16:30:44 2009 -0700

    Install spl-devel products in /usr/src/spl-SPL_VERSION/LINUX_VERSION/
    Remove the spl symlink, it's just confusing

commit c0517c35d244beea61ff443f1e6e7229ef6337fe
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 26 13:10:52 2009 -0700

    Use do_div on older kernel where do_div64 doesn't exist.

commit 155189d4a72da0aee986193826ceb2cf602c690e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 26 12:43:27 2009 -0700

    Additional tuning to get the BuildRequires right for all cases.
    pl.spec~

commit ac12b26284a15ba8985c845a0511448435c3f065
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 26 11:37:06 2009 -0700

    Simplify the kernel depenency logic

commit af971a8594bd8c472b301c0d194addae5fc56397
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 26 10:34:40 2009 -0700

    Spec file update, for some reason the following shorthand syntax
    was failing so it was replaced with the longer %if version.

    %{!?foo: %define foo bar}

    changed to

    %if %{undefined foo}
     %define foo bar
    %endif

commit e28bc9160d4dd0706f9c65bf35062bea41f20ebb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 26 09:40:14 2009 -0700

    SRPM build farm / mock itergration

commit 07114bdee9012057c26c17ebe70ab0d9d05c4154
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 25 16:11:13 2009 -0700

    Build farm integration to ensure BuildRequires are correct

commit 31b2e0b070d99681d189951557d2344dc2b63dbf
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 25 15:31:53 2009 -0700

    Packaging Fixes
    - Kernel modules should be built using the LINUX_OBJ Makefiles and
      not the LINUX Makefiles to ensure the proper install paths are used.
    - Install modules in to addon/spl/
    - Ensure no additional kernel module build products are packaged.
    - Simplified spl.spec.in which supports RHEL, CHAOS, SLES, FEDORA.

commit 762b96f6c6dd6feb2407bf484685b4ac70ab8fcd
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jun 22 15:31:40 2009 -0700

    Update ChangeLog with a high level summary of the changes from
    0.4.3 to 0.4.4 prior to tagging.  Full details can be found in
    the git commit history.

commit 2e0e7e69769eb0f5ceda102e575da79288d05127
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jun 16 11:34:28 2009 -0700

    Packaging improvements for RHEL and SLES (part 2)
    - Allow checking for exported symbols in both Module.symvers
      and Module.symvers.  My stock SLES kernel ships an objects
      directory with Module.symvers, yet produces a Module.symvers
      in the local build directory.

commit 39a3d2a421bf067329bae352866a5d1fccbcee70
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jun 16 10:44:59 2009 -0700

    Packaging improvements for RHEL and SLES
    - Properly honor --prefix in build system and rpm spec file.
    - Add '--define require_kdir' to spec file to support building
      rpms against kernel sources installed in non-default locations.
    - Add '--define require_kobj' to spec file to support building
      rpms against kernel object installed in non-default locations.
    - Stop suppressing errors in autogen.sh script.
    - Improved logic to detect missing kernel objects when they are
      not located with the source.  This is the common case for SLES
      as well as in-tree chaos kernel builds and is done to simply
      support for multiple arches.
    - Moved spl-devel build products to /usr/src/spl-<version>, a
      spl symlink is created to reference the last installed version.

commit e554dffa6031a2cf37537fc8451f757d5ae9e46f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu May 21 10:56:11 2009 -0700

    SLES10 Fixes (part 9)
    - Proper ioctl() 32/64-bit binary compatibility.  We need to ensure the
      ioctl data itself is always packed the same for 32/64-bit binaries.
      Additionally, the correct thing to do is encode this size in bytes
      as part of the command using _IOC_SIZE().
    - Minor formatting changes to respect the 80 character limit.
    - Move all SPLAT_SUBSYSTEM_* defines in to splat-ctl.h.
    - Increase SPLAT_SUBSYSTEM_UNKNOWN because we were getting close
      to accidentally using it for a real registered subsystem.

commit 9593ef76d9ab2290a4fee7f97651dfa1f57185e6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 20 16:33:08 2009 -0700

    SLES10 Fixes (part 8)
    - Add compat_ioctl() handler, by default 64-bit SLES systems build 32-bit
      ELF binaries.  For the 32-bit binaries to pass ioctl information to a
      64-bit kernel a compatibility handler needs to be registered.  In our
      case no additional conversions are needed to convert 32-bit ioctl()
      commands to 64-bit commands so we can just call the default handler.

commit 124ca8a5a98a5e64e6a221b5f30c48361dac6f24
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 20 15:30:13 2009 -0700

    SLES10 Fixes (part 7)
    - Initial SLES testing uncovered a long standing bug in the debug
      tracing.  The tcd_for_each() macro expected a NULL to terminate
      the trace_data[i] array but this was only ever true due to luck.
      All trace_data[] iterators are now properly capped by TCD_TYPE_MAX.
    - SPLAT_MAJOR 229 conflicted with a 'hvc' device on my SLES system.
      Since this was always an arbitrary choice I picked something else.
    - The HAVE_PGDAT_LIST case should set pgdat_list_addr to the value stored
      at the address of the memory location returned by kallsyms_lookup_name().

commit 5232d256b45b3c48dd96d30b5907c0205192197b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 20 14:23:13 2009 -0700

    SLES10 Fixes (part 6)
    - Prior to 2.6.17 there were no *_pgdat helper functions in mm/mmzone.c.
      Instead for_each_zone() operated directly on pgdat_list which may or
      may not have been exported depending on how your kernel was compiled.
      Now new configure checks determine if you have the helpers or not, and
      if the needed symbols are exported.  If they are not exported then they
      are dynamically aquired at runtime by kallsyms_lookup_name().

commit 3731931529df2bff63ca3d62e387d4e602de7cb2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 20 12:23:24 2009 -0700

    Powerpc Fixes (part 1):
    - Enable builds for powerpc ISA type.
    - Add DIV_ROUND_UP and roundup macros if unavailable.
    - Cast 64-bit values for %lld format string to (long long) to
      quiet compile warning.

commit fe4573928fc73590373a074ef9b068c6286d9a26
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 20 11:54:40 2009 -0700

    SLES10 Fixes (part 5):
    - Fix incorrect mapping for spl_device_create()->class_device_create()
      which is the prefered API for 2.6.13 to 2.6.17 based kernels.

commit a093c6a49927912642ccc35e99f74ecf37d00334
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 20 11:31:55 2009 -0700

    SLES10 Fixes (part 4):
    - Configure check for SLES specific API change to vfs_unlink()
      and vfs_rename() which added a 'struct vfsmount *' argument.
      This was for something called the linux-security-module, but
      it appears that it was never adopted upstream.

commit 6c9433c150ad12d01f7ea4cfc72c8647a08ac5fc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 20 10:56:13 2009 -0700

    SLES10 Fixes (part 3):
    - Configure check for mutex_lock_nested().  This function was introduced
      as part of the mutex validator in 2.6.18, but if it's unavailable then
      it's safe to fallback to a plain mutex_lock().

commit 96dded38442684319305082aa2ac7e25f7f414da
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 20 10:08:37 2009 -0700

    SLES10 Fixes (part 2):
    - Configure check, the div64_64() function was renamed to
      div64_u64() as of 2.6.26.
    - Configure check, the global_page_state() fuction was introduced
      in 2.6.18 kernels.  The earlier 2.6.16 based SLES10 must not try
      and use it, thankfully get_zone_counts() is still available.
    - To simplify debugging poison all symbols aquired dynamically
      using spl_kallsyms_lookup_name() with SYMBOL_POISON.
    - Add console messages when the user mode helpers fail.
    - spl_kmem_init_globals() use bit shifts instead of division.
    - When the monotonic clock is unavailable __gethrtime() must perform
      the HZ division as an 'unsigned long long' because the SPL only
      implements __udivdi3(), and not __divdi3() for 'long long' division
      on 32-bit arches.

commit bf338d8d09b410884be526ed4f11b6030244dbfa
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue May 19 11:42:39 2009 -0700

    SLES10 Fixes (part 1):
    - Exclude -obj when detecting installed kernel source.
    - Detect -obj directory for out of tree kernel builds.
    - Allow kernel build system to set CC to ensure -m64 is set properly.
      This is an issue on 64-bit SLES systems which by default always
      build 32-bit binaries (unlike RHEL/Fedora which default to 64-bit)

commit f8b2932a43d955d804731c3ad03c7a47177f481c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 20 14:48:30 2009 -0700

    Prep for spl-0.4.3 tag.

commit 759dfe7d4366c60cba2693902396fc70b06d176f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 19 21:40:07 2009 -0700

    Add list_move_tail() function.

commit c388a3ab26bdd19a10c02dbb24981e6f482d0958
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 18 11:56:42 2009 -0700

    Remove useless EOL white space padding from `splat -l` command.

commit f250d90b5f1586cdee79d1612a1a4361ab69afe2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 18 11:56:00 2009 -0700

    Fix vmem leak in kmem_cache_test (missing splat_kmem_cache_test_kcp_free())

commit 0cbaeb117ae0e77d05c7709a4f5dbfad9daa799f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 17 14:55:59 2009 -0700

    Allow spl_config.h to be included by dependant packages

    We need dependent packages to be able to include spl_config.h so they
    can leverage the configure checks the SPL has done.  This is important
    because several of the spl headers need the results of these checks to
    work properly.  Unfortunately, the autoheader build product is always
    private to a particular build and defined certain common things.
    (PACKAGE, VERSION, etc).  This prevents other packages which also use
    autoheader from being include because the definitions conflict.  To
    avoid this problem the SPL build system leverage AH_BOTTOM to include
    a spl_unconfig.h at the botton of the autoheader build product.  This
    custom include undefs all known shared symbols to prevent the confict.
    This does however mean that those definition are also not availble
    to the SPL package either.  The SPL package therefore uses the
    equivilant SPL_META_* definitions.

commit e11d6c5f50ff1cb9a75f5c6a6895846f73564422
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 17 12:16:31 2009 -0700

    FC10/i686 Compatibility Update (2.6.27.19-170.2.35.fc10.i686)

    In the interests of portability I have added a FC10/i686 box to
    my list of development platforms.  The hope is this will allow me
    to keep current with upstream kernel API changes, and at the same
    time ensure I don't accidentally break x86 support.  This patch
    resolves all remaining issues observed under that environment.

    1) SPL_AC_ZONE_STAT_ITEM_FIA autoconf check added.  As of 2.6.21
    the kernel added a clean API for modules to get the global count
    for free, inactive, and active pages.  The SPL attempts to detect
    if this API is available and directly map spl_global_page_state()
    to global_page_state().  If the full API is not available then
    spl_global_page_state() is implemented as a thin layer to get
    these values via get_zone_counts() if that symbol is available.

    2) New kmem:vmem_size regression test added to validate correct
    vmem_size() functionality.  The test case acquires the current
    global vmem state, allocates from the vmem region, then verifies
    the allocation is correctly reflected in the vmem_size() stats.

    3) Change splat_kmem_cache_thread_test() to always use KMC_KMEM
    based memory.  On x86 systems with limited virtual address space
    failures resulted due to exhaustig the address space.  The tests
    really need to problem exhausting all memory on the system thus
    we need to use the physical address space.

    4) Change kmem:slab_lock to cap it's memory usage at availrmem
    instead of using the native linux nr_free_pages().  This provides
    additional test coverage of the SPL Linux VM integration.

    5) Change kmem:slab_overcommit to perform allocation of 256K
    instead of 1M.  On x86 based systems it is not possible to create
    a kmem backed slab with entires of that size.  To compensate for
    this the number of allocations performed in increased by 4x.

    6) Additional autoconf documentation for proposed upstream API
    changes to make additional symbols available to modules.

    7) Console error messages added when spl_kallsyms_lookup_name()
    fails to locate an expected symbol.  This causes the module to fail
    to load and we need to know exactly which symbol was not available.

commit 7257ec41856cf54d47a85f786f06e5a3c330acfc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sun Mar 15 15:13:49 2009 -0700

    Fix taskq_wait() not waiting bug

    I'm very surprised this has not surfaced until now.  But the taskq_wait()
    implementation work only wait successfully the first time it was called.
    Subsequent usage of taskq_wait() on the taskq would not wait.

    The issue was caused by tq->tq_lowest_id being set to MAX_INT after the
    first wait completed.  This caused subsequent waits which check that the
    waiting id is less than the lowest taskq id to always succeed.  The fix
    is to ensure that tq->tq_lowest_id is never set larger than tq->tq_next.id.

    Additional fixes which were added to this patch include:
    1) Fix a race by placing the taskq_wait_check() in the tq->tq_lock spinlock.
    2) taskq_wait() should wait for the largest outstanding id.
    3) Multiple spelling corrections.
    4) Added taskq wait regression test to validate correct behavior.

commit 5b5f5685033b60cbd698c68b11d67150426587f5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sun Mar 15 15:05:38 2009 -0700

    Mutex tests updated to use task queues instead of work queues.

    Mainly for portability reasons I have rebased the mutex tests on Solaris
    taskqs instead of linux work queues.  The linux workqueue API changed post
    2.6.18 kernels and using task queues avoids having to conditionally detect
    which workqueue API to use.

    Additionally, this is basically free additional testing for the task queues.
    Much to my surprise after updating these test cases they did expose a long
    standing bug in the taskq_wait() implementation.  This patch does not
    address that issue but the followup patch does.

commit 8123ac4f0d7409cae209858d01803fb2744b51b6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 13 13:38:43 2009 -0700

    Added SPL_AC_5ARGS_DEVICE_CREATE autoconf configure check

    As of 2.6.27 kernels the device_create() API changed to include
    a private data argument.  This check detects which version of
    device_create() function the kernel has and properly defines
    spl_device_create() to use the correct prototype.

commit a0b5ae8acaaf63fa2378a6d062e66fdf99387625
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Thu Mar 12 21:23:34 2009 +0000

    Fix off-by-1 truncation of hw_serial when converting from integer to string, when writing to /proc/sys/kernel/spl/spl_hostid.
    Fixes hostid mismatch which leads to assertion failure when the hostid/hw_serial is a 10-character decimal number:

    $ zpool status
      pool: lustre
     state: ONLINE
    lt-zpool: zpool_main.c:3176: status_callback: Assertion `reason == ZPOOL_STATUS_OK' failed.
    zsh: 5262 abort      zpool status

commit 6c33eb816268ef3fef9bb8ca9079bb46aad26605
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Wed Mar 11 05:39:03 2009 +0000

    Minor bug fix in XDR code introduced in last minute change before landing.

    1) Removed xdr_bytesrec typedef which has no consumers.  If we re-add
       it should also probably be xdr_bytesrec_t.

commit f48b61938a7efc427946418e987ce751ca6160c7
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Tue Mar 10 19:51:45 2009 +0000

    Add XDR implementation

    Added proper XDR implementation (Lustre bug 17662), needed for on-disk
    compatibility between platforms of different endianness.

commit 0c617c9a63c733643019a8d930d902ce56b153cc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 10 10:57:52 2009 -0700

    Build system cleanup

    1) Undefine non-unique entries in spl_config.h
    2) Minor Makefile cleanup
    3) Don't use includedir for proper kernel header install

commit d4326403de5f1fe9634c3d9468a51076eff702b6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 9 16:50:37 2009 -0700

    Build System Default Kernel

    Update the method used for determining which kernel to build against
    when not specified.  Previous 'uname -r' was used but this makes the
    assumption that the running kernel is the one you want to use, this is
    often not the case.  It is better to examine the usual kernel-devel
    install locations and select one of the installed kernels.

commit c5f704607bbdc5e6a89b4ac088dff16a6c1eeb5e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 5 09:08:07 2009 -0800

    Build system and packaging (RPM support)

    An update to the build system to properly support all commonly
    used Makefile targets these include:

      make all        # Build everything
      make install    # Install everything
      make clean	  # Clean up build products
      make distclean  # Clean up everything
      make dist       # Create package tarball
      make srpm       # Create package source RPM
      make rpm        # Create package binary RPMs
      make tags       # Create ctags and etags for everything

    Extra care was taken to ensure that the source RPMs are fully
    rebuildable against Fedora/RHEL/Chaos kernels.  To build binary
    RPMs from the source RPM for your system simply run:

      rpmbuild --rebuild spl-x.y.z-1.src.rpm

    This will produce two binary RPMs with correct 'requires'
    dependencies for your kernel.  One will contain all spl modules
    and support utilities, the other is a devel package for compiling
    additional kernel modules which are dependant on the spl.

      spl-x.y.z-1_<kernel version>.x86_64.rpm
      spl-devel-x.y.2-1_<kernel version>.x86_64.rpm

commit 32f74c5280ca9a753991b97370e7c4c1a4e34ede
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Thu Feb 26 18:05:39 2009 +0000

    XXX: Temporarily disable vmem_size().

commit 04fa349d697f1e28e498059d730c7d810710739a
Merge: eb7c7f4 d1ff231
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 4 10:19:41 2009 -0800

    Merge branch 'kallsyms'

commit d1ff2312b05852d2190afd1da216b4e0e1b0c7d4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 25 13:20:40 2009 -0800

    Linux VM Integration Cleanup

    Remove all instances of functions being reimplemented in the SPL.
    When the prototypes are available in the linux headers but the
    function address itself is not exported use kallsyms_lookup_name()
    to find the address.  The function name itself can them become a
    define which calls a function pointer.  This is preferable to
    reimplementing the function in the SPL because it ensures we get
    the correct version of the function for the running kernel.  This
    is actually pretty safe because the prototype is defined in the
    headers so we know we are calling the function properly.

    This patch also includes a rhel5 kernel patch we exports the needed
    symbols so we don't need to use kallsyms_lookup_name().  There are
    autoconf checks to detect if the symbol is exported and if so to
    use it directly.  We should add patches for stock upstream kernels
    as needed if for no other reason than so we can easily track which
    additional symbols we needed exported.  Those patches can also be
    used by anyone willing to rebuild their kernel, but this should
    not be a requirement.  The rhel5 version of the export-symbols
    patch has been applied to the chaos kernel.

    Additional fixes:
    1) Implement vmem_size() function using get_vmalloc_info()
    2) SPL_CHECK_SYMBOL_EXPORT macro updated to use $LINUX_OBJ instead
       of $LINUX because Module.symvers is a build product.  When
       $LINUX_OBJ != $LINUX we will not properly detect exported symbols.
    3) SPL_LINUX_COMPILE_IFELSE macro updated to add include2 and
       $LINUX/include search paths to allow proper compilation when
       the kernel target build directory is not the source directory.

commit eb7c7f44e8b7630f027cf92e0490062428f7fced
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Wed Feb 25 21:06:15 2009 +0000

    Changed ptob()/btop() mult/div into bit shifts.
    Added necessary include for PAGE_SHIFT.

commit 7819a92a9bb9e1bc5dd9f50bc644baf39f2946c9
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Sun Feb 22 03:05:40 2009 +0000

    Added btop() and moved ptob() to include/sys/param.h.

commit 4327ac3ff93b7aa47d20c184d34fb1f2202b7ab5
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Sun Feb 22 03:35:51 2009 +0000

    Changed z_compress_level() and z_uncompress() prototypes to match the ones in Solaris.
    Fixes compilation warning.

commit a1cf80b493137b00d9111d4d15405a12237ea9bd
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 19 12:28:10 2009 -0800

    Matching kmem_free() fix for use after free case.

    See commit bb01879ebe5ba5d8e2c2177d3b1ce0272c17ce07 for a full
    description.  This issue should have been addressed in the same
    commit but it slipped my mind.

commit 99639e4a13306c3809b52e487d4343d756fad2e2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 19 11:26:17 2009 -0800

    Add zone_get_hostid() function

    Minimal support added for the zone_get_hostid() function.  Only
    global zones are supported therefore this function must be called
    with a NULL argumment.  Additionally, I've added the HW_HOSTID_LEN
    define and updated all instances where a hard coded magic value
    of 11 was used; "A good riddance of bad rubbish!"

commit 63a93055fb6cfddebe31c791f7df86b14942ca9d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 18 10:16:26 2009 -0800

    Coverity 9657: Resource Leak

    Accidentally leaked list item li in error path.  The fix is to
    adjust this error path to ensure the allocated list item which
    has not yet been added to the list gets freed.  To do this we
    simply add a new goto label slightly earlier to use the existing
    cleanup logic and minimize the number of unique return points.

commit 02c7f164946e86048721a8c1af6ada3f25c3a78c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 18 10:09:01 2009 -0800

    Coverity 9656: Forward NULL

    This was a false positive the callpath being walked is impossible
    because the splat_kmem_cache_test_kcp_alloc() function will ensure
    kcp->kcp_kcd[0] is initialized to NULL.  However, there is no harm
    is making this explicit for the test case so I'm adding a line to
    clearly set it to correct the analysis.

commit 1315c884379965af367d1a38c695f73ad7d6e0c1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 18 09:48:07 2009 -0800

    Coverity 9649, 9650, 9651: Uninit

    This check was originally added to detect double initializations
    of mutex types (which it did find).  Unfortunately, Coverity is
    right that there is a very small chance we could trigger the
    assertion by accident because an uninitialized stack variable
    happens to contain the mutex magic.  This is particularly unlikely
    since we do poison the mutexs when destroyed but still possible.
    Therefore I'm simply removing the assertion.

commit bb01879ebe5ba5d8e2c2177d3b1ce0272c17ce07
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 17 16:41:08 2009 -0800

    Coverity 9654, 9654: Use After Free

    Because vmem_free() was implemented as a macro using the ','
    operator to evaluate both arguments and we performed the free
    before evaluating size we would deference the free'd pointer.
    To resolve the problem we just invert the ordering and evaluate
    size first just as if it was evaluated by the caller when being
    passed to this function.  This ensure that if the caller is
    doing something reckless like performing an assignment as
    part of the size argument we still perform it and it simply
    doesn't get removed by the macro.  Oh course nobody should
    be doing this sort of thing, but just in case.

commit 15dc8b072e77cf69b36e3df94782af4801d5e8cc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 17 16:30:58 2009 -0800

    Coverity 9652, 9653: No Effect

    Removed 2 ASSERT()s which had no effect because by definition
    size_t is always an unsigned type thus is always >= 0.

commit 014b1d6f54dc7236a7572533f9e72ec459f1abd4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 17 16:24:26 2009 -0800

    Coverity 9641: Buffer Size

    When SPLAT_TEST_INIT() initialized SPLAT_KMEM_TEST11_NAME the short
    short test name overran the static length buffer of SPLAT_NAME_SIZE.
    This was fixed by increasing the buffer length from 16 to 20 bytes.

commit 9b1b8e4c2459a02fc230cdda65b13908f263fd36
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 17 15:52:18 2009 -0800

    kmem slab magazine ageing deadlock

    - The previous magazine ageing sceme relied on the on_each_cpu()
      function to call spl_magazine_age() on each cpu.  It turns out
      this could deadlock with do_flush_tlb_all() which also relies
      on the IPI based on_each_cpu().  To avoid this problem a per-
      magazine delayed work item is created and indepentantly
      scheduled to the correct cpu removing the need for on_each_cpu().
    - Additionally two unused fields were removed from the type
      spl_kmem_cache_t, they were hold overs from previous cleanup.
        - struct work_struct work
        - struct timer_list timer

commit 1a944a7d0b1d9e62c7ac34d9041300007a656a17
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 13 10:28:55 2009 -0800

    kmem slab fixes

    - spl_slab_reclaim() 'continue' changed back to 'break' from commit
      37db7d8cf9936e6d2851a4329c11efcd9f61305c.  The original was correct,
      I have added a comment to ensure this does not happen again.
    - spl_slab_reclaim() further optimized by moving the destructor call
      in spl_slab_free() outside the skc->skc_lock.  This minimizes the
      length of time the spin lock is held, allows the destructors to
      be invoked concurrently for different objects, and as a bonus makes
      it safe (although unwise) to sleep in the destructors.

commit fce5ef8306f0413c1cede818fd6534c5b3dd1771
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 12 15:04:36 2009 -0800

    Build system update

    - Added default build flags for kernel modules:
      -Wstrict-prototypes -Werror

commit f6c5d4ff88937fd69c938e0bc6ea11ad541e0a48
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 12 14:45:22 2009 -0800

    Build system update

    - Added default build flags:
      -Wall -Wstrict-prototypes -Werror -Wshadow
    - Added missing Makefile's for include/ subdirectories.

commit 37db7d8cf9936e6d2851a4329c11efcd9f61305c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 12 13:32:10 2009 -0800

    kmem slab fixes

    - Default SPL_KMEM_CACHE_DELAY changed to 15 to match Solaris.
    - Aged out slab checking occurs every SPL_KMEM_CACHE_DELAY / 3.
    - skc->skc_reap tunable added whichs allows callers of
      spl_slab_reclaim() to cap the number of slabs reclaimed.
      On Solaris all eligible slabs are always reclaimed, and this
      is still the default behavior.  However, I suspect that is
      not always wise for reasons such as in the next comment.
    - spl_slab_reclaim() added cond_resched() while walking the
      slab/object free lists.  Soft lockups were observed when
      freeing large numbers of vmalloc'd slabs/objets.
    - spl_slab_reclaim() 'sks->sks_ref > 0' check changes from
      incorrect 'break' to 'continue' to ensure all slabs are
      checked.
    - spl_cache_age() reworked to avoid a deadlock with
      do_flush_tlb_all() which occured because we slept waiting
      for completion in spl_cache_age().  To waiting for magazine
      reclamation to finish is not required so we no longer wait.
    - spl_magazine_create() and spl_magazine_destroy() shifted
      back to using for_each_online_cpu() instead of the
      spl_on_each_cpu() approach which was of course a bad idea
      due to memory allocations which Ricardo pointed out.

commit f500ccff35a55d04e7f6b8ddb54ff6e54e9c5d70
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Sat Feb 7 00:53:39 2009 +0000

    Minor bug fix due to MAXOFFSET_T constant being too large on 32-bit systems.

commit e50ad76da5379916a2b2942e4617c6670fb43b27
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 5 13:34:51 2009 -0800

    Prep for 0.4.2 tag

commit 4ab13d3b5c2d0724632dd29c0970ff7df00985f5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 5 12:26:34 2009 -0800

    Additional Linux VM integration

    Added support for Solaris swapfs_minfree, and swapfs_reserve tunables.
    In additional availrmem is now available and return a reasonable value
    which is reasonably analogous to the Solaris meaning.  On linux we
    return the sun of free and inactive pages since these are all easily
    reclaimable.

    All tunables are available in /proc/sys/kernel/spl/vm/* and they may
    need a little adjusting once we observe the real behavior.  Some of
    the defaults are mapped to similar linux counterparts, others are
    straight from the OpenSolaris defaults.

commit 36b313dacf2f60f526fe98b7e9d1a6bbcbb250d2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 4 15:15:41 2009 -0800

    Linux VM integration / device special files

    Support added to provide reasonable values for the global Solaris
    VM variables: minfree, desfree, lotsfree, needfree.  These values
    are set to the sum of their per-zone linux counterparts which
    should be close enough for Solaris consumers.

    When a non-GPL app links against the SPL we cannot use the udev
    interfaces, which means non of the device special files are created.
    Because of this I had added a poor mans udev which cause the SPL
    to invoke an upcall and create the basic devices when a minor
    is registered.  When a minor is unregistered we use the vnode
    interface to unlink the special file.

commit 31a033ecd49c2f691d6a377db2882ed941f47481
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Feb 2 15:12:30 2009 -0800

    2.6.27+ portability changes

    - Added SPL_AC_3ARGS_ON_EACH_CPU configure check to determine
      if the older 4 argument version of on_each_cpu() should be
      used or the new 3 argument version.  The retry argument was
      dropped in the new API which was never used anyway.
    - Updated work queue compatibility wrappers.  The old way this
      worked was to pass a data point when initialized the workqueue.
      The new API assumed the work item is embedding in a structure
      and we us container_of() to find that data pointer.
    - Updated skc->skc_flags to be an unsigned long which is now
      type checked in the bit operations.  This silences the warnings.
    - Updated autogen products and splat tests accordingly

commit f220894e1fc86cbfaf073dc4cca519887c41e78e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Feb 2 08:53:53 2009 -0800

    Make the number of system taskq threads based on the node of cores in the node, as is done for most linux system tasks

commit 10a4be0f0369b80c44e013513acf7ad36f64cfaa
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 30 21:24:42 2009 -0800

    Update thread tests to have max_time

commit 416bae036bd1113a6102be4589dd47cee8d2b08a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 30 21:11:42 2009 -0800

    Add new workqueue header

commit ea3e6ca9e595ebfba82b964ee2eaf1ddd7076f0f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 30 20:54:49 2009 -0800

    kmem_cache hardening and performance improvements

    - Added slab work queue task which gradually ages and free's slabs
      from the cache which have not been used recently.
    - Optimized slab packing algorithm to ensure each slab contains the
      maximum number of objects without create to large a slab.
    - Fix deadlock, we can never call kv_free() under the skc_lock.  We
      now unlink the objects and slabs from the cache itself and attach
      them to a private work list.  The contents of the list are then
      subsequently freed outside the spin lock.
    - Move magazine create/destroy operation on to local cpu.
    - Further performace optimizations by minimize the usage of the large
      per-cache skc_lock.  This includes the addition of KMC_BIT_REAPING
      bit mask which is used to prevent concurrent reaping, and to defer
      new slab creation when reaping is occuring.
    - Add KMC_BIT_DESTROYING bit mask which is set when the cache is being
      destroyed, this is used to catch any task accessing the cache while
      it is being destroyed.
    - Add comments to all the functions and additional comments to try
      and make everything as clear as possible.
    - Major cleanup and additions to the SPLAT kmem tests to more
      rigerously stress the cache implementation and look for any problems.
      This includes correctness and performance tests.
    - Updated portable work queue interfaces

commit 34e71c9e97f4d0d2b3ede850d016a7de558b0f3c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 26 20:10:23 2009 -0800

    Remove debug check was was accidentally left in place an prevent the slab cache from working on systems with >4 cores

commit 0f233eac33e40d58386a8faa5656ee59bbfccfce
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 26 16:47:49 2009 -0800

    Pull the blkdev header in to the sunldi for some useful structure definitions and helper functions

commit 48e0606a525527bef5b50172b4967a3f6cf1aa4d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 26 09:02:04 2009 -0800

    Implement kmem cache alignment argument

commit e4f3ea278e05b5b23e857cf6cf061caddf5ce148
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 23 08:59:11 2009 -0800

    Remove stray ` from macro

commit 3f4126739dc5c2a0b10ec1f6143ec43028755aa4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 22 09:58:48 2009 -0800

    Sleep uninteruptibly, waking up early may result in a crash

commit 511176398c81136786d5f6a955dcc6509f98f573
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 22 09:41:47 2009 -0800

    Update debug.h to standardize VERIFY3_IMPL error messages in debug and non-debug mode

commit 064bbffb633dfbc85a29843b421925214742c7e4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 21 11:46:02 2009 -0800

    Prep for 0.4.1 tag

commit b6b2acc66e9621ec8c218875b2e5395d0d1841fe
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 20 13:39:35 2009 -0800

    Minor fix for compiler warning when KMEM_TRACKING is enabled

commit ae3b87f908fe67f8be739b7f7c71bb5fdd742552
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 20 12:47:53 2009 -0800

    KMEM_TRACKING turned up a missing free in list test 6, fix the leak

commit 15270e003ed666ad965ab9f73b390846823998fd
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 20 11:59:47 2009 -0800

    Ensure -NDEBUG does not get added to spl_config.h and is only set in the build options.  This allows other kernel modules to use spl_config to leverage the reset of the config checks without getting confused with the debug options

commit 5566ec0959a17776265204d24a186ffeb09cee7f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 15 10:47:24 2009 -0800

    Refresh libtool

commit 617d5a673cd16aa91fa9668b94cc385094fae852
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 15 10:44:54 2009 -0800

    Rename modules to module and update references

commit f6a19c0d37992755ed6b1b50344047537a1efe5c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 13 11:45:02 2009 -0800

    Make the splat load message caps just for consistency

commit b172b6dfdec0c14ddd5bf3b1d6a81b07c63788c5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 13 11:43:05 2009 -0800

    TASKQ_DYNAMIC not yet support, do not create the global taskq with that flag or we crash with debug enabled.  Also don't bother dumping debug when debugging is diabled, it's pointless

commit b871b8cdef68bdfa99e0fdc45734af810b75e998
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 13 09:30:59 2009 -0800

    Rework ddi_strtox calls to a native implementation which actuall supports the EINVAL, ERANGE error handling, plus add a regression suite to ensure I got it atleast mostly right

commit 1e4ed6c9907570d5844186b3f559665bef8ff041
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 16:04:44 2009 -0800

    Add missing stub headers

commit 121d48c97d9ad4455062bc289d78a872a7e021b7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 15:30:53 2009 -0800

    Add basic ksid_lookupdomain and ksiddomain_rele support, just allocations

commit f590d7d37469a45f3da17bd30c3c0b0396004ac1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 14:30:30 2009 -0800

    Make sure we export ddi_quiesce_not_needed

commit 0e4141494611ec11b08c411e25d1fd878691de56
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 14:04:13 2009 -0800

    Add two new stub headers

commit 97735c39e37f1b644ba09755173dd2b3de95ab47
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 13:59:39 2009 -0800

    Add VOP_SEEK

commit d83ba26e1819ca3c0fcfc8e108db86f4c78a5d54
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 10:49:47 2009 -0800

    Add missing policy includes, add missing sun ddi bits

commit 70997fb4b1d6e7601209f1dfc3ec27d0dd379be6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 10:06:18 2009 -0800

    Add share.h stub

commit 71c8ab9c685f85f75d451cc98e18bc83565addd3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 10:05:03 2009 -0800

    Drat fix missing ;

commit 23f5c4c2814caabd446a16d1d18df2f156465e72
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 10:03:37 2009 -0800

    Add missing callback_context_t and fid_t types

commit 703e7a3cf413265bda05349aa95919e3d42582ae
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 9 09:47:27 2009 -0800

    Add stubs for three more includes

commit 434d1d0f8f099747b275de1668f7522491e248f5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 7 13:48:36 2009 -0800

    Add active test for splat list tests

commit d702c04ff190b17d0f3f1dbee23e769398b82c39
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 7 12:54:03 2009 -0800

    Add 5 splat tests for list handling

commit 4c18c39ecb2b1876ca067969f245bffdff6da56b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 6 09:47:00 2009 -0800

    Add include/sys/compress.h header

commit 160c63ab763f620592fbdc8271a3f7b66e080b74
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 6 09:23:13 2009 -0800

    Add P2BOUNDARY macro

commit 7adbea4141d9ac2df0a1fc622747090d6ea91c32
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 5 16:14:38 2009 -0800

    Pull in some default page typedefs

commit 0f372044172b3793a32f88741baaea146614023d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 5 16:09:21 2009 -0800

    Add DTRACE_PROBE(a)

commit b53c565e6513547b6d4da9cee47b5a82d6422d47
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 5 15:37:07 2009 -0800

    Stub u8_textprep.h for inclusion purposes

commit e9cb2b4f6458220c8b2ff1317caa022ac2ead3d4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 5 15:08:03 2009 -0800

    Add system taskq support

commit 8a2b328b18f52ff411ba6b223a3b11461c841135
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 5 11:32:08 2009 -0800

    Remove u8_textprep, we will not be implementing this nightmare yet

commit f3fc90c249268f888a105cbcaab05821f875bb4a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 16:48:15 2008 -0800

    Include the header

commit 925ca8cc011007ef56e497607a466c0696595775
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 16:27:36 2008 -0800

    Add sys/thread.h

commit bb9cfc6cc3918a2458a92d38e926fd5b04efa817
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 15:59:36 2008 -0800

    Define needfree

commit 2b88beb74f0654a229d13b191bde441c4a3f4a5a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 15:40:20 2008 -0800

    Add timer.h header

commit bbdec3be06d38b2cf4fd83043b9424e0a240976a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 15:38:15 2008 -0800

    Add u8 stub

commit de79fdd3a83acb63c2aedddb4b67f0c9379dd608
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 13:32:07 2008 -0800

    Move sunddi include

commit 9d457afd1b39e6bb5eccf0de80d82ef08b7c190b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 13:30:04 2008 -0800

    Add sunddi to uio

commit dc0f920710ecaa023df893216987c318c2e2b721
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 13:25:52 2008 -0800

    Minor updates

commit 926e2b6058867123809979c2e6bf5dbcc13fa4a2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 13:18:39 2008 -0800

    Pull in lock types

commit c1d42c2f1db1b9c7e89bfbfd79a52ca9de78a404
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 13:05:50 2008 -0800

    Add header

commit f5b92a66adc809499972a4012a9cccdd2a2fd6ef
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 23 13:03:09 2008 -0800

    Add a few more missing header which the upstream stock kernel context expects

commit 2ee63a549ae18875ded60ec2f0fc7315e076c326
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 5 16:23:57 2008 -0800

    Add struct ddi_strtox functions

commit 857c63f413b16f723ebd408b3b753d1a45bff924
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 5 16:20:09 2008 -0800

    Refresh

commit 72e7de60262b8a1925e0a384a76cc1d745ea310e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 13:26:05 2008 -0800

    Prefix META_ALIAS with SPL_

commit abc3ca149d719cca5c807f38030d01f61e97d87d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 13:09:37 2008 -0800

    Prefix all META_* #defines with SPL to prevent colisions which include our spl_config.h.  Dependent packages may do this to leverage the autoconf check we have already run aganst the kernel.

commit 895ff83c08b99755d1817b71489f486212b6ad14
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 09:57:29 2008 -0800

    Rebase on Git from SVN as of version 0.4.0.

commit 7860010a723224a36a904005205a59bbb9efab4a
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Nov 26 17:44:40 2008 +0000

    Tag spl-0.3.5

    git-svn-id: https://outreach.scidac.gov/svn/spl/tags/spl-0.3.5@184 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 02a794ae3ffa15c8cfd7e95b5365651e2306127e
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Nov 26 17:43:44 2008 +0000

    Add libtool script

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@183 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 7212e2cd2710338f326f0347d987f761bade4d58
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Nov 26 17:07:59 2008 +0000

    Add missing autogen products

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@182 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit dd529a30accac95bf738e369d72c825fcb25686e
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Nov 26 17:01:45 2008 +0000

    Include META file support.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@181 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit bf9f3bac95bfccbc765f09f5b372197184cce8d7
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Nov 24 23:49:18 2008 +0000

    * : Add autogen.sh products.

    * configure.ac : Use AC_CONFIG_AUX_DIR to put autoconf products
    in ./auotconf.

    * autogen.sh : Use --copy to avoid symlinks, remove error
    redirection, run aclocal before libtoolize.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@180 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 6a1c3d418a94bd98ef47e6bedb15c85a31398d6f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Nov 13 21:43:30 2008 +0000

    * include/sys/sunddi.h, modules/spl/spl-module.c : Removed default
    udev support from sunddi implementation because it uses GPL-only
    symbols.  This support is optionally available for SPL consumers
    if they define HAVE_GPL_ONLY_SYMBOLS and license their module as
    GPL using the MODULE_LICENSE("GPL") macro.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@179 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 5457aee1a3912396a8b63d4491724a51187c598c
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Nov 6 00:51:31 2008 +0000

    Prep for spl-0.3.4 tag.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@177 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 83e5edb47db1eafdb320790e4937e7aa3005a296
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Nov 5 22:06:56 2008 +0000

    Remove 3 instances of unused variables.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@176 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 7ea1cbf5b2b5489ce1a5f408d3e101e0e7447205
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Nov 5 21:43:37 2008 +0000

    Add proper error handling for the case where a thread can not be
    created.  Instead of asserting we simply abort the test, wait for
    any tasks we created to finish, and return -ESRCH back to the user
    space component.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@175 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 36833ea4e40833811269d86112043cf1db933009
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Nov 5 21:27:31 2008 +0000

    Slightly increase SPLAT_NAME_SIZE to ensure string is always
    NULL terminated.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@174 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit ac569b72a10d5676a5a572a8aa44bfab9b29cbac
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Nov 4 23:38:29 2008 +0000

    Fix a small corner case in the test infrastructure where
    we might end up with a non-NULL terminated buffer if the
    test name or desc is too long.  Only copy N-1 bytes.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@173 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 12018327f5a42304971b816d64756a47cb1bed9f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Nov 4 23:30:15 2008 +0000

    3 minor fixups where sprintf() was used instead of snprintf() with
    a known max length.  Additionally the function return value is cast
    to void to make it explicit that the value is not needed.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@172 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 0498e6c5853a37b2d41e043fd566a752281f2185
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Nov 4 23:18:31 2008 +0000

    Removed useless check

    Fix forward NULL in splat kmem_cache test ctors/dtors

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@171 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 3bc9d50eaa95af0c5de6e5408bf91b0001b56280
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Nov 4 22:51:31 2008 +0000

    Add missing error handling to this case where a memory allocation fails.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@170 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 8e80a04c043244eb2fdf0541b5ed86bd53d71736
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Nov 4 22:42:58 2008 +0000

    Simple ignore the return type which was never used here and cast it to void.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@169 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 55c59e6153509887463d258c41c87c100f7f851f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Nov 4 22:39:29 2008 +0000

    Add proper error handling to one of the atomic test cases in the event
    that a kernel thread cannot be properly spawned.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@168 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit b02e9b2415d1888222927ace7416821873d4b0cf
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Nov 4 22:24:55 2008 +0000

    Add missing initializer which is needed in an unlikely error case.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@167 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit b07335c1a77c6eb2b208a604ea97d3a438c69ec1
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Nov 4 00:00:16 2008 +0000

    Ensure GPL-only symbols are re-exported as GPL-only

    Remove GPL-only symbol from __gethrtime()

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@166 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit c8e60837b78501851b19e1d02ed78e165c7c4103
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Nov 3 22:02:15 2008 +0000

    * spl-09-fix-kmem-track-oops.patch
    This fixes an oops when unloading the modules, in the case where memory
    tracking was enabled and there were memory leaks. The comment in the
    code explains what was the problem.

    * spl-10-fix-assert-verify-ndebug.patch
    This fixes ASSERT*() and VERIFY*() macros in non-debug builds. VERIFY*()
    macros are supposed to check the condition and panic even in production
    builds, and ASSERT*() macros don't need to evaluate the arguments.
    Also some 32-bit fixes.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@165 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit c22e7a427bfbea456e783c918fad817f3c4f34ce
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Nov 3 21:51:33 2008 +0000

    Under Solaris KM_SLEEP ensures success (or at least you hang forever).
    That said when working with a finite resource like memory failure really
    is always a possibility.  It would be far better longer term if the ZFS
    code could be weened off this assumption and properly handle the cases
    where an allocation fails.  Still I've applied the patch to spl-0.3.4
    since this layer is supposed to emulate Solaris as closely as possible.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@164 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit a0f6da3d9590ece3c7a056f235aab28880dbd67c
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Nov 3 21:06:04 2008 +0000

    Add a SPL_AC_TYPE_ATOMIC64_T test to configure for systems which do
    already supprt atomic64_t types.

    * spl-07-kmem-cleanup.patch
    This moves all the debugging code from sys/kmem.h to spl-kmem.c, because
    the huge macros were hard to debug and were bloating functions that
    allocated memory. I also fixed some other minor problems, including
    32-bit fixes and a reported memory leak which was just due to using the
    wrong free function.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@163 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 550f1705259c9b97ad158354a921003bbbfe819f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Nov 3 20:34:17 2008 +0000

    Apply two nice improvements caught by Ricardo,

    spl-05-div64.patch
    This is a much less intrusive fix for undefined 64-bit division symbols
    when compiling the DMU in 32-bit kernels.

    * spl-06-atomic64.patch
    This is a workaround for 32-bit kernels that don't have atomic64_t.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@162 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 749045bbfa3302f8917ef681373775245b241698
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Nov 3 20:21:08 2008 +0000

    Apply a nice fix caught by Ricardo,

    * spl-04-fix-taskq-spinlock-lockup.patch
    Fixes a deadlock in the BIO completion handler, due to the taskq code
    prematurely re-enabling interrupts when another spinlock had disabled
    them in the IDE IRQ handler.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@161 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit f6c81c5ea7ba171bdb9e6d3a29c9e2a7fa6896ad
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Nov 3 20:07:20 2008 +0000

    Reviewed and applied spl-01-rm-gpl-symbol-set_cpus_allowed.patch
    from Ricardo which removes a dependency on the GPL-only symbol
    set_cpus_allowed().  Using this symbol is simpler but in the name
    of portability we are adopting a spinlock based solution here
    to remove this dependency.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@160 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit d50bd9e22179ec4c687bcb0d296a90c8039eeaae
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Nov 3 19:53:23 2008 +0000

    Reviewed and applied spl-00-rm-gpl-symbol-notifier_chain.patch
    from Ricardo which removes a dependency on the GPL-only symbol
    needed for a panic time notifier.  This funcationality was never
    used and this improves our portability.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@159 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit e73187714d0a6b726d059e3aef426bc7a8efeea4
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Aug 12 05:18:41 2008 +0000

    Minor tweak to handle systems with restrictive udev rules
    or older systems which are not using udev at all.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@158 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 25557fd8842deca017f8da05da22e1352389f736
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Aug 11 23:47:44 2008 +0000

    Sigh more compat fixes, this is almost right for 2.6.9 - 2.6.26 kernels.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@157 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit b61a6e8bdc5ca52a09ff02a6ce2e92742725f8cc
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Aug 11 22:42:04 2008 +0000

    Pull in initial 32-bit support patches.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@156 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 3d061e9d1092364be132fc3f6c478add94b4e482
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Aug 11 22:13:47 2008 +0000

    Commit bulk of remaining 2.6.9 and 2.6.26 compat changes.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@155 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 322640b7b5a5336e4681d77778736339164a4501
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Aug 11 19:10:14 2008 +0000

    Include linux/uaccess.h compat changes.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@154 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 86de8532a9106c28167eac07f1fd32758e5555dd
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Aug 11 17:56:40 2008 +0000

    More 2.6.26 compat changes

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@153 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 6a6cafbe8dd1e33530e726ee7d1c3acc340c6c15
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Aug 11 17:20:11 2008 +0000

    Pull in timespec, list, and type compat changes to support
    building against a wider range of kernels.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@152 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 86149aa255dcfb145bb4f2ad66b80dce4d620f34
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Aug 11 16:11:37 2008 +0000

    Resolve incomplete type when building against 2.6.26

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@151 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 46c685d0c47df8c6271c8914a03d256a5b1f7bd3
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sun Aug 10 03:50:36 2008 +0000

    Add class / device portability code.  Two autoconf tests
    were added to cover the 3 possible APIs from 2.6.9 to
    2.6.26.  We attempt to use the newest interfaces and if
    not available fallback to the oldest.  This a rework of
    some changes proposed by Ricardo for RHEL4.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@150 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 877a32e91eb69b15744aa85ad22db385bd522b60
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Aug 6 04:52:39 2008 +0000

    Pull in fls64 compat changes from spl-00-rhel4-compat.patch,
    to allow greater compatibility with kernels pre 2.6.16.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@149 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 7afde631f6483cc5e2da95a84a98085e7453cf52
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Aug 5 04:16:09 2008 +0000

    Start bringing in Ricardo's spl-00-rhel4-compat.patch, a few chunks
    at a time as I audit it.  This chunk finishes moving the SPL entirely
    off the linux slab on to the SPL implementation.  It differs slightly
    from the proposed version in that the spl continues to export to
    all the Solaris types and functions.  These do conflict with the
    Linux slab so a module usings these interfaces must not include the
    SPL slab if they also intend to use the linux slab.  Or they must
    explcitly #undef the macros which remap the functioin to their
    spl_* equivilants.

    A nice side of effect of dropping the entire linux slab is we
    don't need to autoconf checks anymore.  They kept messing with
    the slab API endlessly!

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@148 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 73035a29eb2cea265de650e26be3cc5a0e3efcb0
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Aug 4 23:59:08 2008 +0000

    Apply Ricardo's spl-02-condvar-poison.patch
    Fix too early memory poisoning on condvars.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@147 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 5587df4d8ea903cd0a6b0e61e6b1abf969e10681
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Jul 9 19:11:29 2008 +0000

    Trivial commit to remove whitespace

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@146 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 97f274d46d8eb330f806cd445cfd186446aeb1de
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Jul 7 22:15:04 2008 +0000

    Fix race in kmem_locking test
    Reduce max memory usage for kmem_locking tests (for low memory machines)

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@145 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit f78a933f8ad5fa39c8af08d4ff792a387b906baf
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Jul 1 04:06:09 2008 +0000

    Two easy fixes I caught with debug enabled

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@143 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 3ba97a6743ee69ada9032cc4b111bca25989638a
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Jul 1 03:42:24 2008 +0000

    Update info to prep for a tag.  If all goes well I'll have
    something I'm not too embarased to distrubute tommorow.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@142 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit a1502d76aef90d32ac779c1ae3cf89a80d9d591d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Jul 1 03:28:54 2008 +0000

    - Remove hash functionality from slab in favor of direct lookups
      based of the spl_kmem_obj_t tacked on the end of each object.
      This actually isn't so back because we are now allocing large
      chunks for the slab and partitioning it ourselves.  So there's
      not a ton of wasted space.  We may suffer a performance hit
      however due to alignment issues.

    - Remove remaining depenancies on the linux slab implementation.
      We're standing on our own now for better or worse.

    - Rework slabs to be either kmem or vmem based.  If neither
      KMC_VMEM of KMC_KMEM are specified we make a decent guess
      about what will work best for their based on the object
      size.  Additionally we provide a kmem_virt() function caller
      can use to see if they have a virtual or physical address.

    - Minor fixups in the test suite.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@141 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 1c3832576db0f692ec066b4059feb4a9a695a575
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Jun 28 20:03:11 2008 +0000

    Remove stray call to spl_cache_free() and remove all the
    cycle count which was costing me overhead.  It was hurting
    performance pretty badly for heavily used caches.  I'm also
    thinking the hash may be hurting me as well and it might
    be worth sticking a pointer in to a little space after the
    alloced object.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@140 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit fece7c99bf18c04993b679c6fca0dd4669361716
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Jun 28 05:04:46 2008 +0000

    Victory!  I've reworked caches with large objects which are
    based by vmalloc()'ed memory.  I now alloc a slab which is
    roughly 32*spl_obj_size and in this block of memory I place
    the slab descriptor, slab object descriptors, and objects
    themselves.  This greatly reduces vmalloc lock contention.

    Still some minor cleanup remains and fine tuning but
    it's working pretty well.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@139 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit ff449ac40691903c7f49cb89b1a02696b6c37aa7
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Jun 27 21:40:11 2008 +0000

    Further slab improvements, I'm getting close to something which works
    well for the expected workloads.  Improvement in this commit include:

    - Added DEBUG_KMEM_TRACKING #define which can optionally be set
      when DEBUG_KMEM is defined to do per allocation tracking.  This
      allows us to get all the lightweight kmem debugging enabled by
      default which is pretty light weight, and only when looking
      for a memory leak we can briefly enable the per alloc tracking.

    - Added set_normalized_timespec() in to SPL to simply using
      the timespec() primatives from within a module.

    - Added per-spinlock cycle counters to the slab in an attempt
      to run down a lock contention issue.  The contended lock
      was in vmalloc() but I'm going to leave the cycle counters
      in place for a little while until I'm convinced there arn't
      other locking improvement possible in the slab.

    - Added a proc interface to the slab to export per slab
      cache statistics to /proc/spl/kmem/slab for analysis.

    - Reworked spl_slab_alloc() function to allocate from kmem for
      small allocation and vmem for large allocations.  This improved
      things considerably but futher work is needed.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@138 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit e9d7a2bef56cf159d0f876efc38209a496dd0b66
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Jun 26 19:49:42 2008 +0000

    Fix for memory corruption caused by overruning the magazine
    when repopulating it.  Plus I fixed a few more suble races in
    that part of the code which were catching me.  Finally I fixed
    a small race in kmem_test8.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@137 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 4afaaefa050f02b6b993468aafdfc457dd508b2a
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Jun 25 20:57:45 2008 +0000

    Implement per-cpu local caches.  This seems to have bough me another
    factor of 10x improvement on SMP system due to reduced lock contention.
    This may put me in the ballpark of what is needed.  We can still further
    improve things on NUMA systems by creating an additional L3 cache per
    memory node instead of the current global pool.  With luck this won't
    be needed.  I should also take another look at the locking now that
    everything is working.  There's a good chance I can tighten it up a
    little bit and improve things a little more.

       kmem_lock: time (sec)        slabs           objs            hash
       kmem_lock:                   tot/max/calc    tot/max/calc    size/depth
       kmem_lock:  0.000999926      6/6/1           192/192/32      32768/0
       kmem_lock:  0.000999926      4/4/2           128/128/64      32768/0
       kmem_lock:  0.000999926      4/4/4           128/128/128     32768/0
       kmem_lock:  0.000999926      4/4/8           128/128/256     32768/0
       kmem_lock:  0.000999926      4/4/16          128/128/512     32768/0
       kmem_lock:  0.000999926      4/4/32          128/128/1024    32768/0
       kmem_lock:  0.000999926      4/4/64          128/128/2048    32768/0
       kmem_lock:  0.000999926      8/8/128         256/256/4096    32768/0
       kmem_lock:  0.003999704      24/23/256       768/736/8192    32768/1
       kmem_lock:  0.012999038      44/41/512       1408/1312/16384 32768/1
       kmem_lock:  0.051996153      96/93/1024      3072/2976/32768 32768/2
       kmem_lock:  0.181986536      187/184/2048    5984/5888/65536 32768/3
       kmem_lock:  0.655951469      342/339/4096    10944/10848/131072 32768/4

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@136 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit d46630e0f316a39899fa8ee02365e015303f2a5d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Jun 24 17:18:15 2008 +0000

    The first locking issue was due to the semaphore I used.  I was trying
    to be overly clever and the context switch when the semaphore was busy
    was destroying performance.  Converting to a simple spin lock bough me
    a factor of 50 or so.  That said it's still not good enough.  Tests
    show bad performance and we are still CPU bound.  The logical fix is
    I need to implement per-cpu hot caches to minimize the SMP contention.
    Linux and Solaris both have this, I was hoping to do without but it
    looks like that's not to be.

       kmem_lock: time (sec)        slabs           objs            hash
       kmem_lock:                   tot/max/calc    tot/max/calc    size/depth
       kmem_lock:  0.022000000      7/6/64  224/177/2048    32768/1
       kmem_lock:  0.039000000      13/13/128       416/404/4096    32768/1
       kmem_lock:  0.079000000      23/21/256       736/672/8192    32768/1
       kmem_lock:  0.158000000      48/47/512       1536/1504/16384 32768/1
       kmem_lock:  0.345000000      105/105/1024    3360/3358/32768 32768/2
       kmem_lock:  0.760000000      202/200/2048    6464/6400/65536 32768/3

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@135 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 44b8f1769f532ecc9e469511a469f58f0c065877
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Jun 23 23:54:52 2008 +0000

    Add another kmem test to check for lock contention in the slab
    allocator.  I have serious contention issues here and I needed
    a way to easily measure how much the following batch of changes
    will improve things.  Currently things are quite bad when the
    allocator is highly contended, and interestingly it seems to
    get worse in a non-linear fashion... I'm not sure why yet.
    I'll figure it out tomorrow.

            kmem:kmem_lock    Pass

       kmem_lock: time (sec)        slabs           objs
       kmem_lock:                   tot/max/calc    tot/max/calc
       kmem_lock:  0.061000000      75/60/64        2400/1894/2048
       kmem_lock:  0.157000000      134/125/128     4288/3974/4096
       kmem_lock:  0.471000000      263/249/256     8416/7962/8192
       kmem_lock:  2.526000000      518/499/512     16576/15957/16384
       kmem_lock: 14.393000000      990/978/1024    31680/31270/32768

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@134 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 5cbd57fa91076a8001dff0fb6e864147d3a7c286
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Jun 13 23:56:26 2008 +0000

    Fix minor chaos/fc9 kernel discrepencies in build

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@133 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 2fb9b26a85ce63dab740821382f1208c8fed6262
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Jun 13 23:41:06 2008 +0000

    * : modules/sys/kmem-slab.c : Re-implemented the slab to no
    longer be based on the linux slab but to be its own complete
    implementation.  The new slab behaves much more like the
    Solaris slab than the Linux slab.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@132 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit cfe5749941bafbc0bfc069aff00fa0b930d741fa
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Jun 6 23:11:34 2008 +0000

    Minor tweak to ensure kstat values are printed correctly on x86_64 at least
    Additionally fix a minor typo in the .ul ULONG case.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@131 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit c58f753ddb2e8079a349d50682a73513f433315d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Jun 4 23:28:29 2008 +0000

    Prep for 0.3.2 tag

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@129 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 41cf38df92127eba2b0f51812bcd16279daa42bf
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Jun 4 22:52:13 2008 +0000

    Add missing () to quiet warnings in NDEBUG case

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@128 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 3ce1bc96f9c21b8ee22562fc175d8fb59e86a51d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Jun 4 21:25:57 2008 +0000

    Fix some bad grammer

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@127 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 475cdc788e2ab926b4604724f3c7b4c65d5c1345
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Jun 4 21:09:25 2008 +0000

    Just use CONFIG_SLUB to detect SLUB use
    Add ASSERTF to the NDEBUG build
    Fix minor issue with various debug build flags

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@126 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit a02118a89d5121b7c81827d4fdba770136896b35
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Jun 4 06:09:16 2008 +0000

    Whoops, fix a minor proc issue which slipped through with
    the recent changes.  Ensure the top level spl is removed.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@125 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit c30df9c8630b3b05cfbbf5c1700030f47e5b77c7
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Jun 4 06:00:46 2008 +0000

    Fixes:

    1) Ensure mutex_init() never fails in the case of ENOMEM by retrying
       forever.  I don't think I've ever seen this happen but it was clear
       after code inspection that if it did we would immediately crash.

    2) Enable full debugging in check.sh for sanity tests.  Might as well
       get as much debug as we can in the case of a failure.

    3) Reworked list of kmem caches tracked by SPL in to a hash with the
       key based on the address of the kmem_cache_t.  This should speed
       up the constructor/destructor/shrinker lookup needed now for newer
       kernel which removed the destructor support.

    4) Updated kmem_cache_create to handle the case where CONFIG_SLUB
       is defined.  The slub would occasionally merge slab caches which
       resulted in non-unique keys for our hash lookup in 3).  To fix this
       we detect if the slub is enabled and then set the needed flag
       to prevent this merging from ever occuring.

    5) New kernels removed the proc_dir_entry pointer from items
       registered by sysctl.  This means we can no long be sneaky and
       manually insert things in to the sysctl tree simply by walking
       the proc tree.  So I'm forced to create a seperate tree for
       all the things I can't easily support via sysctl interface.
       I don't like it but it will do for now.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@124 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 691d2bd73332fcff869860b3e6a2e37a04f737f2
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Jun 3 21:20:18 2008 +0000

    Update utsname to use proper compatible interface to avoid API issues.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@123 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 684f787474561bb28e1217c5ae2d897aa80e1d87
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Jun 3 20:58:55 2008 +0000

    Fix missing return resulting in a double unlock of &files->file_lock
    and a hang on subsequent sys_close.  I'm not quite sure why the Fedora
    kernel caught this bug the Chaos kernel did not, but I'm glad!

    Convert remaining BUG_ON's to ASSERTs

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@122 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit fe81cb1c435e59c2f2a1d0ea210b24230cc8f22b
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Jun 2 19:45:04 2008 +0000

    Add the minimal set of kernel patches need to for the SPL.  Hopefully
    even these will not be needed over the next few weeks.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@121 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit f93f7c8dbe6b7bfd778f96f73f4f6e5c5e107254
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Jun 2 18:41:30 2008 +0000

    This should have been part of the previous autoconf commit.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@120 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 57d862349b074974825e1228b7b51ac72e4ba2b3
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Jun 2 17:28:49 2008 +0000

    Breaking the world for a little bit.  If anyone is going to continue
    working on this branch for the next few days I suggested you work
    off of the 0.3.1 tag.  The following changes are fairly extensive
    and are designed to make the SPL compatible with all kernels in
    the range of 2.6.18-2.6.25.  There were 13 relevant API changes
    between these releases and I have added the needed autoconf tests
    to check for them.  However, this has not all been tested extensively.
    I'll sort of the breakage on Fedora Core 9 and RHEL5 this week.

    SPL_AC_TYPE_UINTPTR_T
    SPL_AC_TYPE_KMEM_CACHE_T
    SPL_AC_KMEM_CACHE_DESTROY_INT
    SPL_AC_ATOMIC_PANIC_NOTIFIER
    SPL_AC_3ARGS_INIT_WORK
    SPL_AC_2ARGS_REGISTER_SYSCTL
    SPL_AC_KMEM_CACHE_T
    SPL_AC_KMEM_CACHE_CREATE_DTOR
    SPL_AC_3ARG_KMEM_CACHE_CREATE_CTOR
    SPL_AC_SET_SHRINKER
    SPL_AC_PATH_IN_NAMEIDATA
    SPL_AC_TASK_CURR
    SPL_AC_CTL_UNNUMBERED

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@119 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 65a045dace36f9083b728aef731a56b789287a2a
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon May 26 05:01:15 2008 +0000

    Make a tag just for release to CEA, this has the URCL

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@115 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 715f6251462d89be6473a37d0829f31cbb7b63a8
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon May 26 04:38:26 2008 +0000

    Go through and add a header with the proper UCRL number.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@114 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit b2585b36d353dd537dcbe08992c2384214d6f103
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed May 21 21:11:47 2008 +0000

    Prep for for 0.3.0 tag, this is the tag which was used for all
    the performance results to date.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@112 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit cc7449ccd612ed8567e7a8a8574ea6df1d5faa7d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon May 19 02:49:12 2008 +0000

    - Properly fix the debug support for all the ASSERT's, VERIFIES, etc can be
      compiled out when doing performance runs.
    - Bite the bullet and fully autoconfize the debug options in the configure
      time parameters.  By default all the debug support is disable in the core
      SPL build, but available to modules which enable it when building against
      the SPL.  To enable particular SPL debug support use the follow configure
      options:

      --enable-debug		Internal ASSERTs
      --enable-debug-kmem		Detailed memory accounting
      --enable-debug-mutex		Detailed mutex tracking
      --enable-debug_kstat          Kstat info exported to /proc
      --enable-debug-callb		Additional callb debug

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@111 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 6ab69573ffc79db6fcd0539218e96ded41fcafc1
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu May 15 23:39:19 2008 +0000

    SPL additions to increase support for updated ZFS build

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@110 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 56f924533023e39edfda09cf1a9c47b4abfe57c7
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu May 15 17:32:41 2008 +0000

    Disable adaptive mutexs by default (always sleep), and while
    I'm at it add a module option for easy tuning.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@109 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 4efd41189af62958f2aa5cf48941dd718d563d11
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu May 15 17:10:30 2008 +0000

    Rework condition variable implementation to be consistent with
    other primitive implementations.  Additionally ensure that GFP_ATOMIC
    is use for allocations when in interrupt context.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@108 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit a97df54e839fa7f823fdca2a814427c9e4db204f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon May 12 18:54:08 2008 +0000

    Enhanse the thread interface to do something quasi inteligent
    with the function name passed to be used as a thread name.  Leaving
    the trailing _thread is just redundant so just strip it this
    make the thread names far more readable.

    Use a strncpy in spl-mutex  just to be safe.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@107 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 8464443f8d57a56da6cf4aac727374b8fbd9cd1a
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon May 12 16:53:41 2008 +0000

    Add a comment so I remember to fix this.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@106 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit c6dc93d6a8814198165e28364c2941cd55a071a6
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri May 9 22:53:20 2008 +0000

    By default disable extra KMEM and MUTEX debugging to aid performance.
    They can easily be re-enabled when new stability issues are uncovered.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@105 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 5c2bb9b2c314bcac7579b13a99127eb7050a7b90
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri May 9 21:21:33 2008 +0000

    Stability hack.  Under Solaris when KM_SLEEP is set kmem_cache_alloc()
    may not fail.  To get this behavior I'd added a retry to the shim layer
    even though it is abusive to the VM, at least it should prevent the crash.
    Additionally I added a proc counter so I can easily check how often this
    is happening.  It should be fairly rare, but likely will get worse and
    worse the longer the machine has been up.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@104 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 04a479f7066ccdaa23a6546955303b172f4a6909
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu May 8 23:21:47 2008 +0000

    Add an almost feature complete implemenation of kstat.  I chose
    not to support a few flags (we assert if they are used), and I
    did not add the libkstat interface and instead exported everything
    to proc for easy access.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@103 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit d4c540de38a669851ccfde7a2d094621757c5995
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed May 7 20:12:44 2008 +0000

    Same deal as ZFS, we're quite stable now so tag it.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@101 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 427a782d7dde286857044515efa99d465ccf2516
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed May 7 19:33:01 2008 +0000

    Decrease of kmem warnign threshold back to 2 pages, no worse than a stack.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@100 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 13cdca65ec6882df57ec06f8f9be14b2b3668a5d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed May 7 18:54:32 2008 +0000

    Add vmem memory accounting

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@99 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 404992e31ab16e5d128f73c6d716952a4eda463f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed May 7 17:58:22 2008 +0000

    - Relocate 'stats_per' in to proper /proc/sys/spl/mutex/ directory
    - Shift to spinlock for mutex list addition and removal

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@98 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 4f86a887d88ef2d28fb14a020f91e0cd8757ed21
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue May 6 23:19:27 2008 +0000

    Remaining issues fixed after reenabled mutex debugging.

    - Ensure the mutex_stats_sem and mutex_stats_list are initialized
    - Only spin if you have to in mutex_init

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@97 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit e8b31e84825d14d98930f165707687fad961b88a
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue May 6 23:00:49 2008 +0000

    - Updated rwlock's to reside in a .c file instead of a static inline
    - Updated rwlock's so they can be safely initialized in ctors.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@96 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit d6a26c6a328f811deee16a567b176cd5bcb882e4
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue May 6 20:38:28 2008 +0000

    Lots of fixes here:

    - Detailed kmem memory allocation tracking.  We can now get on
      spl module unload a list of all memory allocations which were
      not free'd and where the original alloc was.  E.g.

    SPL: 15554:632:(spl-kmem.c:442:kmem_fini()) kmem leaked 90/319332 bytes
    SPL: 15554:648:(spl-kmem.c:451:kmem_fini()) address          size  data             func:line
    SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff8100734b68b8 32    0100000001005a5a __spl_mutex_init:70
    SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff8100734b6148 13    &tl->tl_lock     __spl_mutex_init:74
    SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff81007ac43730 32    0100000001005a5a __spl_mutex_init:70
    SPL: 15554:648:(spl-kmem.c:457:kmem_fini()) ffff81007ac437d8 13    &tl->tl_lock     __spl_mutex_init:74

    - Shift to using rwsems in kmem implmentation, to simply locking and
      improve concurency.

    - Shift to using rwsems in mutex implementation, additionally ensure we
      never sleep in the init function if non-zero preempt_count or
      interrupts are disabled as can happen in a slab cache ctor/dtor.

    - Other minor formating fixes and such.

    TODO:

    - Finish the vmem memory allocation tracking

    - Vet all other SPL primatives for potential sleeping during *_init.  I
    suspect the rwlock implemenation does this and should be fixes just
    like the mutex implemenation.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@95 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 9ab1ac14ad955800ca070abc11dd031244efb65f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon May 5 20:18:49 2008 +0000

    Commit adaptive mutexes.  This seems to have introduced some new
    crashes but it's not clear to me yet if these are a problem with
    the mutex implementation or ZFSs usage of it.

    Minor taskq fixes to add new tasks to the end of the pending list.

    Minor enhansements to the debug infrastructure.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@94 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit bcd68186d8009957b751720a801e4c16bb272e83
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Apr 25 22:10:47 2008 +0000

    New an improved taskq implementation for the SPL.  It allows a
    configurable number of threads like the Solaris version and almost
    all of the options are supported.  Unfortunately, it appears to have
    made absolutely no difference to our performance numbers.  I need
    to keep looking for where we are bottle necking.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@93 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 839d8b438e1d877fb4a625eed51f556433cbd6b6
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Apr 24 20:21:07 2008 +0000

    Update kmem.h to properly use new debug subsystem.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@92 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 3561541c244da5ff6b0ded99a22bd1541bdb2a11
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Apr 24 17:41:23 2008 +0000

    Prep for 0.2.1 tag
    Minor fixes to headers to use debug macros
    Added /proc/sys/spl/version

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@90 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 1bac409fa3a7c0b4e09e43776ac063ef50efcfd6
Author: wartens2 <wartens2@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Apr 24 17:24:02 2008 +0000

    Forgot to update the ChangeLog.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@89 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 8100fe56f1d249afbb0232ac0a8ee6d598ad9e5f
Author: wartens2 <wartens2@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Apr 24 17:07:56 2008 +0000

    Make sure that when calling __vmem_alloc that we
    do not have __GFP_ZERO set.  Once the memory is allocated
    then zero out the memory if __GFP_ZERO is passed to
    __vmem_alloc.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@88 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 6e605b6e5824c300b9e1953fe4ac9c8fc15d695f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Apr 23 21:19:47 2008 +0000

    Minor improvement to taskq handling.  This is a small step towards
    dynamic taskqs which still need to be fully implemented.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@87 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 18c9eadf976dda5c4b36f86290e674ec3e85f7dc
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Apr 22 22:22:02 2008 +0000

    Be careful to never use any of the debug infrastructure either
    before the debug subsystem is fully set up, or after the debug
    subsystem has been torn down.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@86 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 7e4e211333888ab99f32a75691e1f146597832ca
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Apr 22 20:10:55 2008 +0000

    Give it a real version for a tag

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@84 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit b831734a4360aa7ae34a36e55bbe6a1c9a40b01e
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Apr 22 16:55:26 2008 +0000

    Stack usage is my enemy.  Trade cpu cycles in the debug code to
    ensure I never add anything to the stack I don't absolutely need.
    All this debug code could be removed from a production build
    anyway so I'm not so worried about the performance impact.  We
    may also consider revisting the mutex and condvar implementation
    to ensure no additional stack is used there.

    Initial indications are I have reduced the worst case stack
    usage to 9080 bytes.  Still to large for the default 8k stacks
    so I have been forced to run with 16k stacks until I can
    reduce the worst offenders.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@83 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 7fea96c04f87a02efc27207629d13f9b2a14ac55
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Apr 21 22:44:11 2008 +0000

    More fixes to ensure we get good debug logs even if we're in the
    process of destroying the stacks.  Threshhold set fairly aggressively
    top 80% of stack usage.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@82 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit e5bbd245e351f3973017ce7c6006db206e4c1960
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Apr 21 18:43:02 2008 +0000

    Added 4 missing subsystem flags

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@81 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit a8ac0b89668dabce252a80e10785cac876e98a34
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Apr 21 18:16:04 2008 +0000

    Whoops, missed an instance where we could recursively stack check... bad.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@80 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 892d51061e041e48e36267d33bdb3bb575c6768e
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Apr 21 18:08:33 2008 +0000

    Handful of minor stack checking fixes

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@79 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 937879f11db15a4842306f9da4b4a3e60cf073b7
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Apr 21 17:29:47 2008 +0000

    Update SPL to use new debug infrastructure.  This means:
    - Replacing all BUG_ON()'s with proper ASSERT()'s
    - Using ENTRY,EXIT,GOTO, and RETURN macro to instument call paths

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@78 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 2fae1b3d0af1caa2aaa77552a0c96f121016381d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Apr 19 00:02:11 2008 +0000

    Frist minor batch of fixes.  Catch a dropped ;, and use SBUG instead of BUG.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@77 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit ce86265693be95e6e2213c18c0d310088c8dccbb
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Apr 18 23:42:45 2008 +0000

    Whoops need this!

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@76 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 57d1b1885897c9b079a6355a6d54d684ad003d46
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Apr 18 23:39:58 2008 +0000

    First commit of lustre style internal debug support.  These
    changes bring over everything lustre had for debugging with
    two exceptions.  I dropped by the debug daemon and upcalls
    just because it made things a little easier.  They can be
    readded easily enough if we feel they are needed.

    Everything compiles and seems to work on first inspection
    but I suspect there are a handful of issues still lingering
    which I'll be sorting out right away.  I just wanted to get
    all these changes commited and safe.  I'm getting a little
    paranoid about losing them.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@75 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 55152ebbb46fb8e382ed18e58cc570c61e224c21
Author: wartens2 <wartens2@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Apr 16 16:37:51 2008 +0000

            * modules/spl/spl-kmem.c : Make sure to disable interrupts
            when necessary to avoid deadlocks.  We were seeing the deadlock
            when calling kmem_cache_generic_constructor() and then an interrupt
            forced us to end up calling kmem_cache_generic_destructor()
            which caused our deadlock.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@74 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit d61e12af5af3ca6ba92a1b208e33c4e6cb99c9a3
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Apr 15 20:53:36 2008 +0000

    - Add some spinlocks to cover all the private data in the mutex.  I don't
    think this should fix anything but it's a good idea regardless.

    - Drop the lock before calling the construct/destructor for the slab
    otherwise we can't sleep in a constructor/destructor and for long running
    functions we may NMI.

    - Do something braindead, but safe for the console debug logs for now.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@73 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit c5fd77fcbf20f19a4690c535be494dcf474a0649
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Apr 14 18:37:20 2008 +0000

    Just cleanup up an error case to avoid overspamming the console.
    We get the stack once from the BUG() no reason to dump it twice.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@72 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit f23e92fabf091e3b86005e4dd194702aa8f7535d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Apr 12 04:27:59 2008 +0000

    Add hw_serial support based on a usermodehelper which runs
    at spl module load time can calls hostid.  The resolved hostid
    is then fed back in to a proc entry for latter use.  It's
    not a pretty thing, but it will work for now.  The hw_serial
    is required for things such as 'zpool status' to work.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@71 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 12ea923056d9d3c54e4a2d1a5095ca11784dd2a5
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Apr 11 22:49:48 2008 +0000

    Adjust the condition variables to simply sleep uninteruptibly.
    This way we don't have to contend with superious wakeups which
    it appears ZFS is not so careful to handle anyway.  So this is
    probably for the best.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@70 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 115aed0dd8eae514d0cfaa37436a66c52926e3be
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Apr 11 17:03:57 2008 +0000

    - Add more strict in_atomic() checking to the mutex entry
    function just to be extra safety and paranoid.

    - Rewrite the thread shim to take full advantage of the
    new kernel kthread API.  This greatly simplifies things.

    - Add a new regression test for thread_exit() to ensure
    it properly terminates a thread immediately without
    allowing futher execution of the thread.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@69 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 79f92663e36969c0b6b1f8520b1171285ae3e1d3
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Apr 7 23:54:34 2008 +0000

    Fix race in rwlock implementation which can occur when
    your task is rescheduled to a different cpu after you've
    taken the lock but before calling RW_LOCK_HELD is called.
    We need the spinlock to ensure there is a wmb() there.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@68 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 728b9dd80074bedef6136b6acf5cb86d707172ea
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Apr 4 17:08:12 2008 +0000

    - Fix write-only behavior in vn-open()
    - Ensure we have at least 1 write-only splat test
    - Fix return codes for vn_* Solaris does not use negative return
      codes in the kernel.  So linux errno's must be inverted.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@67 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 968eccd1d1cb7a43a7f05050d7b645da79966e6d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Apr 4 04:44:16 2008 +0000

    Update the thread shim to use the current kernel threading API.
    We need to use kthread_create() here for a few reasons.  First
    off to old kernel_thread() API functioin will be going away.
    Secondly, and more importantly if I use kthread_create() we can
    then properly implement a thread_exit() function which terminates
    the kernel thread at any point with do_exit().  This fixes our
    cleanup bug which was caused by dropping a mutex twice after
    thread_exit() didn't really exit.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@66 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 996faa68697ec79f37e44999b901f07d6c8f94a2
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Apr 3 21:48:57 2008 +0000

    Correctly implement atomic_cas_ptr() function.  Ideally all of these
    atomic operations will be rewritten anyway with the correct arch
    specific assembly.  But not today.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@65 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 0a6fd143fd6d2eaac4c364b1da88bf1ce65618d2
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Apr 3 16:33:31 2008 +0000

    - Remapped ldi_handle_t to struct block_device * which is much more useful
    - Added liunx block device headers to sunldi.h
    - Made __taskq_dispatch safe for interrupt context where it turns out we
      need to be useing it.
    - Fixed NULL const/dest bug for kmem slab caches
    - Places debug __dprintf debugging messages under a spin_lock_irqsave
      so it's safe to use then in interrupt handlers.  For debugging only!

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@64 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 0998fdd6dba7a360131c2addecc8b2d4dc9b7f4a
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Apr 1 17:00:06 2008 +0000

    Apparently it's OK for done to be NULL, which was not clear in the
    Solaris man page.  Anyway, since apparently this usage is accectable
    I've updated the function to handle it.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@63 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 6a585c61de0f3fa369ed7a011e27f94226232562
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Apr 1 16:09:18 2008 +0000

    Double large kmalloc warning size to 4 pages.  It was 2 pages, and ideally
    it should be dropped to one page but in the short term we should be able
    to easily live with 4 page allocations.

    Fix the nvlist bug, it turns out the user space side of things were
    packing the nvlists correctly as little endian, and the kernel space
    side of things due to a missing #define were unpacking them as big endian.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@62 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit e966e04fd52e0a80ec191b8f784d84b436877667
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Apr 1 03:24:17 2008 +0000

    Ensure all file ops pointer are NULL or we may end up
    calling garbage pointers on open/close etc and get
    what look like random crashes.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@61 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 4fd2f7eea565ee473ac433f28c1b309999abbd19
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Mar 31 23:04:07 2008 +0000

    Add vmem_zalloc support.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@60 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 8d0f1ee907d425e71e34e1aea9c1b5465f8cd4d1
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Mar 31 20:42:36 2008 +0000

    Add some crude debugging support.  It leaves alot to be
    desired, but it should allow more easy kernel debugging for now.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@59 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit e487ee08fb0bf55ac20f9d0779f602b5b543b3bf
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Mar 28 18:22:29 2008 +0000

    Fixed that.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@58 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 9f4c835a0efd55139f878c8ed4746cd7da815658
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Mar 28 18:21:09 2008 +0000

    Correctly functioning 64-bit atomic shim layer.  It's not
    what I would call effecient but it does have the advantage
    of being correct which is all I need right now.  I added
    a regression test as well.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@57 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 4a4295b26736a651a16a2d291868028dbd7cf91b
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Mar 27 23:40:09 2008 +0000

    Remove minor lingering CDDL tait of copied headers.  Required
    headers rewritten to include minimally what we need.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@56 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit d429b03d85eee5652a8a3a1c093489a55cf9458d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Mar 27 22:06:59 2008 +0000

    - Thinko fix to the SPL module interface
    - Enhanse the VERIFY() support to output the values which
      failed to compare as expected before crashing.  This make
      debugging much much much easier.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@55 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 8ac547ec4c968620a8a7c3f7bbe5f9163a450638
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Mar 27 17:58:10 2008 +0000

    Relocated to zfs repo

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@54 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 336bb0c0c1e0a6035c62531381001a4a8299e79d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Mar 21 19:16:25 2008 +0000

    Two fixes to the module interface.  Could be worse!

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@53 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 4e62fd4104e968a4ee224117e266720f2ec7afbb
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Mar 20 23:30:15 2008 +0000

    OK, a first reasonable attempt at a solaris module/chdev shim layer.
    This should handle the absolute minimum I need for ZFS.  It will
    register the chdev with the right callbacks.  Then the generic
    registered linux callback will find the right registered solaris
    callback for the function and munge the args just right before
    passing it on.  Should work, but untested (just compiled), so I
    expect bugs.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@52 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit e4f1d29f89b70a06197f86640c9544ffff07920b
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Mar 18 23:20:30 2008 +0000

    OK, some pretty substantial rework here.  I've merged the spl-file
    stuff which only inclused the getf()/releasef() in to the vnode area
    where it will only really be used.  These calls allow a user to
    grab an open file struct given only the known open fd for a particular
    user context.  ZFS makes use of these, but they're a bit tricky to
    test from within the kernel since you already need the file open
    and know the fd.  So we basically spook the system calls to setup
    the environment we need for the splat test case and verify given
    just the know fd we can get the file, create the needed vnode, and
    then use the vnode interface as usual to read and write from it.

    While I was hacking away I also noticed a NULL termination issue
    in the second kobj test case so I fixed that too.  In fact, I fixed
    a few other things as well but all for the best!

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@51 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 5d86345d3753fd6d873ba40480e1121eb7c28e21
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Mar 18 04:56:43 2008 +0000

    Initial pass at a file API getf/releasef hooks

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@50 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 1ec74a114cc4ec5055e7bc45cffda483505d8aba
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Mar 17 18:29:57 2008 +0000

    Minimal signal handling interface.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@49 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 2bdb28fbe07d0f74c38fb0a3231d8425fdc75777
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Mar 15 00:05:38 2008 +0000

    Missing headers, more minor fixes

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@48 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit c19c06f3b05a220cb638050c0e06578a09ad64ad
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Mar 14 20:56:26 2008 +0000

    Fix kmem memory accounting

    Adjust kmem slab interface to make a copy of the slab name before
    passing it on to the linux slab (we free it latter too)

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@47 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 79b31f3601af530f64b3f2ae87233b3fa5271df1
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Mar 14 19:04:41 2008 +0000

    Fix KMEM_DEBUG support (enable by default)
    Add vmem_alloc/vmem_free support (and test case)
    Add missing time functions

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@46 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit af828292e585781b2e186f47074a3e1a3baa5094
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Mar 14 00:04:01 2008 +0000

    Add missing headers
    Rework vnodes to be based on the slab cache, just like on Solaris.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@45 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit ea19fbed0538d0e13549ff9753533fe4f9edeffd
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Mar 13 22:52:23 2008 +0000

    Add missing headers

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@44 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 8ddd0ee4154e7e785f07400c113c7465906c97b9
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Mar 13 20:41:29 2008 +0000

    Add two more missing headers

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@43 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 73e540a0d1cc4fa686de9bd14875cb218d6a9bb1
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Mar 13 19:49:09 2008 +0000

    Drop unicode support, provided in ZFS tree libport
    Update uio support

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@42 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 36e6f86146432207789a0e2027edf8d52326bad7
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Mar 12 23:48:28 2008 +0000

    - Add some more missing headers
    - Map the LE/BE_* byteorder macros to the linux versions
    - More minor vnodes fixes

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@41 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 2f5d55aac5bfe0931a92f222ebc68c1546b227d9
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Mar 12 21:33:28 2008 +0000

    Add copyin/copyout mapping
    Fix some vnode types

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@40 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 4b17158506d5f3bb7e71111f5b6287f19bf20190
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Mar 12 20:52:46 2008 +0000

    - Implemented vnode interfaces and 6 test cases to the test suite.
    - Re-implmented kobj support based on the vnode support.
    - Add TESTS option to check.sh, and removed delay after module load.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@39 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 9490c148359332d797e4fc250812bd7a5fd131b1
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Mar 11 20:54:40 2008 +0000

    Apply fix from bug239 for rwlock deadlock.

    Update check.sh script to take V=1 env var so you can run it verbosely as
    follows if your chasing something: sudo make check V=1

    Add new kobj api and needed regression tests to allow reading of files from
    within the kernel.  Normally thats not something I support but the spa layer
    needs the support for its config file.

    Add some more missing stub headers

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@38 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit b123971fc2f951cc95c8f75db68adf05d3a1d1aa
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Mar 11 02:08:57 2008 +0000

    Two more GPL only symbols moved to helper functions in the spl module.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@37 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit ee4766827a6e19a97fe3cb423ea3220039240c4f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Mar 10 21:38:39 2008 +0000

    Remap gethrestime() with #define to new symbol and export that new
    symbol to avoid direct use of GPL only symbol.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@36 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 51f443a0741b5a74ecb078ab16d3eac489c90fd1
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Mar 10 19:25:20 2008 +0000

    Add some typedefs to make it clearer when we passing a function,
    Add fm_panic define
    Add another bad atomic hack (need to do this right)

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@35 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 4098c921b68edd5ae03f5213f08fd1b99cd05211
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Mar 10 19:04:14 2008 +0000

    Fix systemic naming mistake

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@34 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 6adf99e7d6c179039482e5341a907488d3a33ea7
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Mon Mar 10 17:05:34 2008 +0000

    Add missing headers

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@33 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 12472b242dc32f681a0d30efe97359ce67959e58
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Mar 8 00:58:32 2008 +0000

    Just filling in more of the env.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@32 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 05ae387b5024b6b7014287e09ed9ce74befe91a3
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Mar 8 00:18:21 2008 +0000

    Add somre debugging support

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@31 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 0b3cf046cb5b65ccaf22687e105a4380533c0305
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Mar 7 23:07:02 2008 +0000

    Add the initial vestigates of vnode support

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@30 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 3b3ba48fe9a639d5a3cd1b8960deabefd35310be
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Mar 7 20:48:44 2008 +0000

    Add missing cred.h functions
    Resolve compiler warning with kmem_free (unused len)
    Add stub for byteorder.h
    Add zlib shim for compress2 and uncompress functions

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@29 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit b0dd3380aae2a976d4d3afa4d3b2aff820c36f23
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Fri Mar 7 00:28:32 2008 +0000

    Minor atomic cleanup, this needs to be done right.
    Fixed a bug in the timer code
    Added missing macros

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@28 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit ed61a7d05eb95ab453a95baf52d6af7b0c60a132
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Mar 6 23:42:37 2008 +0000

    Add some missing rw_lock symbols

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@27 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 77b1fe8fa86809b7d2bc82abfe7e74fc047bedfe
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Mar 6 23:12:55 2008 +0000

    Add highbit func,
    Add sloopy atomic declaration which will need to be fixed (eventually)
    Fill out more of the Solaris VM hooks
    Adjust the create_thread function

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@26 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit a713518f5d9e4f7b1c361035f1f3ef79869a960f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Mar 5 00:58:54 2008 +0000

    Checkpoint for the night,
    added a few more stub headers,
    fleshed out a few stub headers,
    added a FIXME file,
    added various compatibility macros

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@25 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 23f28c4f75b6a7583ac706db331211baa055ca5d
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Mar 4 20:06:29 2008 +0000

    Remove spl.h, just include the headers you need.
    Add a few more stubs.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@24 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 48f940b9439902c2974c705e8fbec3b0a73ffacd
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Mar 4 19:38:27 2008 +0000

    Fix type

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@23 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 14c5326ccd05d3741271219510138880575a5d81
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Mar 4 18:22:31 2008 +0000

    More stub headers,
    moved generic to sysmacros,
    added some more macros for kernel compatibility

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@22 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit dbb484ec6002723fc89e2231436c2c7ef51d83d3
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Mar 1 18:30:12 2008 +0000

    Stub out some missing headers which are expected.  I'll fill
    in what the contents need to be as I encounter the warnings
    about missing prototypes, symbols, and such.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@21 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit d5f087adef0e5f62f565998a8d54d7cb3c3fe2fa
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Mar 1 00:51:41 2008 +0000

    Remaining lose ends

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@20 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit ea70970ff5a372a9d8d9dd960c555a9e4186f04a
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Mar 1 00:47:23 2008 +0000

    Almost dropped this!

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@19 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit f4b377415b4b53722addedc10801db24ad4e6f23
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Sat Mar 1 00:45:59 2008 +0000

    Reorganize /include/ to add a /sys/, this way we don't need to
    muck with #includes in existing Solaris style source to get it
    to find the right stuff.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@18 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 09b414e880b0c2e4ae08d82354bbae034dafdd9e
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Feb 28 00:52:31 2008 +0000

    Minor nit, SOLARIS should be SPL

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@17 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 596e65b4e8e98e46705cb470deb72dbf8702b8c2
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Feb 28 00:48:31 2008 +0000

    OK, I think this is the last of major cleanup and restructuring.
    We've dropped all the linux- prefixes on the file in favor of spl-
    which makes more sense.  And we've cleaned up some of the includes
    so everybody should be including their own dependencies properly.
    All a module which wants to use the spl support needs to do in
    include spl.h and ensure it has access to Module.symvers.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@16 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 07d339d467337b07ff078d4f2bb81c00388c7565
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Thu Feb 28 00:16:24 2008 +0000

    Add top level make check target which runs the validation
    suite.  Careful with this right now one of the tests still
    causes a lockup on the node.  This happened before the move
    from the ZFS repo so its not a new issue.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@15 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 7c50328b40df4733f31d0fb1ef2056581ff71d4e
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 23:42:31 2008 +0000

    More cleanup.
    - Removed all references to kzt and replaced with splat
    - Moved portions of include files which do not need to be
      available to all source files in to local.h files in
      proper source subdirs.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@14 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 70eadc19583d4c90f59bd1a78350657aa3f4afc9
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 21:56:51 2008 +0000

    OK, it builds... and the modules load...  now for some more
    cleanup to remove the remaining vestages of the time it lives
    with the ZFS code.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@13 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit e4009e98c75612fcd75a1f142dfc37fea4b5ac4a
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 20:55:24 2008 +0000

    Quiet libtool

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@12 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit a0aadf5666d5070e55ab1a6fd58eddf06494010c
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 20:52:44 2008 +0000

    OK, everything builds now.  My initial intent was to place all of
    the directories at the top level but that proved troublesome.  The
    kernel buildsystem and autoconf were conflicting too much.  To
    resolve the issue I moved the kernel bits in to a modules directory
    which can then only use the kernel build system.  We just pass
    along the likely make targets to the kernel build system.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@11 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 1735fa73f4ac6935e5029fbf5c3ce9e7c9617f8f
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 20:28:52 2008 +0000

    New approach

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@10 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 032d12a90053bf86648a91384d39d27e4a3da7c2
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 19:36:31 2008 +0000

    Move dir

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@9 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit d01858a1ca786b85baff93976f7d300ea542b1a6
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 19:36:20 2008 +0000

    Move dir

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@8 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit ce58df922657572db62ec0e0a526d39ee6f17df6
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 19:36:07 2008 +0000

    Move dir

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@7 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 15821fd660fde934ddd06e49b1333185a45bc586
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 19:35:54 2008 +0000

    Move dir

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@6 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit f1b59d2620ae2bd977e67e292f9bebc43049872c
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 19:09:51 2008 +0000

    Lots of build fixes.  This is turning out to be a very good
    idea since it forcefully codifing the ABI.  Since the shim
    layer is no longer linked at build time in to the test suite
    we can;'t cut any corners and get away with it.

    Everything is working now with the exception of sorting
    setting Module.symvers properly.  This may take a little
    Makefile reorg.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@5 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 3d4ea0ced6c2400d2b7d62d4f90b1a69d7e1a04e
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Wed Feb 27 00:59:48 2008 +0000

    More build fixes, I have the kernel module almost building and its
    feeling a lot more sane, cleaner, and linuxy.  I may finish this tonight.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@4 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 564f6d1509f71f14e0bd9631363995b7f193d758
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Feb 26 23:20:41 2008 +0000

    User space build fixes:
    - Add list handling compatibility library
    - Drop uu_* list handling in favor of local list implementation
    - libtoolize
    - generic makefile cleanup

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@3 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit 8f48c2c853b65d300c951028ae1eb15ccf52e928
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Feb 26 20:37:43 2008 +0000

    Whoops, I knew I'd miss something small in the build system.  Fix
    it

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@2 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c

commit f1ca4da6f79730bad6d0ad75db567881c96a5e51
Author: behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>
Date:   Tue Feb 26 20:36:04 2008 +0000

    Initial commit.  All spl source written up to this point wrapped
    in an initial reasonable autoconf style build system.  This does
    not yet build but the configure system does appear to work properly
    and integrate with the kernel.  Hopefully the next commit gets
    us back to a buildable version we can run the test suite against.

    git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@1 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c