Merge ZFS into tree

Squashed commit of the following:

commit 5cd1abb514c1b950aabd7d4ed425064a9cab8e09
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Fri Apr 27 05:19:44 2012 -0400

    Prepare ZFS for inclusion into the kernel tree

commit 821433c9b4152d2d8ba4466f9d0970b83f61f351
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Fri Apr 27 01:42:56 2012 -0400

    Fix Linux 3.3.0 build failure involving --enable-debug

    Linux 3.3.0 changed some of the function prototypes in inode_operations.
    In specific, they changed create, mkdir and mknod.  The third argument
    is now umode_t instead of int.

    This caused a build with --enable-debug to fail. --disable-debug is
    unaffected. We fix this by introducing preprocessor directives to alter
    the function prototypes on Linux 3.3.0 and greater.

    This closes ZFSOnLinux issue #613.

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

commit 012f65734b1033f3816b08599541c513e136330d
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Tue Apr 24 15:13:47 2012 -0400

    Make zvol_remove_link() print a more useful error message

commit 266bbee34132fa3935510d39ee2d0db19eb335bc
Author: Frederik Wessels <wessels147@gmail.com>
Date:   Tue Apr 24 07:59:56 2012 -0400

    Illumos #1946: incorrect formatting when listing output of multiple pools with zpool iostat -v

    Reviewed by: Richard Elling <richard.elling@richardelling.com>
    Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
    Approved by: Richard Lowe <richlowe@richlowe.net>

    Reference to Illumos issue:
    	https://www.illumos.org/issues/1946

    Ported by: Richard Yao <ryao@cs.stonybrook.edu>

commit 53fadeb9bd47c81138bc14c40dab6457e7e87229
Author: Richard Lowe <richlowe@richlowe.net>
Date:   Tue Apr 24 06:51:02 2012 -0400

    Illumos #2067: uninitialized variables in zfs(1M) may make snapshots undestroyable

    Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
    Reviewed by: Milan Jurik <milan.jurik@xylab.cz>
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Reviewed by: Matt Ahrens <mahrens@delphix.com>
    Reviewed by: Steve Gonczi <gonczi@comcast.net>
    Approved by: Garrett D'Amore <garrett@damore.org>

    References:
    	https://www.illumos.org/issues/2067

    Ported by: Richard Yao <ryao@cs.stonybrook.edu>

commit be8598144199c10a9efb875d9311f99be9792a65
Author: Mike Harsch <mike@harschsystems.com>
Date:   Mon Apr 23 17:52:50 2012 -0400

    Illumos #952: separate intent logs should be obvious in 'zpool iostat' output

    Reviewed by: Adam Leventhal <ahl@delphix.com>
    Reviewed by: Matt Ahrens <mahrens@delphix.com>
    Reviewed by: Eric Schrock <eric.schrock@delphix.com>
    Reviewed by: Dan McDonald <danmcd@nexenta.com>
    Reviewed by: Garrett D'Amore <garrett@nexenta.com>
    Approved by: Eric Schrock <eric.schrock@delphix.com>
    Ported-by: Richard Yao <ryao@cs.stonybrook.edu>

commit c0f718b40f16a101c4d48cd82c740c4c59fd8339
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Thu Apr 12 17:22:08 2012 -0400

    Update ARC memory limits to account for SLUB internal fragmentation

    23bdb07d4e4c435205d25d3efdb5fef2d089ce5e updated the ARC memory limits
    to be 1/2 of memory or all but 4GB. Unfortunately, these values assume
    zero internal fragmentation in the SLUB allocator, when in reality, the
    internal fragmentation could be as high as 50%, effectively doubling
    memory usage. This poses clear safety issues, because it permits the
    size of ARC to exceed system memory.

    This patch changes this so that the default value of arc_c_max is always
    1/2 of system memory. This effectively limits the ARC to the memory that
    the system has physically installed.

commit a617dd58255fb0ade1bd5b0c1044648a127c83ba
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Wed Apr 18 05:16:32 2012 -0400

    Modify txg_hold_open to support preemptable kernels

commit c9edc2c2519ff27f18bd82527f8b82d3de8b48e7
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Mon Apr 23 16:42:31 2012 -0400

    Modify fm_ena_generate to support preemptable kernels

commit 3281acf0d56110b948de8439cfbb9e80809f1fbf
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Mon Apr 16 06:56:20 2012 -0400

    Disable direct reclaim on zvols

    Previously, it was possible for the direct reclaim path to be invoked
    when a write to a zvol was made. When a zvol is used as a swap device,
    this often causes swap requests to depend on additional swap requests,
    which deadlocks. We address this by disabling the direct reclaim path
    on zvols.

    This closes issue #83.

commit 48ad591c4257f8ebe2c6a811456d828183ef7571
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Wed Apr 18 04:32:07 2012 -0400

    Revert CONFIG_PREEMPT checks

commit 24f422e4801a20c7f34160eba66a6e46c70f64aa
Author: Bryan Cantrill <bryan@joyent.com>
Date:   Sun Apr 8 13:19:33 2012 -0400

    OS-682: ARC minimum is set too high, potentially blocking VM creation

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

commit 63efc329fd542558898c48aa037e415b2d039ac2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 13 14:29:16 2012 -0700

    Integrate ARC more tightly with Linux

    Under Solaris the ARC was designed to stay one step ahead of the
    VM subsystem.  It would attempt to recognize low memory situtions
    before they occured and evict data from the cache.  It would also
    make assessments about if there was enough free memory to perform
    a specific operation.

    This was all possible because Solaris exposes a fairly decent
    view of the memory state of the system to other kernel threads.
    Linux on the other hand does not make this information easily
    available.  To avoid extensive modifications to the ARC the SPL
    attempts to provide these same interfaces.  While this works it
    is not ideal and problems can arise when the ARC and Linux have
    different ideas about when your out of memory.  This has manifested
    itself in the past as a spinning arc_reclaim_thread.

    This patch abandons the emulated Solaris interfaces in favor of
    the prefered Linux interface.  That means moving the bulk of the
    memory reclaim logic out of the arc_reclaim_thread and in to the
    evict driven shrinker callback.  The Linux VM will call this
    function when it needs memory.  The ARC is then responsible for
    attempting to free the requested amount of memory if possible.

    Several interfaces have been modified to accomidate this approach,
    however the basic user space implementation remains the same.
    The following changes almost exclusively just apply to the kernel
    implementation.

    * Removed the hdr_recl() reclaim callback which is redundant
      with the broader arc_shrinker_func().

    * Reduced arc_grow_retry to 5 seconds from 60.  This is now used
      internally in the ARC with arc_no_grow to indicate that direct
      reclaim was recently performed.  This typically indicates a
      rapid change in memory demands which the kswapd threads were
      unable to keep ahead of.  As long as direct reclaim is happening
      once every 5 seconds arc growth will be paused to avoid further
      contributing to the existing memory pressure.  The more common
      indirect reclaim paths will not set arc_no_grow.

    * arc_shrink() has been extended to take the number of bytes by
      which arc_c should be reduced.  This allows for a more granual
      reduction of the arc target.  Since the kernel provides a
      reclaim value to the arc_shrinker_func() this value is used
      instead of 1<<arc_shrink_shift.

    * arc_reclaim_needed() has been removed.  It was used to determine
      if the system was under memory pressure and relied extensively
      on Solaris specific VM interfaces.  In most case the new code
      just checks arc_no_grow which indicates that within the last
      arc_grow_retry seconds direct memory reclaim occurred.

    * arc_memory_throttle() has been updated to always include the
      amount of evictable memory (arc and page cache) in its free
      space calculations.  This space is largely available in most
      call paths due to direct memory reclaim.

    * The Solaris pageout code was also removed to avoid confusion.
      It has always been disabled due to proc_pageout being defined
      as NULL in the Linux port.

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

commit ebf8e3a237d4720e3a85fb3a168917ead4ba25d1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Apr 19 15:55:28 2012 -0700

    Illumos #1909: disk sync write perf regression when slog is used post oi_148

    Reviewed by: Matt Ahrens <matt@delphix.com>
    Reviewed by: Eric Schrock <eric.schrock@delphix.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Bill Pijewski <wdp@joyent.com>
    Reviewed by: Richard Elling <richard.elling@richardelling.com>
    Reviewed by: Steve Gonczi <gonczi@comcast.net>
    Reviewed by: Garrett D'Amore <garrett.damore@gmail.com>
    Reviewed by: Dan McDonald <danmcd@nexenta.com>
    Reviewed by: Albert Lee <trisk@nexenta.com>
    Approved by: Eric Schrock <eric.schrock@delphix.com>

    Refererces to Illumos issue:
      https://www.illumos.org/issues/1909

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

commit 409dc1a570a836737b2a5bb43658cdde703c935e
Author: Prakash Surya <surya1@llnl.gov>
Date:   Tue Apr 10 10:55:17 2012 -0700

    Use KM_PUSHPAGE in l2arc_write_buffers

    There is potential for deadlock in the l2arc_feed thread if KM_PUSHPAGE
    is not used for the allocations made in l2arc_write_buffers.
    Specifically, if KM_PUSHPAGE is not used for these allocations, it is
    possible for reclaim to be triggered which can cause the l2arc_feed
    thread to deadlock itself on the ARC_mru mutex. An example of this is
    demonstrated in the following backtrace of the l2arc_feed thread:

        crash> bt 4123
        PID: 4123   TASK: ffff88062f8c1500  CPU: 6   COMMAND: "l2arc_feed"
          0 [ffff88062511d610] schedule at ffffffff814eeee0
          1 [ffff88062511d6d8] __mutex_lock_slowpath at ffffffff814f057e
          2 [ffff88062511d748] mutex_lock at ffffffff814f041b
          3 [ffff88062511d768] arc_evict at ffffffffa05130ca [zfs]
          4 [ffff88062511d858] arc_adjust at ffffffffa05139a9 [zfs]
          5 [ffff88062511d878] arc_shrink at ffffffffa0513a95 [zfs]
          6 [ffff88062511d898] arc_kmem_reap_now at ffffffffa0513be8 [zfs]
          7 [ffff88062511d8c8] arc_shrinker_func at ffffffffa0513ccc [zfs]
          8 [ffff88062511d8f8] shrink_slab at ffffffff8112a17a
          9 [ffff88062511d958] do_try_to_free_pages at ffffffff8112bfdf
         10 [ffff88062511d9e8] try_to_free_pages at ffffffff8112c3ed
         11 [ffff88062511da98] __alloc_pages_nodemask at ffffffff8112431d
         12 [ffff88062511dbb8] kmem_getpages at ffffffff8115e632
         13 [ffff88062511dbe8] fallback_alloc at ffffffff8115f24a
         14 [ffff88062511dc68] ____cache_alloc_node at ffffffff8115efc9
         15 [ffff88062511dcc8] __kmalloc at ffffffff8115fbf9
         16 [ffff88062511dd18] kmem_alloc_debug at ffffffffa047b8cb [spl]
         17 [ffff88062511dda8] l2arc_feed_thread at ffffffffa0511e71 [zfs]
         18 [ffff88062511dea8] thread_generic_wrapper at ffffffffa047d1a1 [spl]
         19 [ffff88062511dee8] kthread at ffffffff81090a86
         20 [ffff88062511df48] kernel_thread at ffffffff8100c14a

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

commit cf81b00a73fe47fdb21586ac1cc179b734540973
Author: P.SCH <p88@yahoo.com>
Date:   Mon Apr 9 09:05:54 2012 +0300

    ZFS list snapshot property alias

    Add support for the `zfs list -t snap` alias which is available under
    Oracle Solaris 11.

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

commit 10b75496bb0cb7a7b8146c263164adc37f1d176a
Author: P.SCH <p88@yahoo.com>
Date:   Thu Apr 5 16:03:21 2012 +0300

    ZFS snapshot alias

    For consistency, and because it's handy, add the 'zfs snap' alias which
    was introduced by Oracle Solaris 11.  This includes an update to the
    man page to reflect all the available alias (snap, umount, and recv).

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

commit 7d5cd71da6987565d19701b1d102f882f659b815
Author: Martin Matuska <mm@FreeBSD.org>
Date:   Sun Apr 8 13:16:46 2012 -0400

    Illumos #1346: zfs incremental receive may leave behind temporary clones

    1356 zfs dataset prefetch code not working
    Reviewed by: Matthew Ahrens <matt@delphix.com>
    Reviewed by: Dan McDonald <danmcd@nexenta.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

    References to Illumos issue:
      https://www.illumos.org/issues/1346
      https://www.illumos.org/issues/1356

    Ported-by: Richard Yao <ryao@cs.stonybrook.edu>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #647

commit 22cd4a465349618a415802f28146653a93bb4594
Author: Albert Lee <trisk@nexenta.com>
Date:   Sun Apr 8 13:10:49 2012 -0400

    Illumos #1475: zfs spill block hold can access invalid spill blkptr

    Reviewed by: Dan McDonald <danmcd@nexenta.com>
    Reviewed by: Gordon Ross <gwr@nexenta.com>
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: George Wilson <gwilson@zfsmail.com>
    Approved by: Garrett D'Amore <garrett@nexenta.com>

    References to Illumos issue:
      https://www.illumos.org/issues/1475

    Ported-by: Richard Yao <ryao@cs.stonybrook.edu>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #648

commit 5ffb9d1d05d7c512b987dff51f587466d537770f
Author: George Wilson <gwilson@zfsmail.com>
Date:   Sun Apr 8 13:23:08 2012 -0400

    Illumos #1951: leaking a vdev when removing an l2cache device

    1952 memory leak when adding a file-based l2arc device
    1954 leak in ZFS from metaslab_group_create and zfs_ereport_checksum

    Reviewed by: Adam Leventhal <ahl@delphix.com>
    Reviewed by: Matt Ahrens <matt@delphix.com>
    Reviewed by: Eric Schrock <eric.schrock@delphix.com>
    Reviewed by: Bill Pijewski <wdp@joyent.com>
    Reviewed by: Dan McDonald <danmcd@nexenta.com>
    Approved by: Eric Schrock <eric.schrock@delphix.com>

    References to Illumos issues:
      https://www.illumos.org/issues/1951
      https://www.illumos.org/issues/1952
      https://www.illumos.org/issues/1954

    Ported-by: Richard Yao <ryao@cs.stonybrook.edu>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #650

commit b129c6590e07edcc95f3b64ec210d94cf885c192
Author: Martin Matuska <mm@FreeBSD.org>
Date:   Sun Apr 8 13:18:48 2012 -0400

    OS-926: zfs panic in zfs_fill_zplprops_impl()

    This change appears to be exclusive to SmartOS. It is not present in
    illumos-gate but it just adds some needed error handling.  This is
    clearly preferable to simply ASSERTING which is what would occur
    prior to the patch.

    Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
    Reviewed by: Matt Ahrens <matt@delphix.com>
    Ported-by: Richard Yao <ryao@cs.stonybrook.edu>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #652

commit 3adfc400f5f6c8b24b825cbe91c14b7d58f3c7fc
Author: Andriy Gapon <avg@FreeBSD.org>
Date:   Mon Apr 9 13:01:46 2012 -0400

    Illumos #1680: zfs vdev_file_io_start: validate vdev before using vdev_tsd

    vdev_tsd can be NULL for certain vdev states.
    At least in userland testing with ztest.

    References to Illumos issue:
      https://www.illumos.org/issues/1680

    Ported-by: Richard Yao <ryao@cs.stonybrook.edu>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #655

commit 109491a8976ec6f3fef74ee16bc16f64c34332af
Author: Richard Laager <rlaager@wiktel.com>
Date:   Mon Apr 9 16:59:37 2012 -0500

    Improve error message consistency

    Signed-off-by: Richard Laager <rlaager@wiktel.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit f4605f07a2901566c9d4ae84e7c17e3ba827ce8a
Author: Richard Laager <rlaager@wiktel.com>
Date:   Tue Apr 10 20:03:26 2012 -0500

    Document the zle compression algorithm

    Signed-off-by: Richard Laager <rlaager@wiktel.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit f0fd83be65152a218c7daa1d006b53fb4b79bdce
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Apr 4 13:46:55 2012 -0700

    Export additional dsl symbols

    Principly these symbols were exported to get access to the
    dsl_prop_register/dsl_prop_unregister functions.  They allow
    us to cleanly register a callback which is called when a
    dataset property is modified.

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

commit 1f0d8a566f0251ff9404b98233ae8d5406c6d308
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Thu Apr 5 10:30:10 2012 +0200

    Fixed a NULL pointer dereference bug in zfs_preumount

    When zpl_fill_super -> zfs_domount fails (e.g. because the dataset
    was destroyed before it could be successfully mounted) the subsequent
    call to zpl_kill_sb -> zfs_preumount would derefence a NULL pointer.

    This bug can be reproduced using this shell script:

     #!/bin/sh
     (
     while true; do
     	zfs create -o mountpoint=legacz tank/bar
     	zfs destroy tank/bar
     done
     ) &

     (
     while true; do
     	mount -t zfs tank/bar /mnt
     	umount /mnt
     done
     ) &

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

commit 2ce9d0ec61706e56abd4c56fe78bfe11365ad130
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Tue Apr 3 00:21:22 2012 -0400

    Make Gentoo initscript use modinfo

    The -l parameter to modprobe has been removed from the latest upstream
    code and this change has entered Gentoo. Using modinfo as a substitute
    addresses this.

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

commit 847de12271af349bba07027dbcbc83aaa53b4b1a
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Mon Apr 2 20:44:42 2012 -0400

    Print human readable error message for ENOENT

    A cryptic error code is printed when mounting a legacy dataset to a
    non-existent mountpoint. This patch changes this behavior to print
    "mount point '%s' does not exist", which is similar to the error
    message printed when mounting procfs.

    The single quotes were added to be consistent with the existing EBUSY
    error message, which is the only difference between this error message
    and the one that is printed when the same condition occurs when mounting
    procfs.

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

commit fc41c6402b46d928dcc0a07435da1716b3a33c7c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 27 10:10:26 2012 -0700

    Properly expose the mfu ghost list kstats

    Due to a typo the mru ghost lists stats were accidentally being
    exposed as the mfu ghost list stats.  This was harmless but
    confusing since memory usage could be over reported.

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

commit 9fc60702c6679803c77939db732c294b6b6952d2
Author: Craig Sanders <github@taz.net.au>
Date:   Tue Mar 27 21:37:41 2012 +1100

    Remove hard-coded 80 column output

    When stdout is detected to be a tty use the number of columns
    specified by the terminal.  If that fails fall back to a default
    80 column width.  In the non-tty case allow for 999 column lines.

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

commit 2008ab88dd19ae3947b30b4e933fbf2273300aa2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 26 11:55:16 2012 -0700

    ZFS 0.6.0-rc8

commit f47e1351db9f2e8bb769dd683801710cff988011
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 26 10:34:55 2012 -0700

    Fix executable permissions

    Caught by lint, this permission change was accidentally introduced
    by commit 42cb3819f1a1f536105faac81ffc150f3da90a80.  Restore the
    correct permissions and while I'm at it add a missing whack-bang
    to config/ltmain.sh.

      lint: executable-not-elf-or-script: zpool_main.c zfs_main.c

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

commit 1c5de20ae2511124613926e4f780572634818218
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 20 16:00:17 2012 -0700

    Add --enable-debug-dmu-tx configure option

    Allow rigorous (and expensive) tx validation to be enabled/disabled
    indepentantly from the standard zfs debugging.  When enabled these
    checks ensure that all txs are constructed properly and that a dbuf
    is never dirtied without taking the correct tx hold.

    This checking is particularly helpful when adding new dmu consumers
    like Lustre.  However, for established consumers such as the zpl
    with no known outstanding tx construction problems this is just
    overhead.

    --enable-debug-dmu-tx  - Enable/disable validation of each tx as
    --disable-debug-dmu-tx   it is constructed.  By default validation
                             is disabled due to performance concerns.

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

commit 99ea23c583b272470a21e0ac7caa1f485f6b1125
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 12 12:38:00 2012 -0700

    Enhance a dmu_tx_dirty_buf() assertion

    The following assertion is good to validate the correctness of
    new DMU consumers, but it doesn't quite provide enough information.
    Slightly rework the assertion so that when it is hit the actual
    offending values will be included in the output.

      SPLError: 4787:0:(dmu_tx.c:828:dmu_tx_dirty_buf())
      ASSERTION(dn == NULL || dn->dn_assigned_txg == tx->tx_txg) failed

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

commit 4b5d425f14673bfb228699cbafca7609cf30a7da
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 23 11:59:47 2012 -0700

    Add ZFS_META_RELEASE to module load/unload messages

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

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

commit 9ed86e7cc7d0880c35f675efc2177012f01f5678
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 22 14:47:29 2012 -0700

    Account for .zfs ctldir inodes

    Because the .zfs ctldir inodes are not backed by physical storage
    they use a different create path which was not properly accounting
    for them as used.  This could result in ->nr_cached_objects()
    returning 0 and cause a divide by zero error in prune_super().

    In my option there's a kernel bug here too which allows this to
    happen.  They should either be checking for 0 or adding +1 like
    they correctly do earlier in the function.

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

commit ebe7e575eae1e03b1faa545a424f008faeac589d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 11 12:45:53 2011 +0530

    Add .zfs control directory

    Add support for the .zfs control directory.  This was accomplished
    by leveraging as much of the existing ZFS infrastructure as posible
    and updating it for Linux as required.  The bulk of the core
    functionality is now all there with the following limitations.

    *) The .zfs/snapshot directory automount support requires a 2.6.37
       or newer kernel.  The exception is RHEL6.2 which has backported
       the d_automount patches.

    *) Creating/destroying/renaming snapshots with mkdir/rmdir/mv
       in the .zfs/snapshot directory works as expected.  However,
       this functionality is only available to root until zfs
       delegations are finished.

          * mkdir - create a snapshot
          * rmdir - destroy a snapshot
          * mv    - rename a snapshot

    The following issues are known defeciences, but we expect them to
    be addressed by future commits.

    *) Add automount support for kernels older the 2.6.37.  This should
       be possible using follow_link() which is what Linux did before.

    *) Accessing the .zfs/snapshot directory via NFS is not yet possible.
       The majority of the ground work for this is complete.  However,
       finishing this work will require resolving some lingering
       integration issues with the Linux NFS kernel server.

    *) The .zfs/shares directory exists but no futher smb functionality
       has yet been implemented.

    Contributions-by: Rohan Puri <rohan.puri15@gmail.com>
    Contributiobs-by: Andrew Barnes <barnes333@gmail.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #173

commit 49be0ccf1fdc2ce852271d4d2f8b7a9c2c4be6db
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 23 15:32:51 2012 -0800

    Add zio constructor/destructor

    Add a standard zio constructor and destructor.  Normally, this is
    done to reduce to cost of allocating a new structure by reducing
    expensive operations such as memory allocations.  However, in this
    case none of the operations moved out of zio_create() were really
    very expensive.

    This change was principly made as a debug patch (and workaround)
    for a zio_destroy() race.  The is good evidence that zio_create()
    is reinitializing a mutex which is really still in use by another
    thread.  This would completely explain the observed symptoms in
    the issue report.

    This patch doesn't fix the root cause of the race, but it should
    make it less likely by only initializing the mutex once in the
    constructor.  Also, this particular flaw might have gone unnoticed
    in other zfs implementations due to the specific implementation
    details of Linux ticket spinlocks.

    Once the real root cause is determined and resolved this change
    can be safely reverted.  Until then this should help workaround
    the issue.

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

commit c8df41538db3723edf3536379a78fbaf68f037d0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 21 11:51:27 2012 -0700

    Revert "Add zio constructor/destructor"

    This patch was slightly flawed and allowed for zio->io_logical
    to potentially not be reinitialized for a new zio.  This could
    lead to assertion failures in specific cases when debugging is
    enabled (--enable-debug) and I/O errors are encountered.  It
    may also have caused problems when issues logical I/Os.

    Since we want to make sure this workaround can be easily removed
    in the future (when we have the real fix).  I'm reverting this
    change and applying a new version of the patch which includes
    the zio->io_logical fix.

    This reverts commit 2c6d0b1e07b0265f0661ed7851d3aa8d3e75e7a9.

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

commit 43c8454724e0ba70b13e40cd2f63ad0d68942776
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 16 11:11:40 2012 -0700

    ZFS 0.6.0-rc7

commit 77a405ae52e4a902f7cc3790e2a73d044c66d962
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 14 12:36:49 2012 -0700

    Add missing NULL in zpl_xattr_handlers

    The xattr_resolve_name() helper function expects the registered
    list of xattr handlers to be NULL terminated.  This NULL was
    accidentally missing which could result in a NULL dereference.

    Interestingly this issue only manifested itself on certain 32-bit
    systems.  Presumably on 64-bit kernels we just always happen to
    get lucky and the memory following the structure is zeroed.

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

commit 42cb3819f1a1f536105faac81ffc150f3da90a80
Author: Gregor Kopka <mailfrom-github.com@kopka.net>
Date:   Wed Mar 14 14:34:00 2012 +0100

    Use stderr for 'no pools/datasets available' error

    The 'zfs list' and 'zpool list' commands output the message
    'no datasets/pools available' to stdout.  This should go to
    stderr and only the available datasets/pools should go to
    stdout.  Returning nothing to stdout is expected behavior
    when there is nothing to list.

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

commit 0ece356db51e225c3d4a26dff7cf67c99b6b9c55
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 5 15:14:15 2012 -0800

    Add sa_spill_rele() interface

    Add a SA interface which allows us to release the spill block
    from a SA handle without destroying the handle.  This is useful
    because we can then ensure that a copy of the dirty spill block
    is not made at sync time due to the extra hold.  Susequent calls
    to sa_update() or sa_lookup() with transparently refetch the
    spill block dbuf from the ARC hash.

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

commit 2c6d0b1e07b0265f0661ed7851d3aa8d3e75e7a9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 23 15:32:51 2012 -0800

    Add zio constructor/destructor

    Add a standard zio constructor and destructor.  Normally, this is
    done to reduce to cost of allocating a new structure by reducing
    expensive operations such as memory allocations.  However, in this
    case none of the operations moved out of zio_create() were really
    very expensive.

    This change was principly made as a debug patch (and workaround)
    for a zio_destroy() race.  The is good evidence that zio_create()
    is reinitializing a mutex which is really still in use by another
    thread.  This would completely explain the observed symptoms in
    the issue report.

    This patch doesn't fix the root cause of the race, but it should
    make it less likely by only initializing the mutex once in the
    constructor.  Also, this particular flaw might have gone unnoticed
    in other zfs implementations due to the specific implementation
    details of Linux ticket spinlocks.

    Once the real root cause is determined and resolved this change
    can be safely reverted.  Until then this should help workaround
    the issue.

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

commit 76c2b24c613ddac896ee67250b467fd40d6a5689
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Tue Feb 28 16:23:16 2012 -0500

    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 613d88eda89945bb0011ddc05d3bd064bf1a8e1b
Author: Ned Bass <bass6@llnl.gov>
Date:   Wed Feb 29 10:08:20 2012 -0800

    Align parition end on 1 MiB boundary

    Some devices have exhibited sensitivity to the ending alignment of
    partitions.  In particular, even if the first partition begins at 1
    MiB, we have seen many sd driver task abort errors with certain SSDs
    if the first partition doesn't end on a 1 MiB boundary.  This occurs
    when the vdev label is read during pool creation or importation and
    causes a delay of about 30 seconds per device.  It can also be
    simulated with dd when the pool isn't imported:

      dd if=/dev/sda1 of=/dev/null bs=262144 count=1

    For the record, this problem was observed with SMARTMOD
    SG9XCA2E200GE01 200GB SSDs.  Unfortunately I don't have a good
    explanation for this behavior. It seems to have something to do with
    highly fragmented single-sector requests being issued to the device,
    which it may not support.  With end-aligned partitions at least
    page-sized requests were queued and issued to the driver according
    to blktrace. In any case, aligning the partition end is a fairly
    innocuous work-around, wasting at most 1 MiB of space.

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

commit ec2626ad3f695a2ced3946c4197ef64cbcac4959
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 2 10:35:50 2012 -0800

    Use SA_HDL_PRIVATE for SA xattrs

    A private SA handle must be used to ensure we can drop the dbuf
    hold on the spill block prior to calling dmu_tx_commit().  If we
    call dmu_tx_commit() before sa_handle_destroy(), then our hold
    will trigger a copy of the dbuf to be made.  This is done to
    prevent data from leaking in to the syncing txg.  As a result
    the original dirty spill block will remain cached.

    Additionally, relying on the shared zp->z_sa_hdl is unsafe in
    the xattr context because the znode may be asynchronously dropped
    from the cache.  It's far safer and simpler just to use a private
    handle for xattrs.  Plus any additional overhead is offset by
    the avoidance of the previously mentioned memory copy.

    These forever dirty buffers can be noticed in the arcstats under
    the anon_size.  On a quiescent system the value should be zero.
    Without this fix and a SA xattr write workload you will see
    anon_size increase.  Eventually, if enough dirty data builds up
    your system it will appear to hang.  This occurs because the dmu
    won't allow new txs to be assigned until that dirty data is
    flushed, and it won't be because it's not part of an assigned tx.

    As an aside, I typically see anon_size lurk around 16k so I think
    there is another place in the code which needs a similar fix.
    However, this value doesn't grow over time so it isn't critical.

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

commit 4b787d75c869a7f633607ecb17f3a7c482a553d2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Feb 27 10:12:40 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

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

    Additionally, ZFS_CONFIG has been added to zfs_config.h for
    packages which build against these headers.  This is critical
    to ensure both zfs and the dependant package are using the same
    prototype and structure definitions.

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

commit 570827e129ed81e066e894530bbe24642f473154
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 20 10:58:57 2012 -0800

    Add 'dmu_tx' kstats entry

    Keep counters for the various reasons that a thread may end up
    in txg_wait_open() waiting on a new txg.  This can be useful
    when attempting to determine why a particular workload is
    under performing.

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

commit 13be560d89e9de63bdf63e8187af2ceb90cf094d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 30 13:28:40 2012 -0800

    Add arc_state_t stats to arcstats

    To ensure the arc is behaving properly we need greater visibility
    in to exactly how it's managing the systems memory.  This patch
    takes one step in that direction be adding the current arc_state_t
    for the anon, mru, mru_ghost, mfu, and mfs_ghost lists.  The l2
    arc_state_t is already well represented in the arcstats.

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

commit 3a4f6caf08c095397f87f8e6fc5d734a56fff9c9
Author: Ned Bass <bass6@llnl.gov>
Date:   Fri Feb 24 16:37:41 2012 -0800

    Return success from check_slice() if device doesn't exist

    When creating a new pool, make_root_vdev() calls check_in_use() to
    ensure that none of the consituent disks are in use.  If the disk
    contains a valid vdev label it is read to retrieve the list of its
    child vdevs and these are checked recursively.  However, the
    partitions stored in the vdev label my no longer exist, for example
    if the partition table has since been altered.  In any such case we
    would want the pool creation to proceed, so this change removes the
    check from check_slice() that returns an error if the device doesn't
    exist.  As an added assurance, the Solaris implementation also
    returns sucess on ENOENT.

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

commit a473d90ceeb57a7e63b35fdc82486251b162df0e
Author: Alex Zhuravlev <bzzz@whamcloud.com>
Date:   Fri Feb 17 12:09:21 2012 -0800

    Export symbols for zero-copy

    Export additional symbols to make use of the DMU's zero-copy
    API.  This allows external modules to move data in to and out of
    the ARC without incurring the cost of a memory copy.

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

commit b41c9906dcc0d75099cba8374420a513a253beff
Author: Richard Yao <ryao@cs.stonybrook.edu>
Date:   Mon Feb 13 10:38:58 2012 -0500

    Support ashift=13 for 8KB SSD block sizes

    New SSDs are now available which use an internal 8k block size.
    To make sure ZFS can get the maximum performance out of these
    devices we're increasing the maximum ashift to 13 (8KB).

    This value is still small enough that we can fit 16 uberblocks
    in the vdev ring label.  However, I don't want to increase this
    any futher or it will limit the ability the safely roll back a
    pool to recover it.

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

commit d2e032ca9cd62fd0e80cdce30c6d1c40421bf754
Author: Turbo Fredriksson <turbo@bayour.com>
Date:   Mon Feb 13 10:27:01 2012 +0100

    Add 'fsid' mount option to allowed options.

    Resolves nfs-utils-1.0.x compatibility issue which requires
    that the fsid be set in the export options.

      exportfs: Warning: /tank/dir requires fsid= for NFS export

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

commit b10c77f70acc188f979ef85e922e854822ac0705
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 10 11:53:09 2012 -0800

    Export symbols for zero-copy

    Exported the required symbols to make use of the DMU's zero-copy
    API.  This allows external modules to move data in to and out of
    the ARC without incurring the cost of a memory copy.

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

commit a31acb462d70aea9bbd5f0c96f7df109e2dde5aa
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 9 16:33:55 2012 -0800

    Use spl_debug_* helpers

    When configuring the spl debug log support use the provided wrapper
    functions.  This ensures that if --disable-debug-log was used when
    buiding the spl the functions will have no effect.

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

commit 30930fba219642cb1dadf1c8ef60ff799e3dc424
Author: Etienne Dechamps <etienne.dechamps@ovh.net>
Date:   Fri Sep 2 15:23:12 2011 +0200

    Add support for DISCARD to ZVOLs.

    DISCARD (REQ_DISCARD, BLKDISCARD) is useful for thin provisioning.
    It allows ZVOL clients to discard (unmap, trim) block ranges from
    a ZVOL, thus optimizing disk space usage by allowing a ZVOL to
    shrink instead of just grow.

    We can't use zfs_space() or zfs_freesp() here, since these functions
    only work on regular files, not volumes. Fortunately we can use the
    low-level function dmu_free_long_range() which does exactly what we
    want.

    Currently the discard operation is not added to the log. That's not
    a big deal since losing discard requests cannot result in data
    corruption. It would however result in disk space usage higher than
    it should be. Thus adding log support to zvol_discard() is probably
    a good idea for a future improvement.

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

commit cb2d19010d8fbcf6c22585cd8763fad3ba7db724
Author: Etienne Dechamps <etienne.dechamps@ovh.net>
Date:   Fri Sep 2 09:42:07 2011 +0200

    Support the fallocate() file operation.

    Currently only the (FALLOC_FL_PUNCH_HOLE) flag combination is
    supported, since it's the only one that matches the behavior of
    zfs_space(). This makes it pretty much useless in its current
    form, but it's a start.

    To support other flag combinations we would need to modify
    zfs_space() to make it more flexible, or emulate the desired
    functionality in zpl_fallocate().

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

commit aec69371a6a2e94534809c5e9ba22e7b0e276937
Author: Etienne Dechamps <etienne.dechamps@ovh.net>
Date:   Fri Sep 2 09:37:53 2011 +0200

    Check permissions in zfs_space().

    This isn't done on Solaris because on this OS zfs_space() can
    only be called with an opened file handle. Since the addition of
    zpl_truncate_range() this isn't the case anymore, so we need to
    enforce access rights.

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

commit 5cb63a57f8d2d1a94e65b4710bfbb221b1a71700
Author: Etienne Dechamps <etienne.dechamps@ovh.net>
Date:   Thu Sep 1 13:59:41 2011 +0200

    Implement the truncate_range() inode operation.

    This operation allows "hole punching" in ZFS files. On Solaris this
    is done via the vop_space() system call, which maps to the zfs_space()
    function. So we just need to write zpl_truncate_range() as a wrapper
    around zfs_space().

    Note that this only works for regular files, not ZVOLs.

    This is currently an insecure implementation without permission
    checking, although this isn't that big of a deal since truncate_range()
    isn't even callable from userspace.

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

commit 93648f314c258897a0fa72b0d0b164e1937a5b63
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 9 10:38:03 2012 -0800

    Fix zconfig.sh non-optimal alignment

    The recent zvol improvements have changed default suggested alignment
    for zvols from 512b (default) to 8k (zvol blocksize).  Because of this
    the zconfig.sh tests which create paritions are now generating a
    warning about non-optimal alignments.

    This change updates the need zconfig.sh tests such that a partition
    will be properly aligned.  In the process, it shifts from using the
    sfdisk utility to the parted utility to create partitions.  It also
    moves the creation of labels, partitions, and filesystems in to
    generic functions in common.sh.in.

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

commit dde9380a1bf9084d0c8a3e073cdd65bb81db1a23
Author: Etienne Dechamps <e-t172@akegroup.org>
Date:   Wed Feb 8 22:41:41 2012 +0100

    Use 32 as the default number of zvol threads.

    Currently, the `zvol_threads` variable, which controls the number of worker
    threads which process items from the ZVOL queues, is set to the number of
    available CPUs.

    This choice seems to be based on the assumption that ZVOL threads are
    CPU-bound. This is not necessarily true, especially for synchronous writes.
    Consider the situation described in the comments for `zil_commit()`, which is
    called inside `zvol_write()` for synchronous writes:

    > itxs are committed in batches. In a heavily stressed zil there will be a
    > commit writer thread who is writing out a bunch of itxs to the log for a
    > set of committing threads (cthreads) in the same batch as the writer.
    > Those cthreads are all waiting on the same cv for that batch.
    >
    > There will also be a different and growing batch of threads that are
    > waiting to commit (qthreads). When the committing batch completes a
    > transition occurs such that the cthreads exit and the qthreads become
    > cthreads. One of the new cthreads becomes he writer thread for the batch.
    > Any new threads arriving become new qthreads.

    We can easily deduce that, in the case of ZVOLs, there can be a maximum of
    `zvol_threads` cthreads and qthreads. The default value for `zvol_threads` is
    typically between 1 and 8, which is way too low in this case. This means
    there will be a lot of small commits to the ZIL, which is very inefficient
    compared to a few big commits, especially since we have to wait for the data
    to be on stable storage. Increasing the number of threads will increase the
    amount of data waiting to be commited and thus the size of the individual
    commits.

    On my system, in the context of VM disk image storage (lots of small
    synchronous writes), increasing `zvol_threads` from 8 to 32 results in a 50%
    increase in sequential synchronous write performance.

    We should choose a more sensible default for `zvol_threads`. Unfortunately
    the optimal value is difficult to determine automatically, since it depends
    on the synchronous write latency of the underlying storage devices. In any
    case, a hardcoded value of 32 would probably be better than the current
    situation. Having a lot of ZVOL threads doesn't seem to have any real
    downside anyway.

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

commit 34037afe24e0bff97cf5262f8f1a76f5e0815dc1
Author: Etienne Dechamps <etienne.dechamps@ovh.net>
Date:   Mon Sep 5 15:15:45 2011 +0200

    Improve ZVOL queue behavior.

    The Linux block device queue subsystem exposes a number of configurable
    settings described in Linux block/blk-settings.c. The defaults for these
    settings are tuned for hard drives, and are not optimized for ZVOLs. Proper
    configuration of these options would allow upper layers (I/O scheduler) to
    take better decisions about write merging and ordering.

    Detailed rationale:

     - max_hw_sectors is set to unlimited (UINT_MAX). zvol_write() is able to
       handle writes of any size, so there's no reason to impose a limit. Let the
       upper layer decide.

     - max_segments and max_segment_size are set to unlimited. zvol_write() will
       copy the requests' contents into a dbuf anyway, so the number and size of
       the segments are irrelevant. Let the upper layer decide.

     - physical_block_size and io_opt are set to the ZVOL's block size. This
       has the potential to somewhat alleviate issue #361 for ZVOLs, by warning
       the upper layers that writes smaller than the volume's block size will be
       slow.

     - The NONROT flag is set to indicate this isn't a rotational device.
       Although the backing zpool might be composed of rotational devices, the
       resulting ZVOL often doesn't exhibit the same behavior due to the COW
       mechanisms used by ZFS. Setting this flag will prevent upper layers from
       making useless decisions (such as reordering writes) based on incorrect
       assumptions about the behavior of the ZVOL.

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

commit b18019d2d810585185493c62e9567fa85e51692c
Author: Etienne Dechamps <etienne.dechamps@ovh.net>
Date:   Mon Sep 5 11:11:38 2011 +0200

    Fix synchronicity for ZVOLs.

    zvol_write() assumes that the write request must be written to stable storage
    if rq_is_sync() is true. Unfortunately, this assumption is incorrect. Indeed,
    "sync" does *not* mean what we think it means in the context of the Linux
    block layer. This is well explained in linux/fs.h:

        WRITE:       A normal async write. Device will be plugged.
        WRITE_SYNC:  Synchronous write. Identical to WRITE, but passes down
                     the hint that someone will be waiting on this IO
                     shortly.
        WRITE_FLUSH: Like WRITE_SYNC but with preceding cache flush.
        WRITE_FUA:   Like WRITE_SYNC but data is guaranteed to be on
                     non-volatile media on completion.

    In other words, SYNC does not *mean* that the write must be on stable storage
    on completion. It just means that someone is waiting on us to complete the
    write request. Thus triggering a ZIL commit for each SYNC write request on a
    ZVOL is unnecessary and harmful for performance. To make matters worse, ZVOL
    users have no way to express that they actually want data to be written to
    stable storage, which means the ZIL is broken for ZVOLs.

    The request for stable storage is expressed by the FUA flag, so we must
    commit the ZIL after the write if the FUA flag is set. In addition, we must
    commit the ZIL before the write if the FLUSH flag is set.

    Also, we must inform the block layer that we actually support FLUSH and FUA.

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

commit 56c34bac44d47898809c46db3e5444511bbe0ef6
Author: Etienne Dechamps <etienne.dechamps@ovh.net>
Date:   Fri Sep 2 09:57:35 2011 +0200

    Support "sync=always" for ZVOLs.

    Currently the "sync=always" property works for regular ZFS datasets, but not
    for ZVOLs. This patch remedies that.

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

commit e67329d8e0befe79016bd3e4d52435552c554a52
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sat Feb 4 20:54:43 2012 -0600

    Let libnvpair be linked independently of libzfs.

    Autoconf will fail to detect the ZoL libnvpair on systems that do not
    implicitly link library runtime dependencies, which is anything that
    has the GCC 4.5 DCO update.

    Build libuutil before libnvpair, and put it on the the LDADD line of
    the libnvpair automake template.

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

commit 47621f3d76abf63e178b95a446134565cc553b1a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 2 11:55:48 2012 -0800

    Linux 3.3 compat, sops->show_options()

    The second argument of sops->show_options() was changed from a
    'struct vfsmount *' to a 'struct dentry *'.  Add an autoconf check
    to detect the API change and then conditionally define the expected
    interface.  In either case we are only interested in the zfs_sb_t.

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

commit d7e398ce1a3e6f9c705af43955a684685a798c32
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 20 15:02:57 2012 -0800

    Cleanup ZFS debug infrastructure

    Historically the internal zfs debug infrastructure has been
    scattered throughout the code.  Since we expect to start making
    more use of this code this patch performs some cleanup.

    * Consolidate the zfs debug infrastructure in the zfs_debug.[ch]
      files.  This includes moving the zfs_flags and zfs_recover
      variables, plus moving the zfs_panic_recover() function.

    * Remove the existing unused functionality in zfs_debug.c and
      replace it with code which correctly utilized the spl logging
      infrastructure.

    * Remove the __dprintf() function from zfs_ioctl.c.  This is
      dead code, the dprintf() functionality in the kernel relies
      on the spl log support.

    * Remove dprintf() from hdr_recl().  This wasn't particularly
      useful and was missing the required format specifier anyway.

    * Subsequent patches should unify the dprintf() and zfs_dbgmsg()
      functions.

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

commit 0c5dde492ff4fadcc9c43477c81b3d3824ac41db
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 27 13:43:23 2012 -0800

    Allow multiple values per directory entry

    When using zfs to back a Lustre filesystem it's advantageous to
    to store a fid with the object id in the directory zap.  The only
    technical impediment to doing this is that the zpl code expects
    a single value in the zap per directory entry.

    This change relaxes that requirement such that multiple entries
    are allowed provided the first one is the object id.  The zpl
    code will just ignore additional entries.  This allows the ZoL
    count to mount datasets which are being used as Lustre server
    backends.

    Once the upstream feature flags support is merged in this change
    should be updated to a read-only feature.  Until this occurs
    other zfs implementations will not be able to read the zfs
    filesystems created by Lustre.

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

commit e29be02e46ba2470795c9ab12e6da12d58ff2e5a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 27 09:15:42 2012 -0800

    Export symbol zfs_attr_table

    Export the zfs_attr_table symbol so it may be used by non-zpl
    consumers which are still interested in writing a zpl compatible
    dataset (e.g. Lustre).

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

commit ff998d804ff2fec3adc91fd0e78d25998094aca9
Author: Prakash Surya <surya1@llnl.gov>
Date:   Wed Jan 18 15:31:52 2012 -0800

    Ignore dataset if the dds_type is DMU_OST_OTHER

    Since the zpios and potentially other ZFS tests use the
    DMU_OST_OTHER type to label their datasets, the zpool and
    zfs commands should gracefully handle this type when it is
    encountered.  This patch modifies the commands' behavior
    to ignore any datasets with a dds_type of DMU_OST_OTHER.

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

commit b4b599d2508296a9dac0abe29532fc0884f299b7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 17 16:20:43 2012 -0800

    Fix rpm dependencies

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

    * The zfs-modules package is now tied to a specific build of
      the spl-modules packages based on the kernel version.  This
      ensures that the correct spl-modules packages will always get
      installed and not just the newest.

    * The zfs package now requires both the zfs-modules and spl
      packages.  Thus a 'yum install zfs' will pull in the minimal
      set of packages required for a functional system.

    * The zfs-devel packages now require the zfs package to be
      installed which is normal behavior for -devel packages.

    * 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 b40a77aefca3d0832396edd35f597100d152f163
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 17 16:19:43 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 f783130a1f11616632a7a6f519140f97389688a6
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Wed Jan 18 12:28:11 2012 -0600

    Allow GPT+EFI vdev replacement in boot pools.

    Commit zfsonlinux/zfs@57a4eddc4d5e1e6c10d8d7dcf87a9fc27398adcd
    allows the bootfs property to be set on any pool, but does not
    accommodate subsequent vdev changes. For example:

    	# zpool replace rpool /dev/sda /dev/sdb
    	operation not supported on this type of pool
    	property 'bootfs' is not supported on EFI labeled devices

    For non-Solaris builds, disable the check that emits this error.

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

commit 750562833f5009e1602e3b7d8f10497ee683f611
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sat Dec 31 17:30:52 2011 -0600

    Combine libraries: spl, avl, efi, share, unicode.

    These libraries, which are an artifact of the ZoL development
    process, conflict with packages that are already in distribution:

      * libspl: SPL Programming Language
      * libavl: AVL for Linux
      * libefi: GRUB

    And these libraries are potential conflicts:

      * libshare: the Linux Mount Manager
      * libunicode: Perl and Python

    Recompose these five ZoL components into the four libraries that are
    conventionally provided by Solaris and FreeBSD systems:

      + libnvpair
      + libuutil
      + libzpool
      + libzfs

    This change resolves the name conflict, makes ZoL more compatible
    with existing software that uses autotools to detect ZFS, and allows
    pkg-zfs to better reflect the official Debian kFreeBSD packaging.

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

commit 57a4eddc4d5e1e6c10d8d7dcf87a9fc27398adcd
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Jan 13 16:24:15 2012 -0600

    Allow setting bootfs on any pool

    The vdev_is_bootable() restrictions are no longer necessary
    with recent GRUB2 code.  FreeBSD has implemented the same
    change, except that I moved the Solaris comment to be inside
    the #ifdef __sun__ block.

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

commit 08d08ebba2247ad404001785a890de4281d0a362
Author: Ned Bass <bass6@llnl.gov>
Date:   Fri Jan 13 13:51:39 2012 -0800

    Reduce number of zio free threads

    As described in Issue #458 and #258, unlinking large amounts of data
    can cause the threads in the zio free wait queue to start spinning.
    Reducing the number of z_fr_iss threads from a fixed value of 100 to 1
    per cpu signficantly reduces contention on the taskq spinlock and
    improves throughput.

    Instrumenting the taskq code showed that __taskq_dispatch() can spend
    a long time holding tq->tq_lock if there are a large number of threads
    in the queue.  It turns out the time spent in wake_up() scales
    linearly with the number of threads in the queue.  When a large number
    of short work items are dispatched, as seems to be the case with
    unlink, the worker threads drain the queue faster than the dispatcher
    can fill it.  They then all pile into the work wait queue to wait for
    new work items.  So if 100 threads are in the queue, wake_up() takes
    about 100 times as long, and the woken threads have to spin until the
    dispatcher releases the lock.

    Reducing the number of threads helps with the symptoms, but doesn't
    get to the root of the problem.  It would seem that wake_up()
    shouldn't scale linearly in time with queue depth, particularly if we
    are only trying to wake up one thread.  In that vein, I tried making
    all of the waiting processes exclusive to prevent the scheduler from
    iterating over the entire list, but I still saw the linear time
    scaling.  So further investigation is needed, but in the meantime
    reducing the thread count is an easy workaround.

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

commit a8783adf24a8c40dcae0fbfa90eb231212f26884
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 13 11:35:05 2012 -0800

    Increase link count limit to 2^31-1

    Originally, the per-file link limit was set to 65536 because the
    exact Linux VFS limit was unclear.  Internally ZFS is able to
    support 64-bit link counts.  After a more careful investigation
    the limit can be safely raised to 2^31-1.

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

commit 58d956b085c31bde695d03dbf415e118cd350e0f
Author: Prakash Surya <surya1@llnl.gov>
Date:   Thu Jan 12 17:24:05 2012 -0800

    Run ZFS_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, ZFS_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 #517

commit e18be9a637088911d2b618788cd45982986e63cb
Author: Suman Chakravartula <suman@gogrid.com>
Date:   Wed Jan 11 16:48:02 2012 -0800

    Add overlay(-O) mount option support

    Linux supports mounting over non-empty directories by default.
    In Solaris this is not the case and -O option is required for
    zfs mount to mount a zfs filesystem over a non-empty directory.

    For compatibility, I've added support for -O option to mount
    zfs filesystems over non-empty directories if the user wants
    to, just like in Solaris.

    I've defined MS_OVERLAY to record it in the flags variable if
    the -O option is supplied.  The flags variable passes through
    a few functions and its checked before performing the empty
    directory check in zfs_mount function.  If -O is given, the
    check is not performed.

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

commit 96b91ef0d6b289037c4d54357901e4b694e08f02
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Thu Jan 5 14:27:36 2012 -0600

    Apply the ZoL coding standard to zpl_xattr.c

    Make the indenting in the zpl_xattr.c file consistent with the Sun
    coding standard by removing soft tabs.

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

commit 166dd49de0272e6f179e5fd6a41eebb4880a1154
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 12 13:59:44 2012 -0800

    Linux 3.2 compat, security_inode_init_security()

    The security_inode_init_security() API has been changed to include
    a filesystem specific callback to write security extended attributes.
    This was done to support the initialization of multiple LSM xattrs
    and the EVM xattr.

    This change updates the code to use the new API when it's available.
    Otherwise it falls back to the previous implementation.

    In addition, the ZFS_AC_KERNEL_6ARGS_SECURITY_INODE_INIT_SECURITY
    autoconf test has been made more rigerous by passing the expected
    types.  This is done to ensure we always properly the detect the
    correct form for the security_inode_init_security() API.

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

commit 2932b6a8004df8417036894d7d2e7e151cc95434
Author: Richard Laager <rlaager@wiktel.com>
Date:   Mon Jan 9 16:50:26 2012 -0600

    Treat /dev/vd* as whole disks

    Correctly detect /dev/vd devices as whole disks and attempt to
    create an EFI partition table.

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

commit b97f368d047943607b5b263331d7e2075ab3ffe8
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Fri Dec 30 14:18:58 2011 -0600

    Avoid using awk in the zpool_id script.

    Some implementations of `awk` incorrectly parse the \< and \> regex
    symbols, so use a `while read` loop and regular globbing instead.

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

commit ab26409db753bb087842ab6f1af943f3386c764f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 22 12:20:43 2011 -0800

    Linux 3.1 compat, super_block->s_shrink

    The Linux 3.1 kernel has introduced the concept of per-filesystem
    shrinkers which are directly assoicated with a super block.  Prior
    to this change there was one shared global shrinker.

    The zfs code relied on being able to call the global shrinker when
    the arc_meta_limit was exceeded.  This would cause the VFS to drop
    references on a fraction of the dentries in the dcache.  The ARC
    could then safely reclaim the memory used by these entries and
    honor the arc_meta_limit.  Unfortunately, when per-filesystem
    shrinkers were added the old interfaces were made unavailable.

    This change adds support to use the new per-filesystem shrinker
    interface so we can continue to honor the arc_meta_limit.  The
    major benefit of the new interface is that we can now target
    only the zfs filesystem for dentry and inode pruning.  Thus we
    can minimize any impact on the caching of other filesystems.

    In the context of making this change several other important
    issues related to managing the ARC were addressed, they include:

    * The dnlc_reduce_cache() function which was called by the ARC
    to drop dentries for the Posix layer was replaced with a generic
    zfs_prune_t callback.  The ZPL layer now registers a callback to
    drop these dentries removing a layering violation which dates
    back to the Solaris code.  This callback can also be used by
    other ARC consumers such as Lustre.

      arc_add_prune_callback()
      arc_remove_prune_callback()

    * The arc_reduce_dnlc_percent module option has been changed to
    arc_meta_prune for clarity.  The dnlc functions are specific to
    Solaris's VFS and have already been largely eliminated already.
    The replacement tunable now represents the number of bytes the
    prune callback will request when invoked.

    * Less aggressively invoke the prune callback.  We used to call
    this whenever we exceeded the arc_meta_limit however that's not
    strictly correct since it results in over zeleous reclaim of
    dentries and inodes.  It is now only called once the arc_meta_limit
    is exceeded and every effort has been made to evict other data from
    the ARC cache.

    * More promptly manage exceeding the arc_meta_limit.  When reading
    meta data in to the cache if a buffer was unable to be recycled
    notify the arc_reclaim thread to invoke the required prune.

    * Added arcstat_prune kstat which is incremented when the ARC
    is forced to request that a consumer prune its cache.  Remember
    this will only occur when the ARC has no other choice.  If it
    can evict buffers safely without invoking the prune callback
    it will.

    * This change is also expected to resolve the unexpect collapses
    of the ARC cache.  This would occur because when exceeded just the
    arc_meta_limit reclaim presure would be excerted on the arc_c
    value via arc_shrink().  This effectively shrunk the entire cache
    when really we just needed to reclaim meta data.

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

commit 8eaa020b46e80b09cc5f924b90809e219ce08e75
Author: Prakash Surya <surya1@llnl.gov>
Date:   Fri Dec 16 22:32:54 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>

commit afd7da0ce72c3b3554079644d73e90fe6d2bf955
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Fri Dec 16 19:02:41 2011 -0600

    Add LIBSELINUX to mount_zfs_LDFLAGS.

    Regenerating the autotools configuration on Debian and Ubuntu systems
    causes compilation to fail with this error message:

      cmd/mount_zfs/../../cmd/mount_zfs/mount_zfs.c:403:
        undefined reference to `is_selinux_enabled'

    In the automake template, set "mount_zfs_LDFLAGS = ... $(LIBSELINUX)"
    so that the /sbin/mount.zfs utility is linked to libselinux.

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

commit 28eb9213d89cb25438fcecb86e735cc3edc26ea4
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Fri Dec 16 15:15:12 2011 -0600

    Linux 3.2 compat: set_nlink()

    Directly changing inode->i_nlink is deprecated in Linux 3.2 by commit

      SHA: bfe8684869601dacfcb2cd69ef8cfd9045f62170

    Use the new set_nlink() kernel function instead.

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

commit e6101ea87f5127c549d520aad124290857218fa5
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Fri Dec 16 14:17:00 2011 -0600

    Update the character class in the zpool man page.

    ZoL and all Solaris derivatives allow pool names to contain the colon
    and space characters. Update the man page to reflect current behavior.

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

commit 6ba3b44614fa6482bd2d7363964b65f0289b0f4f
Author: Prakash Surya <surya1@llnl.gov>
Date:   Wed Dec 7 17:02:42 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 the Arch Linux machine to create two binary packages compatible with
    the pacman package manager, one for the zfs userland utilities and
    another for the zfs 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 build 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 #491

commit a38718a63d79116d6cb614dd2821e2a3955e5c8c
Author: Garrett D'Amore <garrett@nexenta.com>
Date:   Mon Nov 7 16:26:52 2011 -0800

    Illumos #734: Use taskq_dispatch_ent() interface

    It has been observed that some of the hottest locks are those
    of the zio taskqs.  Contention on these locks can limit the
    rate at which zios are dispatched which limits performance.

    This upstream change from Illumos uses new interface to the
    taskqs which allow them to utilize a prealloc'ed taskq_ent_t.
    This removes the need to perform an allocation at dispatch
    time while holding the contended lock.  This has the effect
    of improving system performance.

    Reviewed by: Albert Lee <trisk@nexenta.com>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Reviewed by: Alexey Zaytsev <alexey.zaytsev@nexenta.com>
    Reviewed by: Jason Brian King <jason.brian.king@gmail.com>
    Reviewed by: George Wilson <gwilson@zfsmail.com>
    Reviewed by: Adam Leventhal <ahl@delphix.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

    References to Illumos issue:
      https://www.illumos.org/issues/734

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

commit 30a9524e45f76d4c7860bcbf5567aeaa8aeb7a82
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 7 09:23:44 2011 -0800

    Set zvol_major/zvol_threads permissions

    The zvol_major and zvol_threads module options were being created
    with 0 permission bits.  This prevented them from being listed in
    the /sys/module/zfs/parameters/ directory, although they were
    visible in `modinfo zfs`.  This patch fixes the issue by updating
    the permission bits to 0444.  For the moment these options must
    be read-only because they are used during module initialization.

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

commit 23bdb07d4e4c435205d25d3efdb5fef2d089ce5e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Dec 5 10:08:29 2011 -0800

    Update default ARC memory limits

    In the upstream OpenSolaris ZFS code the maximum ARC usage is
    limited to 3/4 of memory or all but 1GB, whichever is larger.
    Because of how Linux's VM subsystem is organized these defaults
    have proven to be too large which can lead to stability issues.

    To avoid making everyone manually tune the ARC the defaults are
    being changed to 1/2 of memory or all but 4GB.  The rational for
    this is as follows:

    * Desktop Systems (less than 8GB of memory)

      Limiting the ARC to 1/2 of memory is desirable for desktop
      systems which have highly dynamic memory requirements.  For
      example, launching your web browser can suddenly result in a
      demand for several gigabytes of memory.  This memory must be
      reclaimed from the ARC cache which can take some time.  The
      user will experience this reclaim time as a sluggish system
      with poor interactive performance.  Thus in this case it is
      preferable to leave the memory as free and available for
      immediate use.

    * Server Systems (more than 8GB of memory)

      Using all but 4GB of memory for the ARC is preferable for
      server systems.  These systems often run with minimal user
      interaction and have long running daemons with relatively
      stable memory demands.  These systems will benefit most by
      having as much data cached in memory as possible.

    These values should work well for most configurations.  However,
    if you have a desktop system with more than 8GB of memory you may
    wish to further restrict the ARC.  This can still be accomplished
    by setting the 'zfs_arc_max' module option.

    Additionally, keep in mind these aren't currently hard limits.
    The ARC is based on a slab implementation which can suffer from
    memory fragmentation.  Because this fragmentation is not visible
    from the ARC it may believe it is within the specified limits while
    actually consuming slightly more memory.  How much more memory get's
    consumed will be determined by how badly fragmented the slabs are.

    In the long term this can be mitigated by slab defragmentation code
    which was OpenSolaris solution.  Or preferably, using the page cache
    to back the ARC under Linux would be even better.  See issue #75
    for the benefits of more tightly integrating with the page cache.

    This change also fixes a issue where the default ARC max was being
    set incorrectly for machines with less than 2GB of memory.  The
    constant in the arc_c_max comparison must be explicitly cast to
    a uint64_t type to prevent overflow and the wrong conditional
    branch being taken.  This failure was typically observed in VMs
    which are commonly created with less than 2GB of memory.

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

commit 660cbada0fca3b5504562adcf21a35f9195f46a0
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sun Dec 4 15:32:18 2011 -0600

    Quote variables in the zfs.lsb script.

    For consistency and safety, quote all variables in the zfs.lsb script.
    This protects in the unlikely case that any of the file names contain
    whitespace.

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

commit c2d9c41d5084db354d80c03fea4fb0bb97327c0a
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sun Dec 4 14:18:28 2011 -0600

    Source /etc/default/zfs after setting defaults.

    Let the administrator override all script variables by sourcing the
    /etc/default/zfs file after the default values are set.

    The spelling mistake in the old path name makes it unlikely that this
    bug affected any users.

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

commit db7c1771da2634af4e2a4323759656c7f0afe689
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sun Dec 4 14:01:58 2011 -0600

    Demote the whackbang in the zpool_id script.

    The zpool_id script is posixly correct and does not use bash
    features, so change its whackbang from /bin/bash to /bin/sh.

    Debian policy also stipulates that system scripts be dash compatible.

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

commit 87193e2b6111d6080df90c2c8e03ce49b14e031a
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sun Dec 4 13:58:53 2011 -0600

    Demote egrep to grep in the zpool_id script.

    Direct invocation of GNU egrep is deprecated by its man page, and the
    its argument in the zpool_id script is not an extended expression.

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

commit 04bf5ecc1f04ed5955ab9951c833d6b08db57356
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sun Dec 4 13:50:27 2011 -0600

    Quote variables in the zpool_id script.

    For consistency and safety, quote all variables in the zpool_id
    script. This accomodates a `-c CONFIG` parameter value with
    whitespace in the path name.

    Also fix a typo in the usage synopsis for `-h`.

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

commit 9c8254f6f95b2b08e2031b2682a632e0df45cefb
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sun Dec 4 13:10:46 2011 -0600

    Support path_id changes in udev 174.

    The /lib/udev/path_id helper became a builtin command in the udev 174
    release, so test whether path_id is external in the zpool_id script.

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

commit 590338f63ee0db6f1fc7e6b5b23744d3944777b2
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sat Dec 3 23:01:06 2011 +0100

    Added comments for libshare's NFS functions.

    Some of the functions' purpose wasn't immediately obvious without
    additional explanations. This commit adds these missing comments.

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

commit b9c59ec83ab50e1cd097f067461e34a5750694c8
Author: Prakash Surya <surya1@llnl.gov>
Date:   Tue Nov 29 14:31:20 2011 -0800

    Fix configure tests to play nice with GCC 4.6

    As of GCC 4.6, specific kernel 2.6.32 header files do not compile
    cleanly without warnings. One specific example of this is the
    arch/x86/include/asm/percpu.h file. Thus, a few of the configure tests
    were getting hung up on this and the '-Wno-unsued-but-set-variables'
    compile option had to be introduced.

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

commit f31b3ebe6e6c9de4db30bf752c09a8300b305258
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 29 09:05:04 2011 -0800

    Allow xattrs on symlinks

    The Solaris version of ZFS does not allow xattrs to be set on
    symlinks due to the way they implemented the attropen() system
    call.  Linux however implements xattrs through the lgetxattr()
    and lsetxattr() system calls which do not have this limitation.

    The only reason this hasn't always worked under ZFS on Linux
    is that the xattr handlers were not registered for symlink type
    inodes.  This was done simply to be consistent with the Solaris
    behavior.

    Upon futher reflection I believe this should be allowed under
    Linux.  The only ill effect would be that the xattrs on symlinks
    will not be visible when the pool is imported on a Solaris
    system.  This also has the benefit that it allows for SELinux
    style security xattr labeling which expects to be able to set
    xattrs on all inode types.

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

commit 82a37189aac955c81a59a5ecc3400475adb56355
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Oct 24 16:55:20 2011 -0700

    Implement SA based xattrs

    The current ZFS implementation stores xattrs on disk using a hidden
    directory.  In this directory a file name represents the xattr name
    and the file contexts are the xattr binary data.  This approach is
    very flexible and allows for arbitrarily large xattrs.  However,
    it also suffers from a significant performance penalty.  Accessing
    a single xattr can requires up to three disk seeks.

      1) Lookup the dnode object.
      2) Lookup the dnodes's xattr directory object.
      3) Lookup the xattr object in the directory.

    To avoid this performance penalty Linux filesystems such as ext3
    and xfs try to store the xattr as part of the inode on disk.  When
    the xattr is to large to store in the inode then a single external
    block is allocated for them.  In practice most xattrs are small
    and this approach works well.

    The addition of System Attributes (SA) to zfs provides us a clean
    way to make this optimization.  When the dataset property 'xattr=sa'
    is set then xattrs will be preferentially stored as System Attributes.
    This allows tiny xattrs (~100 bytes) to be stored with the dnode and
    up to 64k of xattrs to be stored in the spill block.  If additional
    xattr space is required, which is unlikely under Linux, they will be
    stored using the traditional directory approach.

    This optimization results in roughly a 3x performance improvement
    when accessing xattrs which brings zfs roughly to parity with ext4
    and xfs (see table below).  When multiple xattrs are stored per-file
    the performance improvements are even greater because all of the
    xattrs stored in the spill block will be cached.

    However, by default SA based xattrs are disabled in the Linux port
    to maximize compatibility with other implementations.  If you do
    enable SA based xattrs then they will not be visible on platforms
    which do not support this feature.

    ----------------------------------------------------------------------
       Time in seconds to get/set one xattr of N bytes on 100,000 files
    ------+--------------------------------+------------------------------
          |            setxattr            |            getxattr
    bytes |  ext4     xfs zfs-dir  zfs-sa  |  ext4     xfs zfs-dir  zfs-sa
    ------+--------------------------------+------------------------------
    1     |  2.33   31.88   21.50    4.57  |  2.35    2.64    6.29    2.43
    32    |  2.79   30.68   21.98    4.60  |  2.44    2.59    6.78    2.48
    256   |  3.25   31.99   21.36    5.92  |  2.32    2.71    6.22    3.14
    1024  |  3.30   32.61   22.83    8.45  |  2.40    2.79    6.24    3.27
    4096  |  3.57  317.46   22.52   10.73  |  2.78   28.62    6.90    3.94
    16384 |   n/a 2342.39   34.30   19.20  |   n/a   45.44  145.90    7.55
    65536 |   n/a 2941.39  128.15  131.32* |   n/a  141.92  256.85  262.12*

    Legend:
    * ext4      - Stock RHEL6.1 ext4 mounted with '-o user_xattr'.
    * xfs       - Stock RHEL6.1 xfs mounted with default options.
    * zfs-dir   - Directory based xattrs only.
    * zfs-sa    - Prefer SAs but spill in to directories as needed, a
                  trailing * indicates overflow in to directories occured.

    NOTE: Ext4 supports 4096 bytes of xattr name/value pairs per file.
    NOTE: XFS and ZFS have no limit on xattr name/value pairs per file.
    NOTE: Linux limits individual name/value pairs to 65536 bytes.
    NOTE: All setattr/getattr's were done after dropping the cache.
    NOTE: All tests were run against a single hard drive.

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

commit e89236fd28cbe8585146b8b5d0ced1f8d4aa8431
Author: Prakash Surya <surya1@llnl.gov>
Date:   Thu Nov 24 16:37:27 2011 -0800

    In autoconf v2.68, AC_LANG_PROGRAM must be quoted

    This change updates the AC_LANG_PROGRAM autoconf macro invocations to be
    wrapped in quotes. As of autoconf version 2.68, the quotes are necessary
    to prevent warnings from appearing. Specifically, the autoconf v2.68
    Forward Porting Notes specifies:

        It is important to note that you need to ensure that the call to
        AC_LANG_SOURCE is quoted and not expanded, otherwise that will
        cause the warning to appear nonetheless.

    Finally, because of the additional quoting we can drop the extra
    quotas used by the ZFS_AC_CONFIG_USER_STACK_GUARD autoconf check.

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

commit ada8ec1ec5b0bfdab74bafda49e2f7a67dc7101d
Author: Suman Chakravartula <schakrava@gmail.com>
Date:   Sat Nov 19 11:53:12 2011 -0800

    Allow leading digits in userquota/groupquota names

    While setting/getting userquota and groupquota properties, the input
    was not treated as a possible username or groupname if it had a
    leading digit. While useradd in linux recommends the regexp
    [a-z_][a-z0-9_-]*[$]? , it is not enforced. This causes problem for
    usernames with leading digits in them. We need to be able to support
    getting and setting properties for this unconventional but possible
    input category

    I've updated the code to validate the username or groupname directly
    via the API. Also, note that I moved this validation to the beginning
    before the check for SID names with @. This also supports usernames
    with @ character in them which are valid. Only when input with @ is
    not a valid username, it is interpreted as a potential SID name.

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

commit ca5fd24984624146ebd1460d7554f42b0572e45f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 11 14:50:15 2011 -0800

    Limit maximum ashift value to 12

    While we initially allowed you to set your ashift as large as 17
    (SPA_MAXBLOCKSIZE) that is actually unsafe.  What wasn't considered
    at the time is that each uberblock written to the vdev label ring
    buffer will be of this size.  Now the buffer is statically sized
    to 128k and we need to be able to fit several uberblocks in it.
    With a large ashift that becomes a problem.

    Therefore I'm reducing the maximum configurable ashift value to 12.
    This is large enough for the 4k sector drives and small enough that
    we can still keep the most recent 32 uberblock in the vdev label
    ring buffer.

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

commit 09559cdd150fa0b610dd4f816292fd90f50fd0cb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Nov 10 10:22:39 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 adcd70bd1af405464d6dbc6b2057594cddda7a24
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 9 20:47:59 2011 -0800

    Linux 3.1 compat, fops->fsync()

    The Linux 3.1 kernel updated the fops->fsync() callback yet again.
    They now pass the requested range and delegate the responsibility
    for calling filemap_write_and_wait_range() to the callback.  In
    addition imutex is no longer held by the caller and the callback
    is responsible for taking the lock if required.

    This commit updates the code to provide a zpl_fsync() function
    for the updated API.  Implementations for the previous two APIs
    are also maintained for compatibility.

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

commit 8c19f5b407132b7ee1d6b7dc7c763f2ae80be976
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 8 11:07:02 2011 -0800

    Suppress packaging warning

    Only under Ubuntu Lucid the rpm packaging step mistakenly adds
    the following files twice to the package because of the /lib
    naming convention.  This is harmless but results in a warning
    which the buildot flags as a failure.  Suppress this warning.

      warning: File listed twice: /lib/udev/rules.d
      warning: File listed twice: /lib/udev/rules.d/60-zpool.rules
      warning: File listed twice: /lib/udev/rules.d/60-zvol.rules
      warning: File listed twice: /lib/udev/rules.d/90-zfs.rules
      warning: File listed twice: /lib/udev/sas_switch_id
      warning: File listed twice: /lib/udev/zpool_id
      warning: File listed twice: /lib/udev/zvol_id

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

commit 5547c2f1bf49802835fd6c52f15115ba344a2a8b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Nov 7 16:39:03 2011 -0800

    Simplify BDI integration

    Update the code to use the bdi_setup_and_register() helper to
    simplify the bdi integration code.  The updated code now just
    registers the bdi during mount and destroys it during unmount.

    The only complication is that for 2.6.32 - 2.6.33 kernels the
    helper wasn't available so in these cases the zfs code must
    provide it.  Luckily the bdi_setup_and_register() function
    is trivial.

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

commit 591fb62f19ee2431983a4cbeb0d200b1b8e7daf5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Nov 7 16:25:49 2011 -0800

    Disown dataset in zfs_sb_create()

    Fix an unlikely failure cause in zfs_sb_create() which could
    leave the dataset owned on error and thus unavailable until
    after a reboot.  Disown the dataset if SA are expected but
    are in fact missing.

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

commit ae6ba3dbe618bb7dbc46f2a3fb54c58243835d6b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 1 16:56:48 2011 -0700

    Improve meta data performance

    Profiling the system during meta data intensive workloads such
    as creating/removing millions of files, revealed that the system
    was cpu bound.  A large fraction of that cpu time was being spent
    waiting on the virtual address space spin lock.

    It turns out this was caused by certain heavily used kmem_caches
    being backed by virtual memory.  By default a kmem_cache will
    dynamically determine the type of memory used based on the object
    size.  For large objects virtual memory is usually preferable
    and for small object physical memory is a better choice.  See
    the spl_slab_alloc() function for a longer discussion on this.

    However, there is a certain amount of gray area when defining a
    'large' object.  For the following caches it turns out they were
    just over the line:

      * dnode_cache
      * zio_cache
      * zio_link_cache
      * zio_buf_512_cache
      * zfs_data_buf_512_cache

    Now because we know there will be a lot of churn in these caches,
    and because we know the slabs will still be reasonably sized.
    We can safely request with the KMC_KMEM flag that the caches be
    backed with physical memory addresses.  This entirely avoids the
    need to serialize on the virtual address space lock.

    As a bonus this also reduces our vmalloc usage which will be good
    for 32-bit kernels which have a very small virtual address space.
    It will also probably be good for interactive performance since
    unrelated processes could also block of this same global lock.
    Finally, we may see less cpu time being burned in the arc_reclaim
    and txg_sync_threads.

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

commit 6a95d0b74c2951f0dc82361ea279f64a7349f060
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Nov 1 13:07:41 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
    zpl_putpage() 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>
    Issue #287

commit a7b125e9a577cbf66ddbd7cf9701028ff150ee8e
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Thu Nov 3 06:48:13 2011 +0100

    Fix a race condition in zfs_getattr_fast()

    zfs_getattr_fast() was missing a lock on the ZFS superblock which
    could result in zfs_znode_dmu_fini() clearing the zp->z_sa_hdl member
    while zfs_getattr_fast() was accessing the znode. The result of this
    would usually be a panic.

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

commit c47516762758c989a443c0a6a9e38ae8fb46e6f1
Author: Xin Li <delphij@FreeBSD.org>
Date:   Fri Oct 21 16:39:53 2011 -0700

    Illumos #1661: Fix flaw in sa_find_sizes() calculation

    When calculating space needed for SA_BONUS buffers, hdrsize is
    always rounded up to next 8-aligned boundary. However, in two places
    the round up was done against sum of 'total' plus hdrsize. On the
    other hand, hdrsize increments by 4 each time, which means in certain
    conditions, we would end up returning with will_spill == 0 and
    (total + hdrsize) larger than full_space, leading to a failed
    assertion because it's invalid for dmu_set_bonus.

    Reviewed by: Matthew Ahrens <matt@delphix.com>
    Reviewed by: Dan McDonald <danmcd@nexenta.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

    References to Illumos issue:
      https://www.illumos.org/issues/1661

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

commit 3cee2262a6efd06031a2ff511f66e6a51f743e6a
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Sat Oct 22 10:44:03 2011 -0500

    Change sun.com URLs to zfsonlinux.org

    ZFS contains error messages that point to the defunct www.sun.com
    domain, which is currently offline.  Change these error messages
    to use the zfsonlinux.org mirror instead.

    This commit depends on:

      zfsonlinux/zfsonlinux.github.com@8e10ead3dc66e2204ae893d81528371405f107e7

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

commit 3bb1ac69942b7c1a89d741733b4a55b2facba420
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Oct 19 11:43:11 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 6f2255ba8ac93a86ec217775e8f9fc145bc52b39
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Oct 18 14:51:03 2011 -0700

    Set mtime on symbolic links

    Register the setattr/getattr callbacks for symlinks.  Without these
    the generic inode_setattr() and generic_fillattr() functions will
    be used.  In the setattr case this will only result in the inode being
    updated in memory, the dirty_inode callback would also normally run
    but none is registered for zfs.

    The straight forward fix is to set the setattr/getattr callbacks
    for symlinks so they are handled just like files and directories.

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

commit 8d35c1499de42a1910ac1bb3a9c537ddc43c7d4d
Author: Alexander Stetsenko <ams@nexenta.com>
Date:   Sun Oct 16 08:41:05 2011 +0200

    Illumos #755: dmu_recv_stream builds incomplete guid_to_ds_map

    An incomplete guid_to_ds_map would cause restore_write_byref() to fail
    while receiving a de-duplicated backup stream.

    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Garrett D`Amore <garrett@nexenta.com>
    Reviewed by: Gordon Ross <gwr@nexenta.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

    References to Illumos issue and patch:
    - https://www.illumos.org/issues/755
    - https://github.com/illumos/illumos-gate/commit/ec5cf9d53a

    Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #372

commit b385d7da6e3d21f0c0c23bf85212fe48758758c9
Author: Ned Bass <bass6@llnl.gov>
Date:   Mon Oct 17 11:43:55 2011 -0700

    Use @ZFS_META LICENSE@ in spec.in files

    zfs.spec.in and zfs-modules.spec.in had the License field incorrectly
    set to @LICENSE@, causing generated rpm packages to report an invalid
    license string.  Fix this by using @ZFS_META_LICENSE@.

    Signed-off-by: Ned Bass <bass6@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #422

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

commit 5cbf6db937a304c4d2b60878a2405a1e2900abdf
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Oct 11 14:36:42 2011 -0700

    Disable 90-zfs.rules for test suite

    When running the zconfig.sh, zpios-sanity.sh, and zfault.sh
    from the installed packages the 90-zfs.rules can cause failures.
    These will occur because the test suite assumes it has full
    control over loading/unloading the module stack.  If the stack
    gets asynchronously loaded by the udev rule the test suite
    will treat it as a failure.  Resolve the issue by disabling
    the offending rule during the tests and enabling it on exit.

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

commit 86f35f34f419f6eaff53b25f463c13f72186b103
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Oct 10 10:42:59 2011 -0700

    Export symbols for the VFS API

    Export all symbols already marked extern in the zfs_vfsops.h
    header.  Several non-static symbols have also been added to
    the header and exportewd.  This allows external modules to
    more easily create and manipulate properly created ZFS
    filesystem type datasets.

    Rename zfsvfs_teardown() to zfs_sb_teardown and export it.
    This is done simply for consistency with the rest of the code
    base.  All other zfsvfs_* functions have already been renamed.

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

commit 3646c3f2b5c2c54b3aef448aa136e04f85c6c656
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Oct 7 09:14:12 2011 -0700

    Add provides lustre-backend-fs to rpm

    The Lustre packages satify their backend fs requirement by
    checking that lustre-backend-fs is provided.  Update the zfs
    packaging accordingly.

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

commit 620c7598e4df6756238c56aec79601408822e44d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Oct 6 14:10:45 2011 -0700

    Prep zfs-0.6.0-rc6 tag

    Create the sixth 0.6.0 release candidate tag (rc6).

commit e45aa452988f721e458fa3abe54669bdf9377352
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 30 10:33:26 2011 -0700

    Export symbols for the full SA API

    Export all the symbols for the system attribute (SA) API.  This
    allows external module to cleanly manipulate the SAs associated
    with a dnode.  Documention for the SA API can be found in the
    module/zfs/sa.c source.

    This change also removes the zfs_sa_uprade_pre, and
    zfs_sa_uprade_post prototypes.  The functions themselves were
    dropped some time ago.

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

commit e8753fb4f03aaa371028aaec145449f2610229cf
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 30 10:33:26 2011 -0700

    Synchronize initramfs and system hostid

    Relying on an /etc/hostid file which is installed in the system
    image breaks diskless systems which share an image.  Certain
    cluster infrastructure such as MPI relies on all nodes having
    a unique hostid.  However, we still must be careful to ensure
    the hostid is syncronized between the initramfs and system
    images when using zfs root filesystems.

    To accompish this the automatically created /etc/hostid file has
    been removed from the spl rpm packaging.  The /etc/hostid file
    is now dynamically created for your initramfs as part of the
    dracut install process.  This avoids the need to install it in
    the actual system images.

    This change also resolves the spl_hostid parameter handling
    for dracut.

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

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

commit 6ebd8ef103c3ed4739987f36d77874f6953af89f
Author: Oleg Stepura <oleg@stepura.com>
Date:   Thu Sep 29 23:59:07 2011 +0300

    Fix 'unexpected operator' bashism

    The == operator is specific to bash, replace it with the more
    correct = operator for sh.  This bug can prevent correct booting
    when using a zfs root pool.

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

commit baab0630167f7539483af0f277aa6eeff39490d6
Author: Andreas Dilger <adilger@whamcloud.com>
Date:   Fri Sep 16 03:22:00 2011 -0600

    zpl: Fix "df -i" to have better free inodes value

    Due to the confusion in Linux statfs between f_frsize and f_bsize
    the blocks counts were changed to be in units of z_max_blksize
    instead of SPA_MINBLOCKSIZE as it is on other platforms.

    However, the free files calculation in zfs_statvfs() is limited by
    the free blocks count, since each dnode consumes one block/sector.
    This provided a reasonable estimate of free inodes, but on Linux
    this meant that the free inodes count was underestimated by a large
    amount, since 256 512-byte dnodes can fit into a 128kB block, and
    more if the max blocksize is increased to 1MB or larger.

    Also, the use of SPA_MINBLOCKSIZE is semantically incorrect since
    DNODE_SIZE may change to a value other than SPA_MINBLOCKSIZE and
    may even change per dataset, and devices with large sectors setting
    ashift will also use a larger blocksize.

    Correct the f_ffree calculation to use (availbytes >> DNODE_SHIFT)
    to more accurately compute the maximum number of dnodes that can
    be created.

    Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #413
    Closes #400

commit c70602f1eada6ae9d2c3442e3d469c7227d019ab
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Sep 27 16:32:53 2011 -0700

    Fix uninitialized varible in zfs_do_userspace()

    When compiling under Debian Lenny with gcc version 4.3.2
    (Debian 4.3.2-1.1) the following warning occurs.  To quiet
    the warning initialize 'error' to zero.  Newer versions of
    gcc correctly determine that this uninitialized varible is
    impossible because ZFS_NUM_USERQUOTA_PROPS is known to be
    greater than zero.

      cmd/zfs/zfs_main.c:2377: warning: "error" may be
      used uninitialized in this function

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

commit dee28b070057224dec67b779e80be14493a4ffb7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Sep 27 16:07:35 2011 -0700

    Export symbols for the full ZAP API

    Export all the symbols for the ZAP API.  This allows external modules
    to cleanly interface with ZAP type objects.  Previously only a subset
    of the functionality was exposed.  Documention for the ZAP API can be
    found in the sys/zap.h header.

    This change also removes a duplicate zap_increment_int() prototype.

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

commit 7a0232735d7527b08e02196762727994aa6065f9
Author: Zachary Bedell <zac@thebedells.org>
Date:   Sun Sep 18 21:35:42 2011 -0400

    Make libefi-created GPT compatible with gptfdisk

    GPT's created by libefi set the HeaderSize attribute in the GPT
    header to 512 -- size of the GPT header INCLUDING the 420 padding
    bytes at the end.  Most other tools set the size to 92 -- size of
    the actual header itself excluding the padding.  Most tools check
    the recorded HeaderSize when verifying CRC, but gptfdisk hardcodes
    92 and thus reports CRC verification problems for full-disk vdevs
    created IE with `zpool create pool sdc`.

    This commit changes libefi's behavior for GPT creation and also
    fixes several edge cases where libefi's behavior was similar
    (though in an incompatible manner) to gptfdisk.  Libefi assumed
    HeaderSize was always 512 even if the GPT recorded a different
    value.  Sanity checks of the GPT headersize read from disk were
    added before applying checksum calculation -- this will prevent
    segfault in cases of bogus on-disk values.

    Zpools created with the resuling libefi are verified as correct
    both by parted and gptfdisk.  Also pool have been tested to
    import correctly on ZFS on Linux as well as Solaris Express 11
    livecd.

    Signed-off-by: Zachary Bedell <zac@thebedells.org>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #344

commit c39b2786ac98ab87d6dda00aa83b399ed175055a
Author: Zachary Bedell <zac@thebedells.org>
Date:   Sat Sep 17 23:42:43 2011 -0400

    Fix boot failure in Dracut scripts.

    mount-zfs.sh script incorrectly parsed results from zpool list.  Correct
    bootfs attribute was only found on systems with a single pool or where
    the bootable pool's name alphabetized to before all other pool names.
    Boot failed when the bootable pool's name came after other pools
    (IE 'rpool' and 'mypool' would fail to find bootfs on rpool.)

    Patch correctly discards pools whose bootfs attribute is blank ('-').

    Signed-off-by: Zachary Bedell <zac@thebedells.org>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #402

commit f021fe194fec75ba1196638ca00301ba3b54ae85
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Sep 22 15:36:42 2011 -0700

    Use automatic variable in Makefile

    As written, the $(init_SCRIPTS) rule in etc/init.d/Makefule.am
    would not work as expected if the init_SCRIPTS variable were
    to contain any elements other than zfs.  Fix this by replacing
    the hard-coded 'zfs' reference with $@.

    Signed-off-by: Ned Bass <bass6@llnl.gov>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #410

commit fa6e5ced2fba92555019c7bc09b4c4b98c1a5323
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Sep 15 20:23:50 2011 -0700

    Suppress kmem_alloc() warning in zfs_prop_set_special()

    Suppress the warning for this large kmem_alloc() because it is not
    that far over the warning threshhold (8k) and it is short lived.

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

commit a65666f63856653faa9e4a7f35690b73512641ce
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Sep 12 11:42:33 2011 -0700

    Install zfs-devel headers in /usr/include

    The zfs-devel header files for linking with the libspl/libzfs
    libraries should be installed under /usr/include not /include.
    Ensure the correct install location is used when building an
    rpm package.

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

commit 2708f716c0f009bad754b8b94063526fab2048e9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 9 10:24:55 2011 -0700

    Fix usage of zsb after free

    Caught by code inspection, the variable zsb was referenced after
    being freed.  Move the kmem_free() to the end of the function.

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

commit 185853d9f202b306d9c316b66b774c498ed6577c
Author: Jeremy Gill <jgill@parallax-innovations.com>
Date:   Fri Aug 26 13:55:26 2011 -0400

    Ensure FC15 boots when zfs isn't used for boot partition

    It seems that dracut version 009 through 013 won't boot correctly when
    the zfs-dracut rpm package has been installed, but 'root=zfs' isn't
    used on the boot commandline, for example when the package has been
    installed on a system that _doesn't_ boot from a zfs filesystem.

    Signed-off-by: Jeremy Gill <jgill@parallax-innovations.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #377

commit 7cdac8b8533c662155248eb2ea672a1e803ab634
Author: Prakash Surya <surya1@llnl.gov>
Date:   Thu Aug 25 15:20:25 2011 -0700

    Fix zfs.spec.in to use @LICENSE@ variable

    The zfs.spec.in file had the license field hard coded to specify the
    CDDL. This was changed to use the @LICENSE@ variable, maintaining
    consistency with the zfs-modules.spec.in file.

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

commit 2e79a04a58bf85dbc18d420cc614100df0d1555a
Author: Prakash Surya <surya1@llnl.gov>
Date:   Thu Aug 25 15:09:24 2011 -0700

    Fix package URLs to use the github repository

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

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

commit 8366cd6a83ab76885c89f57285e13428e4644ac0
Author: Prakash Surya <surya1@llnl.gov>
Date:   Wed Aug 24 09:52:16 2011 -0700

    Convert 'if' statements to AS_IF in kernel.m4

    The 'if' statements found in kernel.m4 were converted to use the
    portable alternative provided by autoconf, the AS_IF macro.

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

commit 2984e0bb0c1dd3b96166b4c3ab99771e8712f686
Author: Prakash Surya <surya1@llnl.gov>
Date:   Wed Aug 24 09:23:44 2011 -0700

    Fix minor autoconf error message inconsistencies

    A few of the autoconf error messages were inconsistent with the rest of
    the build system. To be specific, the inconsistencies addressed by this
    commit are the following:

     * The second line of the error message for the CONFIG_PREEMPT check
       was missing it's third asterisk.

     * A few of the error messages were prefixed by two tabs, whereas the
       majority of error messages are only prefixed by a single tab.

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

commit 1a2e6a635f9ca259c687d062a133fb972c5d84c5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Aug 22 15:58:54 2011 -0700

    Fix incorrect zpool_cache substitution

    This regression was accidentally introduced by commit aa2b489.
    I was attempting to simplify the init scripts and accidentally
    confused the /etc/init.d and /etc/zfs paths.  This change reverts
    the init script modifications.

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

commit fd1cd4888a197256d18a877c7fcf259e50ccd65f
Merge: 9c4f40b aa2b489
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Aug 22 09:25:30 2011 -0700

    Merge branch 'udev'

    Merge the remaining udev restructuring changes and cleanup.

    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Kyle Fuller <inbox@kylefuller.co.uk>
    Signed-off-by: Zachary Bedell <zac@thebedells.org>
    Closes #356

commit aa2b4896c93bbb2652ddc5e10e66175e54ff56c8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Aug 9 16:49:18 2011 -0700

    Fix autoconf variable substitution in init scripts.

    Change the variable substitution in the init script templates
    according to the method described in the Autoconf manual;
    Chapter 4.7.2: Installation Directory Variables.

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

commit f0102d6e75d51b8d92624ba054a3fa54c807fb7f
Author: Kyle Fuller <inbox@kylefuller.co.uk>
Date:   Tue Aug 9 22:39:47 2011 +0100

    Make dracut module-setup.sh an autoconf config file

    This ensures that module-setup.sh script will always be able to
    install the required dracut components regardless of how the zfs
    package was configured.

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

commit 146cde8f4acd52d258ba80817dd1134702a91954
Author: Kyle Fuller <inbox@kylefuller.co.uk>
Date:   Sat Aug 6 18:28:16 2011 +0100

    Move 90-zfs udev rule from dracut to udev/rules.d

    This rule does not need to be dracut specific.  Automatically loading
    the zfs module stack when a zfs device is detected is usually desirable.
    My only concern is that this might cause trouble for large pools where
    we don't want to automatically import the pool until all the disks are
    available.  However, we'll cross that bridge when we come to it.

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

commit 9c4f40b894dd5b5c2ef18546d23d7e91095ac509
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Aug 2 13:20:00 2011 -0700

    Buildbot suppression rules

    The warnings listed in the suppression file will be suppressed
    and not flagged during regular buildbot builds.  These warnings
    are expected, harmless, and can obscure real issues unless they
    are suppressed.

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

commit 4c069d349440cbf1ebe234d65b53ab41eaea5569
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 19 16:24:04 2011 -0700

    Fixed uninitialized variable

    This warning was accidentally introduced by commit
    b7936d5c2337bc976ac831c1c38de563844c36b.  The fix is to
    simply initialize the variable to ZFS_DELEG_WHO_UNKNOWN.

      cmd/zfs/zfs_main.c:4460:25: warning: 'who_type' may be
      used uninitialized in this function

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

commit 29b35200a7b3b0b803b69bb18f8435f4b9e66151
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 19 15:12:44 2011 -0700

    Fix missing format arguments

    These warnings were accidentally introduced by commit
    b7936d5c2337bc976ac831c1c38de563844c36b.  The fix is to
    simply add the missing format specifier.

      cmd/zfs/zfs_main.c:4565: warning: format not a string
      literal and no format arguments

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

commit 95d9fd028b9a27294a1b807915de17877563bd6d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 19 14:49:49 2011 -0700

    Fix incompatible pointer type warning

    This warning was accidentally introduced by commit
    f3ab88d6461dec46dea240763843f66300facfab which updated the
    .readpages() implementation.  The fix is to simply cast
    the helper function to the appropriate type when passed.

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

commit b740d602bdeca757180a7098be28701a7cde7fbd
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 21 12:39:42 2011 -0700

    Disable zfs /etc/mtab updates

    Completely disable the zfs binary from attempting to directly update
    /etc/mtab.  The Linux port relies entirely on the mount.zfs helper
    to safely update /etc/mtab.  If we left the /etc/mtab updates to
    the zfs binary then they could race with concurrent non-zfs mounts.
    Routing everything through the system mount command ensures the
    /etc/mtab updates are locked properly.

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

commit ddd052aa8311f846e3d3f7a9ddf1a21d317fb04a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 5 16:55:04 2011 -0700

    Improve HAVE_EVICT_INODE check

    The hardened gentoo kernel defines all of the super block
    operation callbacks as const.  This prevents the autoconf test
    from assigning the callback and results in a false negative.
    By moving the assignment in to the declaration we can avoid
    this issue and get a correct result for this patched kernel.

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

commit de0a1c099b7dc6722eb428838e893a4d9490a21e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Aug 8 14:50:36 2011 -0700

    Autogen refresh for udev changes

    Run autogen.sh using the same autotools versions as upstream:

     * autoconf-2.63
     * automake-1.11.1
     * libtool-2.2.6b

commit 12d06bac9b22b11d8a322dfea4bdb50b106c254f
Author: Kyle Fuller <inbox@kylefuller.co.uk>
Date:   Fri Aug 5 20:22:58 2011 +0100

    Move udev rules from /etc/udev to /lib/udev

    This change moves the default install location for the zfs udev
    rules from /etc/udev/ to /lib/udev/.  The correct convention is
    for rules provided by a package to be installed in /lib/udev/.
    The /etc/udev/ directory is reserved for custom rules or local
    overrides.

    Additionally, this patch cleans up some abuse of the bindir install
    location by adding a udevdir and udevruledir install directories.
    This allows us to revert to the default bin install location.  The
    udev install directories can be set with the following new options.

      --with-udevdir=DIR      install udev helpers [EPREFIX/lib/udev]
      --with-udevruledir=DIR  install udev rules [UDEVDIR/rules.d]

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

commit f3ab88d6461dec46dea240763843f66300facfab
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 4 16:25:43 2011 -0700

    Correctly lock pages for .readpages()

    Unlike the .readpage() callback which is passed a single locked page
    to be populated.  The .readpages() callback is passed a list of unlocked
    pages which are all marked for read-ahead (PG_readahead set).  It is
    the responsibly of .readpages() to ensure to pages are properly locked
    before being populated.

    Prior to this change the requested read-ahead pages would be updated
    outside of the page lock which is unsafe.  The unlocked pages would then
    be unlocked again which is harmless but should have been immediately
    detected as bug.  Unfortunately, newer kernels failed detect this issue
    because the check is done with a VM_BUG_ON which is disabled by default.
    Luckily, the old Debian Lenny 2.6.26 kernel caught this because it
    simply uses a BUG_ON.

    The straight forward fix for this is to update the .readpages() callback
    to use the read_cache_pages() helper function.  The helper function will
    ensure that each page in the list is properly locked before it is passed
    to the .readpage() callback.  In addition resolving the bug, this results
    in a nice simplification of the existing code.

    The downside to this change is that instead of passing one large read
    request to the dmu multiple smaller ones are submitted.  All of these
    requests however are marked for readahead so the lower layers should
    issue a large I/O regardless.  Thus most of the request should hit the
    ARC cache.

    Futher optimization of this code can be done in the future is a perform
    analysis determines it to be worthwhile.  But for the moment, it is
    preferable that code be correct and understandable.

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

commit 76659dc110ef2ada13bcb8e4e2ec60d8216c6836
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Aug 1 18:24:40 2011 -0700

    Add backing_device_info per-filesystem

    For a long time now the kernel has been moving away from using the
    pdflush daemon to write 'old' dirty pages to disk.  The primary reason
    for this is because the pdflush daemon is single threaded and can be
    a limiting factor for performance.  Since pdflush sequentially walks
    the dirty inode list for each super block any delay in processing can
    slow down dirty page writeback for all filesystems.

    The replacement for pdflush is called bdi (backing device info).  The
    bdi system involves creating a per-filesystem control structure each
    with its own private sets of queues to manage writeback.  The advantage
    is greater parallelism which improves performance and prevents a single
    filesystem from slowing writeback to the others.

    For a long time both systems co-existed in the kernel so it wasn't
    strictly required to implement the bdi scheme.  However, as of
    Linux 2.6.36 kernels the pdflush functionality has been retired.

    Since ZFS already bypasses the page cache for most I/O this is only
    an issue for mmap(2) writes which must go through the page cache.
    Even then adding this missing support for newer kernels was overlooked
    because there are other mechanisms which can trigger writeback.

    However, there is one critical case where not implementing the bdi
    functionality can cause problems.  If an application handles a page
    fault it can enter the balance_dirty_pages() callpath.  This will
    result in the application hanging until the number of dirty pages in
    the system drops below the dirty ratio.

    Without a registered backing_device_info for the filesystem the
    dirty pages will not get written out.  Thus the application will hang.
    As mentioned above this was less of an issue with older kernels because
    pdflush would eventually write out the dirty pages.

    This change adds a backing_device_info structure to the zfs_sb_t
    which is already allocated per-super block.  It is then registered
    when the filesystem mounted and unregistered on unmount.  It will
    not be registered for mounted snapshots which are read-only.  This
    change will result in flush-<pool> thread being dynamically created
    and destroyed per-mounted filesystem for writeback.

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

commit 3c0e5c0f455576d045fa443cbab74834d70ded55
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Aug 1 21:28:51 2011 -0700

    Cleanup mmap(2) writes

    While the existing implementation of .writepage()/zpl_putpage() was
    functional it was not entirely correct.  In particular, it would move
    dirty pages in to a clean state simply after copying them in to the
    ARC cache.  This would result in the pages being lost if the system
    were to crash enough though the Linux VFS believed them to be safe on
    stable storage.

    Since at the moment virtually all I/O, except mmap(2), bypasses the
    page cache this isn't as bad as it sounds.  However, as hopefully
    start using the page cache more getting this right becomes more
    important so it's good to improve this now.

    This patch takes a big step in that direction by updating the code
    to correctly move dirty pages through a writeback phase before they
    are marked clean.  When a dirty page is copied in to the ARC it will
    now be set in writeback and a completion callback is registered with
    the transaction.  The page will stay in writeback until the dmu runs
    the completion callback indicating the page is on stable storage.
    At this point the page can be safely marked clean.

    This process is normally entirely asynchronous and will be repeated
    for every dirty page.  This may initially sound inefficient but most
    of these pages will end up in a few txgs.  That means when they are
    eventually written to disk they should be nicely batched.  However,
    there is room for improvement.  It may still be desirable to batch
    up the pages in to larger writes for the dmu.  This would reduce
    the number of callbacks and small 4k buffer required by the ARC.

    Finally, if the caller requires that the I/O be done synchronously
    by setting WB_SYNC_ALL or if ZFS_SYNC_ALWAYS is set.  Then the I/O
    will trigger a zil_commit() to flush the data to stable storage.
    At which point the registered callbacks will be run leaving the
    date safe of disk and marked clean before returning from .writepage.

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

commit ddd0fd9ef64648333b79b4cc8a13216399cefec9
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Fri Jul 29 10:17:50 2011 +0200

    Use libzfs_run_process() in libshare.

    This should simplify the code a bit by re-using existing code
    to fork and exec a process.

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

commit 3132cb397ad1b60cac548b35ad8bbd4c7183fde4
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Fri Jul 29 10:17:46 2011 +0200

    Use /dev/null for stdout/stderr in libzfs_run_process().

    Simply closing the stdout and/or stderr file descriptors for
    the child process can have bad side effects if for example
    the child writes to stdout/stderr after open()ing a file.
    The open() call might have returned the same file descriptor
    one would usually expect for stdout/stderr (1 and 2), thereby
    causing mis-directed writes.

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

commit 5333eb0b3b18d345052b8cfaf41b90a0c5781fb8
Author: James H <james@kagisoft.co.uk>
Date:   Tue Jul 26 11:47:20 2011 +0100

    Call exportfs -v once for NFS shares.

    At the moment we call exportfs -v every time we check whether an
    NFS share is active. This happens every time you run a zfs or
    zpool command, making them extremely slow when you have a lot of
    exports. The time taken is approx O(n2) of the number of shares.

    This commit stores the output from exportfs -v in a temporary file
    and use this to speed up subsequent accesses.

    This mechanism is still too slow - if you have tens of thousands
    of NFS shares it will still be painful running ANY zfs/zpool
    command.

    Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #341

commit 77999e804fff35782ab4b578d2cecf064c54a841
Merge: bfb73f9 cddafdc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Aug 1 12:10:54 2011 -0700

    Merge branch 'illumos'

    Merge in ten upstream fixes which have already been made to both
    the Illumos and FreeBSD ZFS implementations.  This brings us up
    to date with the latest ZFS changes in Illumos.

    Credit goes to Martin Matuska of the FreeBSD project for posting
    an excellent summary of the upstream patches we were missing.

    Illumos #1313: Integer overflow in txg_delay()
    Illumos #278:  get rid zfs of python and pyzfs dependencies
    Illumos #1043: Recursive zfs snapshot destroy fails
    Illumos #883:  ZIL reuse during remount corruption
    Illumos #1092: zfs refratio property
    Illumos #1051: zfs should handle
    Illumos #510:  'zfs get' enhancement - mountpoint as an argument
    Illumos #175:  zfs vdev cache consumes excessive memory
    Illumos #764:  panic in zfs:dbuf_sync_list
    Illumos #xxx:  zdb -vvv broken after zfs diff integration

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

commit cddafdcbc55a38cdbdd3dc8c58f447b22bd847ee
Author: Martin Matuska <mm@FreeBSD.org>
Date:   Mon Aug 1 10:34:06 2011 -0700

    Illumos #1313: Integer overflow in txg_delay()

    The function txg_delay() is used to delay txg (transaction group)
    threads in ZFS.  The timeout value for this function is calculated
    using:

        int timeout = ddi_get_lbolt() + ticks;

    Later, the actual wait is performed:

        while (ddi_get_lbolt() < timeout &&
            tx->tx_syncing_txg < txg-1 && !txg_stalled(dp))
                (void) cv_timedwait(&tx->tx_quiesce_more_cv, &tx->tx_sync_lock,
                    timeout - ddi_get_lbolt());

    The ddi_get_lbolt() function returns current uptime in clock ticks
    and is typed as clock_t.  The clock_t type on 64-bit architectures
    is int64_t.

    The "timeout" variable will overflow depending on the tick frequency
    (e.g. for 1000 it will overflow in 28.855 days). This will make the
    expression "ddi_get_lbolt() < timeout" always false - txg threads will
    not be delayed anymore at all. This leads to a slowdown in ZFS writes.

    The attached patch initializes timeout as clock_t to match the return
    value of ddi_get_lbolt().

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

commit 0b7936d5c2337bc976ac831c1c38de563844c36b
Author: Alexander Stetsenko <ams@nexenta.com>
Date:   Tue Jul 26 15:44:36 2011 -0700

    Illumos #278: get rid zfs of python and pyzfs dependencies

    Remove all python and pyzfs dependencies for consistency and
    to ensure full functionality even in a mimimalist environment.

    Reviewed by: gordon.w.ross@gmail.com
    Reviewed by: trisk@opensolaris.org
    Reviewed by: alexander.r.eremin@gmail.com
    Reviewed by: jerry.jelinek@joyent.com
    Approved by: garrett@nexenta.com

    References to Illumos issue and patch:
    - https://www.illumos.org/issues/278
    - https://github.com/illumos/illumos-gate/commit/1af68beac3

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

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

commit ca5252204aa25f81e9f19084917e0a46fdd470b0
Author: Martin Matuska <mm@FreeBSD.org>
Date:   Tue Jul 26 13:08:02 2011 -0700

    Illumos #1043: Recursive zfs snapshot destroy fails

    Prior to revision 11314 if a user was recursively destroying
    snapshots of a dataset the target dataset was not required to
    exist.  The zfs_secpolicy_destroy_snaps() function introduced
    the security check on the target dataset, so since then if the
    target dataset does not exist, the recursive destroy is not
    performed.  Before 11314, only a delete permission check on
    the snapshot's master dataset was performed.

    Steps to reproduce:
    zfs create pool/a
    zfs snapshot pool/a@s1
    zfs destroy -r pool@s1

    Therefore I suggest to fallback to the old security check, if
    the target snapshot does not exist and continue with the destroy.

    References to Illumos issue and patch:
    - https://www.illumos.org/issues/1043
    - https://www.illumos.org/attachments/217/recursive_dataset_destroy.patch

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

commit 3e31d2b080b4e6665a93691d171a13d7e29a768a
Author: Eric Schrock <Eric.Schrock@delphix.com>
Date:   Tue Jul 26 12:41:53 2011 -0700

    Illumos #883: ZIL reuse during remount corruption

    Moving the zil_free() cleanup to zil_close() prevents this
    problem from occurring in the first place.  There is a very
    good description of the issue and fix in Illumus #883.

    Reviewed by: Matt Ahrens <Matt.Ahrens@delphix.com>
    Reviewed by: Adam Leventhal <Adam.Leventhal@delphix.com>
    Reviewed by: Albert Lee <trisk@nexenta.com>
    Reviewed by: Gordon Ross <gwr@nexenta.com>
    Reviewed by: Garrett D'Amore <garrett@nexenta.com>
    Reivewed by: Dan McDonald <danmcd@nexenta.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

    References to Illumos issue and patch:
    - https://www.illumos.org/issues/883
    - https://github.com/illumos/illumos-gate/commit/c9ba2a43cb

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

commit f5fc4acaa77e2c1782a9495bbf1a39884b4c3940
Author: Matt Ahrens <Matt.Ahrens@delphix.com>
Date:   Tue Jul 26 12:23:00 2011 -0700

    Illumos #1092: zfs refratio property

    Add a "REFRATIO" property, which is the compression ratio based on
    data referenced. For snapshots, this is the same as COMPRESSRATIO,
    but for filesystems/volumes, the COMPRESSRATIO is based on the
    data "USED" (ie, includes blocks in children, but not blocks
    shared with the origin).

    This is needed to figure out how much space a filesystem would
    use if it were not compressed (ignoring snapshots).

    Reviewed by: George Wilson <George.Wilson@delphix.com>
    Reviewed by: Adam Leventhal <Adam.Leventhal@delphix.com>
    Reviewed by: Dan McDonald <danmcd@nexenta.com>
    Reviewed by: Richard Elling <richard.elling@richardelling.com>
    Reviewed by: Mark Musante <Mark.Musante@oracle.com>
    Reviewed by: Garrett D'Amore <garrett@nexenta.com>
    Approved by: Garrett D'Amore <garrett@nexenta.com>

    References to Illumos issue and patch:
    - https://www.illumos.org/issues/1092
    - https://github.com/illumos/illumos-gate/commit/187d6ac08a

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

commit 6d974228ef05366c546bb04198dafcb38785c16d
Author: George Wilson <George.Wilson@delphix.com>
Date:   Tue Jul 26 12:08:52 2011 -0700

    Illumos #1051: zfs should handle imbalanced luns

    Today zfs tries to allocate blocks evenly across all devices.
    This means when devices are imbalanced zfs will use lots of
    CPU searching for space on devices which tend to be pretty
    full.  It should instead fail quickly on the full LUNs and
    move onto devices which have more availability.

    Reviewed by: Eric Schrock <Eric.Schrock@delphix.com>
    Reviewed by: Matt Ahrens <Matt.Ahrens@delphix.com>
    Reviewed by: Adam Leventhal <Adam.Leventhal@delphix.com>
    Reviewed by: Albert Lee <trisk@nexenta.com>
    Reviewed by: Gordon Ross <gwr@nexenta.com>
    Approved by: Garrett D'Amore <garrett@nexenta.com>

    References to Illumos issue and patch:
    - https://www.illumos.org/issues/510
    - https://github.com/illumos/illumos-gate/commit/5ead3ed965

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

commit bb939d10859e4f56bc793c4d5077e680a8c6c3aa
Author: Shampavman <sham.pavman@nexenta.com>
Date:   Tue Jul 26 11:53:09 2011 -0700

    Illumos #510: 'zfs get' enhancement - mountpoint as an argument

    The 'zfs get' command should be able to deal with mountpoint
    as an argument.  It already works with 'zfs list' command:

      # zfs list /export/home/estibi
      NAME                       USED  AVAIL  REFER  MOUNTPOINT
      rpool/export/home/estibi  1.14G  3.86G  1.14G  /export/home/estibi

    but it fails with 'zfs get':

      # zfs get all /export/home/estibi
      cannot open '/export/home/estibi': invalid dataset name

    Reviewed by: Eric Schrock <eric.schrock@delphix.com>
    Reviewed by: Deano <deano@rattie.demon.co.uk>
    Reviewed by: Garrett D'Amore <garrett@nexenta.com>
    Approved by: Garrett D'Amore <garrett@nexenta.com>

    References to Illumos issue and patch:
    - https://www.illumos.org/issues/510
    - https://github.com/illumos/illumos-gate/commit/5ead3ed965

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

commit 2cc6c8db12eaf8d1a1c17a13fbc6d25d8244486e
Author: Garrett D'Amore <garrett@nexenta.com>
Date:   Fri Apr 22 00:49:41 2011 -0700

    Illumos #175: zfs vdev cache consumes excessive memory

    Note that with the current ZFS code, it turns out that the vdev
    cache is not helpful, and in some cases actually harmful.  It
    is better if we disable this.  Once some time has passed, we
    should actually remove this to simplify the code.  For now we
    just disable it by setting the zfs_vdev_cache_size to zero.
    Note that Solaris 11 has made these same changes.

    References to Illumos issue and patch:
    - https://www.illumos.org/issues/175
    - https://github.com/illumos/illumos-gate/commit/b68a40a845

    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Eric Schrock <eric.schrock@delphix.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

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

commit ef3c1dea7024b07b4ace6115de9f22a99c1394d8
Author: Gordon Ross <gwr@nexenta.com>
Date:   Tue Jul 26 11:37:06 2011 -0700

    Illumos #764: panic in zfs:dbuf_sync_list

    Hypothesis about what's going on here.

    At some time in the past, something, i.e. dnode_reallocate()
    calls one of:
    dbuf_rm_spill(dn, tx);

    These will do:
    dbuf_rm_spill(dnode_t *dn, dmu_tx_t *tx)
    dbuf_free_range(dn, DMU_SPILL_BLKID, DMU_SPILL_BLKID, tx)
    dbuf_undirty(db, tx)

    Currently dbuf_undirty can leave a spill block in dn_dirty_records[],
    (it having been put there previously by dbuf_dirty) and free it.
    Sometime later, dbuf_sync_list trips over this reference to free'd
    (and typically reused) memory.

    Also, dbuf_undirty can call dnode_clear_range with a bogus
    block ID. It needs to test for DMU_SPILL_BLKID, similar to
    how dnode_clear_range is called in dbuf_dirty().

    References to Illumos issue and patch:
    - https://www.illumos.org/issues/764
    - https://github.com/illumos/illumos-gate/commit/3f2366c2bb

    Reviewed by: George Wilson <gwilson@zfsmail.com>
    Reviewed by: Mark.Maybe@oracle.com
    Reviewed by: Albert Lee <trisk@nexenta.com
    Approved by: Garrett D'Amore <garrett@nexenta.com>

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

commit 7b8518cb8d39aa340fecf559143763b27b212b0d
Author: Tim Haley <Tim.Haley@Sun.COM>
Date:   Tue Jul 26 16:38:27 2011 -0700

    Illumos #xxx: zdb -vvv broken after zfs diff integration

    References to Illumos issue and patch:
    - https://github.com/illumos/illumos-gate/commit/163eb7ff

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

commit bfb73f92773dc3471e3a6274970c02e0700b6c7d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Aug 1 10:27:54 2011 -0700

    Add .gitignore for zfs.<distro> init scripts

    Treat the automatically generated zfs.<distro> init scripts
    as build products by adding them to a directory specific
    .gitignore file.

commit 5faa9c0367e8d6b1ee1c45f1ebeffd3e53ef35e8
Author: Kyle Fuller <inbox@kylefuller.co.uk>
Date:   Mon Jul 25 01:00:53 2011 +0100

    Turn the init.d scripts into autoconf config files

    This change ensures the paths used by the provided init scripts
    always reference the prefixes provided at configure time.  The
    @sbindir@ and @sysconfdir@ prefixes will be correctly replaced
    at build time.

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

commit 7f4afd300b753ee7e0ce1f8d12c098119193001b
Author: Zachary Bedell <zac@thebedells.org>
Date:   Sun Jul 31 00:21:40 2011 -0400

    Wrap dracut scripts to 79 chars

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

commit 7304278d7f087846392d6efc8802da48811476f2
Author: Kyle Fuller <inbox@kylefuller.co.uk>
Date:   Mon Jul 25 01:36:37 2011 +0100

    Make autogen.sh executable

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

commit a4719e54e8628564ffda33cffee59812b61f273b
Author: Zachary Bedell <zac@thebedells.org>
Date:   Sun Jul 24 16:53:15 2011 -0400

    Catch return errors from zpool commands

    This fixes a bug that can effect first reboot after install
    using Dracut.  The Dracut module didn't check the return
    value from several calls to z* functions.  This resulted in
    "Using no pools available as root" on boot if the ZFS module
    didn't auto-import the pools.  It's most likely to happen on
    initial restart after a fresh install & requires juggling in
    the Dracut emergency holographic shell to fix.

    This patch checks return codes & output from zpool list and
    related functions and correctly falls into the explicit zpool
    import code branch if the module didn't import the pool at load.

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

commit 1ef5e8296a07a0d208d0663ae966c8b0206f7e6a
Author: Zachary Bedell <zac@thebedells.org>
Date:   Sun Jul 24 16:46:16 2011 -0400

    Soft to hard tabs

    For consistency with the upstream sources and the rest of the
    project use hard instead of soft tabs.

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

commit beb982690293310b14a4835d3ffeb883ba03cc0a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 22 13:55:27 2011 -0700

    Fix txg_sync_thread deadlock

    Update two kmem_alloc()'s in dbuf_dirty() to use KM_PUSHPAGE.
    Because these functions are called from txg_sync_thread we
    must ensure they don't reenter the zfs filesystem code via
    the .writepage callback.  This would result in a deadlock.

    This deadlock is rare and has only been observed once under
    an abusive mmap() write workload.

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

commit f7ef846ea19809b2f373c0542741ac04c65a07cb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 22 13:56:03 2011 -0700

    Add missing <pool> option

    The bootfs example in the dracut documentation was sightly incorrect
    because it lacked the trailing required pool argument.  Add it.

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

commit 0da78696904f6e0e7cfedd2a0296879f47717f4f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 22 14:10:38 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 22872ff5da0d12fe393e40d3e4b3c5a58d93e360
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 20 16:50:22 2011 -0700

    Use zfs_mknode() to create dataset root

    Long, long, long ago when the effort to port ZFS was begun
    the zfs_create_fs() function was heavily modified to remove
    all of its VFS dependencies.  This allowed Lustre to use
    the dataset without us having to spend the time porting all
    the required VFS code.

    Fast-forward several years and we now have all the VFS code
    in place but are still relying on the modified zfs_create_fs().
    This isn't required anymore and we can now use zfs_mknode()
    to create the root znode for the filesystem.

    This commit reverts the contents of zfs_create_fs() to largely
    match the upstream OpenSolaris code.  There have been minor
    modifications to accomidate the Linux VFS but that is all.

    This code fixes issue #116 by bootstraping enough of the VFS
    data structures so we can rely on zfs_mknode() to create the
    root directory.  This ensures it is created properly with
    support for system attributes.  Previously it wasn't which
    is why it behaved differently that all other directories
    when modified.

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

commit 9fd91daeef4df4e2bc66f54bb97c88225c6dd2c7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 20 13:10:07 2011 -0700

    Honor setgit bit on directories

    Newly created files were always being created with the fsuid/fsgid
    in the current users credentials.  This is correct except in the
    case when the parent directory sets the 'setgit' bit.  In this
    case according to posix the newly created file/directory should
    inherit the gid of the parent directory.  Additionally, in the
    case of a subdirectory it should also inherit the 'setgit' bit.

    Finally, this commit performs a little cleanup of the vattr_t
    initialization by moving it to a common helper function.

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

commit fe0ed8f910c1e4288dc190546cfe98ecf545b547
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 19 21:44:07 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 cfc9a5c88f91f7b4d606fce89505e1f404691ea5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 19 11:48:46 2011 -0700

    Fix zpl_writepage() deadlock

    Disable the normal reclaim path for zpl_putpage().  This ensures that
    all memory allocations under this call path will never enter direct
    reclaim.  If this were to happen the VM might try to write out
    additional pages by calling zpl_putpage() again resulting in a
    deadlock.

    This sitution is typically handled in Linux by marking each offending
    allocation GFP_NOFS.  However, since much of the code used is common
    it makes more sense to use PF_MEMALLOC to flag the entire call tree.
    Alternately, the code could be updated to pass the needed allocation
    flags but that's a more invasive change.

    The following example of the above described deadlock was triggered
    by test 074 in the xfstest suite.

    Call Trace:
     [<ffffffff814dcdb2>] down_write+0x32/0x40
     [<ffffffffa05af6e4>] dnode_new_blkid+0x94/0x2d0 [zfs]
     [<ffffffffa0597d66>] dbuf_dirty+0x556/0x750 [zfs]
     [<ffffffffa05987d1>] dmu_buf_will_dirty+0x81/0xd0 [zfs]
     [<ffffffffa059ee70>] dmu_write+0x90/0x170 [zfs]
     [<ffffffffa0611afe>] zfs_putpage+0x2ce/0x360 [zfs]
     [<ffffffffa062875e>] zpl_putpage+0x1e/0x60 [zfs]
     [<ffffffffa06287b2>] zpl_writepage+0x12/0x20 [zfs]
     [<ffffffff8115f907>] writeout+0xa7/0xd0
     [<ffffffff8115fa6b>] move_to_new_page+0x13b/0x170
     [<ffffffff8115fed4>] migrate_pages+0x434/0x4c0
     [<ffffffff811559ab>] compact_zone+0x4fb/0x780
     [<ffffffff81155ed1>] compact_zone_order+0xa1/0xe0
     [<ffffffff8115602c>] try_to_compact_pages+0x11c/0x190
     [<ffffffff811200bb>] __alloc_pages_nodemask+0x5eb/0x8b0
     [<ffffffff8115464a>] alloc_pages_current+0xaa/0x110
     [<ffffffff8111e36e>] __get_free_pages+0xe/0x50
     [<ffffffffa03f0e2f>] kv_alloc+0x3f/0xb0 [spl]
     [<ffffffffa03f11d9>] spl_kmem_cache_alloc+0x339/0x660 [spl]
     [<ffffffffa05950b3>] dbuf_create+0x43/0x370 [zfs]
     [<ffffffffa0596fb1>] __dbuf_hold_impl+0x241/0x480 [zfs]
     [<ffffffffa0597276>] dbuf_hold_impl+0x86/0xc0 [zfs]
     [<ffffffffa05977ff>] dbuf_hold_level+0x1f/0x30 [zfs]
     [<ffffffffa05a9dde>] dmu_tx_check_ioerr+0x4e/0x110 [zfs]
     [<ffffffffa05aa1f9>] dmu_tx_count_write+0x359/0x6f0 [zfs]
     [<ffffffffa05aa5df>] dmu_tx_hold_write+0x4f/0x70 [zfs]
     [<ffffffffa0611a6d>] zfs_putpage+0x23d/0x360 [zfs]
     [<ffffffffa062875e>] zpl_putpage+0x1e/0x60 [zfs]
     [<ffffffff811221f9>] write_cache_pages+0x1c9/0x4a0
     [<ffffffffa0628738>] zpl_writepages+0x18/0x20 [zfs]
     [<ffffffff81122521>] do_writepages+0x21/0x40
     [<ffffffff8119bbbd>] writeback_single_inode+0xdd/0x2c0
     [<ffffffff8119bfbe>] writeback_sb_inodes+0xce/0x180
     [<ffffffff8119c11b>] writeback_inodes_wb+0xab/0x1b0
     [<ffffffff8119c4bb>] wb_writeback+0x29b/0x3f0
     [<ffffffff8119c6cb>] wb_do_writeback+0xbb/0x240
     [<ffffffff811308ea>] bdi_forker_task+0x6a/0x310
     [<ffffffff8108ddf6>] kthread+0x96/0xa0

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

commit abd39a8289c3bc2766f281933689d5140445aa85
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 19 09:31:23 2011 -0700

    Fix zio_execute() deadlock

    To avoid deadlocking the system it is crucial that all memory
    allocations performed in the zio_execute() call path are marked
    KM_PUSHPAGE (GFP_NOFS).  This ensures that while a z_wr_iss
    thread is processing the syncing transaction group it does
    not re-enter the filesystem code and deadlock on itself.

    Call Trace:
     [<ffffffffa02580e8>] cv_wait_common+0x78/0xe0 [spl]
     [<ffffffffa0347bab>] txg_wait_open+0x7b/0xa0 [zfs]
     [<ffffffffa030e73d>] dmu_tx_wait+0xed/0xf0 [zfs]
     [<ffffffffa0376a49>] zfs_putpage+0x219/0x360 [zfs]
     [<ffffffffa038d75e>] zpl_putpage+0x1e/0x60 [zfs]
     [<ffffffffa038d7b2>] zpl_writepage+0x12/0x20 [zfs]
     [<ffffffff8115f907>] writeout+0xa7/0xd0
     [<ffffffff8115fa6b>] move_to_new_page+0x13b/0x170
     [<ffffffff8115fed4>] migrate_pages+0x434/0x4c0
     [<ffffffff811559ab>] compact_zone+0x4fb/0x780
     [<ffffffff81155ed1>] compact_zone_order+0xa1/0xe0
     [<ffffffff8115602c>] try_to_compact_pages+0x11c/0x190
     [<ffffffff811200bb>] __alloc_pages_nodemask+0x5eb/0x8b0
     [<ffffffff81159932>] kmem_getpages+0x62/0x170
     [<ffffffff8115a54a>] fallback_alloc+0x1ba/0x270
     [<ffffffff8115a2c9>] ____cache_alloc_node+0x99/0x160
     [<ffffffff8115b059>] __kmalloc+0x189/0x220
     [<ffffffffa02539fb>] kmem_alloc_debug+0xeb/0x130 [spl]
     [<ffffffffa031454a>] dnode_hold_impl+0x46a/0x550 [zfs]
     [<ffffffffa0314649>] dnode_hold+0x19/0x20 [zfs]
     [<ffffffffa03042e3>] dmu_read+0x33/0x180 [zfs]
     [<ffffffffa034729d>] space_map_load+0xfd/0x320 [zfs]
     [<ffffffffa03300bc>] metaslab_activate+0x10c/0x170 [zfs]
     [<ffffffffa0330ad9>] metaslab_alloc+0x469/0x800 [zfs]
     [<ffffffffa038963c>] zio_dva_allocate+0x6c/0x2f0 [zfs]
     [<ffffffffa038a249>] zio_execute+0x99/0xf0 [zfs]
     [<ffffffffa0254b1c>] taskq_thread+0x1cc/0x330 [spl]
     [<ffffffff8108ddf6>] kthread+0x96/0xa0

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

commit a140dc5469399eaf2347ee7db503275f38f5dc12
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jul 18 20:06:32 2011 -0700

    Fix mmap(2)/write(2)/read(2) deadlock

    When modifing overlapping regions of a file using mmap(2) and
    write(2)/read(2) it is possible to deadlock due to a lock inversion.
    The zfs_write() and zfs_read() hooks first take the zfs range lock
    and then lock the individual pages.  Conversely, when using mmap'ed
    I/O the zpl_writepage() hook is called with the individual page
    locks already taken and then zfs_putpage() takes the zfs range lock.

    The most straight forward fix is to simply not take the zfs range
    lock in the mmap(2) case.  The individual pages will still be locked
    thus serializing access.  Updating the same region of a file with
    write(2) and mmap(2) has always been a dodgy thing to do.  This change
    at a minimum ensures we don't deadlock and is consistent with the
    existing Linux semantics enforced by the VFS.

    This isn't an issue under Solaris because the only range locking
    performed will be with the zfs range locks.  It's up to each filesystem
    to perform its own file locking.  Under Linux the VFS provides many
    of these services.

    It may be possible/desirable at a latter date to entirely dump the
    existing zfs range locking and rely on the Linux VFS page locks.
    However, for now its safest to perform both layers of locking until
    zfs is more tightly integrated with the page cache.

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

commit 7f9d9946f88a37954ac208272bee0d4b3988da7f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 19 11:22:29 2011 -0700

    Update 'zpool import' man page

    The following supported options were missing from the zpool.8
    man page.  The OpenSolaris man pages originally used were simply
    out of date with the code.

    zpool import
      -F Recovery mode
      -m Allow missing log devices
      -N Import but don't mount
      -n Determine if recoverable but don't do it

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

commit 61f218b0900194edfb2e67739221e49c46fc5ee0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 15 16:15:27 2011 -0700

    Fix send/recv 'dataset is busy' errors

    This commit fixes a regression which was accidentally introduced by
    the Linux 2.6.39 compatibility chanages.  As part of these changes
    instead of holding an active reference on the namepsace (which is
    no longer posible) a reference is taken on the super block.  This
    reference ensures the super block remains valid while it is in use.

    To handle the unlikely race condition of the filesystem being
    unmounted concurrently with the start of a 'zfs send/recv' the
    code was updated to only take the super block reference when there
    was an existing reference.  This indicates that the filesystem is
    active and in use.

    Unfortunately, in the 'zfs recv' case this is not the case.  The
    newly created dataset will not have a super block without an
    active reference which results in the 'dataset is busy' error.

    The most straight forward fix for this is to simply update the
    code to always take the reference even when it's zero.  This
    may expose us to very very unlikely concurrent umount/send/recv
    case but the consequences of that are minor.

    Closes #319

commit 615ab66d18f74b3f4979c06192e1aa1082523dd3
Author: Kyle Fuller <inbox@kylefuller.co.uk>
Date:   Sun Jul 10 16:57:33 2011 +0100

    Provide a rc.d script for archlinux

    Unlike most other Linux distributions archlinux installs its
    init scripts in /etc/rc.d insead of /etc/init.d.  This commit
    provides an archlinux rc.d script for zfs and extends the
    build infrastructure to ensure it get's installed in the
    correct place.

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

commit 057e8eee35d4cc06cc4edd6e8239d28a4122cf71
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sat Jul 9 15:44:16 2011 -0700

    Improve fstat(2) performance

    There is at most a factor of 3x performance improvement to be
    had by using the Linux generic_fillattr() helper.  However, to
    use it safely we need to ensure the values in a cached inode
    are kept rigerously up to date.  Unfortunately, this isn't
    the case for the blksize, blocks, and atime fields.  At the
    moment the authoritative values are still stored in the znode.

    This patch introduces an optimized zfs_getattr_fast() call.
    The idea is to use the up to date values from the inode and
    the blksize, block, and atime fields from the znode.  At some
    latter date we should be able to strictly use the inode values
    and further improve performance.

    The remaining overhead in the zfs_getattr_fast() call can be
    attributed to having to take the znode mutex.  This overhead is
    unavoidable until the inode is kept strictly up to date.  The
    the careful reader will notice the we do not use the customary
    ZFS_ENTER()/ZFS_EXIT() macros.  These macro's are designed to
    ensure the filesystem is not torn down in the middle of an
    operation.  However, in this case the VFS is holding a
    reference on the active inode so we know this is impossible.

    =================== Performance Tests ========================

    This test calls the fstat(2) system call 10,000,000 times on
    an open file description in a tight loop.  The test results
    show the zfs stat(2) performance is now only 22% slower than
    ext4.  This is a 2.5x improvement and there is a clear long
    term plan to get to parity with ext4.

    filesystem    | test-1  test-2  test-3  | average | times-ext4
    --------------+-------------------------+---------+-----------
    ext4          |  7.785s  7.899s  7.284s |  7.656s | 1.000x
    zfs-0.6.0-rc4 | 24.052s 22.531s 23.857s | 23.480s | 3.066x
    zfs-faststat  |  9.224s  9.398s  9.485s |  9.369s | 1.223x

    The second test is to run 'du' of a copy of the /usr tree
    which contains 110514 files.  The test is run multiple times
    both using both a cold cache (/proc/sys/vm/drop_caches) and
    a hot cache.  As expected this change signigicantly improved
    the zfs hot cache performance and doesn't quite bring zfs to
    parity with ext4.

    A little surprisingly the zfs cold cache performance is better
    than ext4.  This can probably be attributed to the zfs allocation
    policy of co-locating all the meta data on disk which minimizes
    seek times.  By default the ext4 allocator will spread the data
    over the entire disk only co-locating each directory.

    filesystem    | cold    | hot
    --------------+---------+--------
    ext4          | 13.318s | 1.040s
    zfs-0.6.0-rc4 |  4.982s | 1.762s
    zfs-faststat  |  4.933s | 1.345s

commit abd8610cd5ffd04f0fa07297f53852e744ea389e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 8 12:41:57 2011 -0700

    Add L2ARC tunables

    The performance of the L2ARC can be tweaked by a number of tunables, which
    may be necessary for different workloads:

         l2arc_write_max         max write bytes per interval
         l2arc_write_boost       extra write bytes during device warmup
         l2arc_noprefetch        skip caching prefetched buffers
         l2arc_headroom          number of max device writes to precache
         l2arc_feed_secs         seconds between L2ARC writing
         l2arc_feed_min_ms       min feed interval in milliseconds
         l2arc_feed_again        turbo L2ARC warmup
         l2arc_norw              no reads during writes

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

commit e0f86c98620bbc085a7edddd8f6dbf82e4783a46
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 8 12:16:09 2011 -0700

    Update 'zfs send' documentation

    The -D and -p options were missing from the manpage.  This commit
    adds documentation for these features.

    Closes #311

commit 1fa3bb750d0418dc4a5a3abd2bd8cce9c205c9e1
Author: Fajar A. Nugraha <github@fajar.net>
Date:   Thu Jul 7 14:25:53 2011 +0700

    Remove zfs service only on uninstall, not on upgrade

    This caused problems on upgrade using RPM:

    * The new version will run chkconfig --add, which has no effect
      since the service was already added.

    * The old version will run chkconfig --del, which caused zfs
      service removal.

    Only run "chkconfig --del" on complete uninstall, by checking
    the value of "$1" to %preun, which will be "0" on uninstall,
    and "1" on upgrade.

      http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html

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

commit 3af2ce4d6883ab96814fb1d0bc01368bb06c5343
Author: Fajar A. Nugraha <github@fajar.net>
Date:   Thu Jul 7 14:22:19 2011 +0700

    Check for "udevadm settle" vs "udevsettle"

    RHEL5 does not have udevadm, so fix initscript accordingly

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

commit 341b5f1d4c03c0f318218346154e2fb79a8acb92
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jul 6 11:36:54 2011 -0700

    Update ztest paths

    Unfortunately, ztest is hard coded to export the zdb utility to
    be installed in a certain location.  When the packaging was updated
    to install zdb in /sbin/ ztest was broken.  To fix this I'm updating
    ztest to check both common install paths.

commit b1c932d318ae604b6968ffef136952af4e80a407
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jul 5 12:12:08 2011 -0700

    Add proper library versioning

    The zfs libraries were never properly versioned.  Since the API has
    remained static for quite some time this we never an issue.  However,
    going forward they should be versioned.  This commit versions all
    of the libraries to 1.0.0.  From here on out this version must be
    updated to reflect changes to the library.

commit 8b0cf399ff9e764a08faea654bd30043a861cb09
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sun Jul 3 02:43:25 2011 +0200

    Updated init scripts to enable automatic sharing of ZFS datasets.

    The relevant init scripts were updated so as to automatically share
    ZFS datasets using "zfs share -a" at boot time.

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

commit 3c9609b322db2925aff628217eca9297d6fb569b
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sat Jul 2 21:34:12 2011 +0200

    Renamed HAVE_SHARE ifdefs to HAVE_SMB_SHARE.

    The remaining code that is guarded by HAVE_SHARE ifdefs is related to the
    .zfs/shares functionality which is currently not available on Linux.

    On Solaris the .zfs/shares directory can be used to set permissions for
    SMB shares.

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

commit 52e7c3a2e503f78a44fbe5fd9299b11c3aa98651
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sat Jul 2 21:34:08 2011 +0200

    Link libshare directly to libzfs

    Drop usage of dlopen/dlsym for libshare.  There is no need to do
    this because the zfs packages provide libshare.  Unlike on Solaris
    we are guaranteed it will be available.

    This avoids possible problems with hardcoding the libshare path in
    the code (e.g. when users specify a different install path via
    configure options).  It additionally simplifies the code which is
    good for maintainability.

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

commit 46e18b3f0fc13aa0859d0fef7dc829db20491ab6
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sat Jul 2 21:34:05 2011 +0200

    Implemented sharing datasets via NFS using libshare.

    The sharenfs and sharesmb properties depend on the libshare library
    to export datasets via NFS and SMB. This commit implements the base
    libshare functionality as well as support for managing NFS shares.

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

commit dc2a4a9136ab5f6e56f9ca8581ec1535adce6c36
Author: Zachary Bedell <zac@thebedells.org>
Date:   Mon Jul 4 14:38:10 2011 -0400

    Document initramfs process

    Add documentation for Dracut and the initramfs process.  This includes
    detailing the basic boot process and options available.

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

commit fde4ce992db516796df3a7d1c0e018c5f8c537f6
Author: Zachary Bedell <zac@thebedells.org>
Date:   Mon Jul 4 13:25:31 2011 -0400

    Update for Dracut-010

    Update Dracut module for Dracut-010 and fix race conditions that
    caused boot to fail on MP systems.  Add support for zfs_force flag
    and parsing of spl_hostid from kernel command line.

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

commit e93ced48475b697734ae4fbc65c4e600b9752849
Author: Zachary Bedell <zac@thebedells.org>
Date:   Mon Jul 4 14:58:51 2011 -0700

    Update zfs.gentoo/zfs.lsb init script

    * Update paths to zpool/zfs tools,
    * Log less for non-error conditions,
    * Don't be fatal if umount fails at shutdown -- final init remount
      will take care of it if /usr or / are in use

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

commit c8082367cfe9954f0e932fb1513b518d8b84022d
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sun Jul 3 02:38:50 2011 +0200

    Removed erroneous backticks in the zfs.lunar init script.

    The backticks would cause the output of the zfs commands
    to be evaluated as input for the if construct rather than
    their exit status.

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

commit 0f4524cca43b1718d54970fcaf0201541733903c
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sun Jul 3 02:35:58 2011 +0200

    Fixed indentation in the zfs.lunar init script.

    One of the blocks in the init script wasn't indented properly.

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

commit 5a52105925e461e45f4948fc77695b25d3fa3009
Author: Prasad Joshi <pjoshi@stec-inc.com>
Date:   Mon Jul 4 23:45:35 2011 +0100

    Use consistent error message in zpool sub-command

    The zpool sub-commands like iostat, list, and status should
    display consistent message when a given pool is unavailable or
    no pool is present.  This change unifies the default behavior
    as follows:

      root@prasad:~# ./zpool list 1 2
      no pools available
      no pools available

      root@prasad:~# ./zpool iostat  1 2
      no pools available
      no pools available

      root@prasad:~# ./zpool status 1 2
      no pools available
      no pools available

      root@prasad:~# ./zpool list tan 1 2
      cannot open 'tan': no such pool

      root@prasad:~# ./zpool iostat tan 1 2
      cannot open 'tan': no such pool

      root@prasad:~# ./zpool status tan 1 2
      cannot open 'tan': no such pool

    Reported-by: Rajshree Thorat <rthorat@stec-inc.com>
    Signed-off-by: Prasad Joshi <pjoshi@stec-inc.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

    Closes #306

commit b59322a0d8919cc0ed5982f5a869e9e022645515
Author: Andrew Tselischev <andrewtselischev@gmail.com>
Date:   Mon Jul 4 01:49:41 2011 -0700

    Fix 'rc_parallel="YES"' error

    If rc_parallel="YES" zfs starts before localmount, which leads
    to "No such file or directory" error on systems with /usr on a
    separate partition.

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

commit b2f25e00ec993e0cefcc70f0ccf00cf746fc1739
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 1 15:24:34 2011 -0700

    Prep zfs-0.6.0-rc5 tag

    Create the fifth 0.6.0 release candidate tag (rc5).

commit 285226eff39b807c154748a75cef57ddff08a352
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 30 09:38:52 2011 -0700

    Always allow non-user xattrs

    Under Linux you may only disable USER xattrs.  The SECURITY,
    SYSTEM, and TRUSTED xattr namespaces must always be available
    if xattrs are supported by the filesystem.  The enforcement
    of USER xattrs is performed in the zpl_xattr_user_* handlers.

    Under Solaris there is only a single xattr namespace which
    is managed globally.

commit f2cfee80e3f94cd9d67c3f1abec97c9a5a5ecc17
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jun 29 15:03:36 2011 -0700

    Fix implicit declaration of 'mkdirp'

    The lib/libspl/include/libgen.h header file was being mistakenly
    left out of the 'make dist' tarball.  It just happens this doesn't
    cause a build failure when creating packages because the system
    libgen/h is included instead.  This simply results in the following
    warning due to the missing forward declaration of mkdirp().

      ../../lib/libzfs/libzfs_mount.c:417:3: warning: implicit declaration
      of function 'mkdirp' [-Wimplicit-function-declaration]

commit a89c3e0bd509267225b5699c65aaf39acf2fce18
Author: Rohan Puri <rohan.puri15@gmail.com>
Date:   Wed Jun 29 11:00:58 2011 -0700

    Support mandatory locks (nbmand)

    The Linux kernel already has support for mandatory locking.  This
    change just replaces the Solaris mandatory locking calls with the
    Linux equivilants.  In fact, it looks like this code could be
    removed entirely because this checking is already done generically
    in the Linux VFS.  However, for now we'll leave it in place even
    if it is redundant just in case we missed something.

    The original patch to update the code to support mandatory locking
    was done by Rohan Puri.  This patch is an updated version which is
    compatible with the previous mount option handling changes.

    Original-Patch-by: Rohan Puri <rohan.puri15@gmail.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Closes #222
    Closes #253

commit 2cf7f52bc42f215d4ef27d0fd75fc1b1417cb841
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu May 19 11:44:07 2011 -0700

    Linux compat 2.6.39: mount_nodev()

    The .get_sb callback has been replaced by a .mount callback
    in the file_system_type structure.  When using the new
    interface the caller must now use the mount_nodev() helper.

    Unfortunately, the new interface no longer passes the vfsmount
    down to the zfs layers.  This poses a problem for the existing
    implementation because we currently save this pointer in the
    super block for latter use.  It provides our only entry point
    in to the namespace layer for manipulating certain mount options.

    This needed to be done originally to allow commands like
    'zfs set atime=off tank' to work properly.  It also allowed me
    to keep more of the original Solaris code unmodified.  Under
    Solaris there is a 1-to-1 mapping between a mount point and a
    file system so this is a fairly natural thing to do.  However,
    under Linux they many be multiple entries in the namespace
    which reference the same filesystem.  Thus keeping a back
    reference from the filesystem to the namespace is complicated.

    Rather than introduce some ugly hack to get the vfsmount and
    continue as before.  I'm leveraging this API change to update
    the ZFS code to do things in a more natural way for Linux.
    This has the upside that is resolves the compatibility issue
    for the long term and fixes several other minor bugs which
    have been reported.

    This commit updates the code to remove this vfsmount back
    reference entirely.  All modifications to filesystem mount
    options are now passed in to the kernel via a '-o remount'.
    This is the expected Linux mechanism and allows the namespace
    to properly handle any options which apply to it before passing
    them on to the file system itself.

    Aside from fixing the compatibility issue, removing the
    vfsmount has had the benefit of simplifying the code.  This
    change which fairly involved has turned out nicely.

    Closes #246
    Closes #217
    Closes #187
    Closes #248
    Closes #231

commit 5c03efc379693f992ebe39c6a00c7297c4a304ea
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu May 19 12:47:32 2011 -0700

    Linux compat 2.6.39: security_inode_init_security()

    The security_inode_init_security() function now takes an additional
    qstr argument which must be passed in from the dentry if available.
    Passing a NULL is safe when no qstr is available the relevant
    security checks will just be skipped.

    Closes #246
    Closes #217
    Closes #187

commit bd2f5ac97f4265523fb1397d845eabb8647c79e4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 16 12:14:33 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 e2e7aa2df88708cdcae87688a69ba3f5d1cc43ed
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 1 11:25:07 2011 -0700

    Add ZFS specific mmap() checks

    Under Linux the VFS handles virtually all of the mmap() access
    checks.  Filesystem specific checks are left to be handled in
    the .mmap() hook and normally there arn't any.

    However, ZFS provides a few attributes which can influence the
    mmap behavior and should be honored.  Note, currently the code
    to modify these attributes has not been implemented under Linux.

    * ZFS_IMMUTABLE | ZFS_READONLY | ZFS_APPENDONLY: when any of these
      attributes are set a file may not be mmaped with write access.

    * ZFS_AV_QUARANTINED: when set a file file may not be mmaped with
      read or exec access.

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

commit f0b2486034f6a4d8cd1a139ff4604e6b9629a64e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jul 1 09:16:15 2011 -0700

    Remove unused MMAP functions

    The following functions were required for the OpenSolaris mmap
    implementation.  Because the Linux VFS does most the most heavy
    lifting for us they are not required and are being removed to
    keep the code clean and easy to understand.

      * zfs_null_putapage()
      * zfs_frlock()
      * zfs_no_putpage()

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

commit dde471ef5a07bd569deeadd3e9a88655db3e10ab
Author: Prasad Joshi <pjoshi@stec-inc.com>
Date:   Sat May 28 02:53:07 2011 +0100

    MMAP Optimization

    Enable zfs_getpage, zfs_fillpage, zfs_putpage, zfs_putapage functions.
    The functions have been modified to make them Linux friendly.

    ZFS uses these functions to read/write the mmapped pages. Using them
    from readpage/writepage results in clear code. The patch also adds
    readpages and writepages interface functions to read/write list of
    pages in one function call.

    The code change handles the first mmap optimization mentioned on
    https://github.com/behlendorf/zfs/issues/225

    Signed-off-by: Prasad Joshi <pjoshi@stec-inc.com>
    Signed-off-by: Brian Behlendorf <behlendorf@llnl.gov>
    Issue #255

commit 2a005961a48e748632e96272915192dab6ce9401
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 30 14:45:33 2011 -0700

    Ensure all block devices are available

    These days most disk drivers will probe for devices asynchronously.
    This means it's possible that when you zfs init script runs all the
    required block devices may not yet have been discovered.  The result
    is the pool may fail to cleanly import at boot time.  This is
    particularly common when you have a large number of devices.

    The fix is for the init script to block until udev settles and we
    are no longer detecting new devices.  Once the system has settled
    the zfs modules can be loaded and the pool with be automatically
    imported.

commit 218b8eafbdcb9bc19fc5a252fdd411fde11bca48
Author: Prasad Joshi <pjoshi@stec-inc.com>
Date:   Sat Jun 25 15:06:37 2011 +0100

    Use truncate_setsize in zfs_setattr

    According to Linux kernel commit 2c27c65e, using truncate_setsize in
    setattr simplifies the code. Therefore, the patch replaces the call
    to vmtruncate() with truncate_setsize().

    zfs_setattr uses zfs_freesp to free the disk space belonging to the
    file.  As truncate_setsize may release the page cache and flushing
    the dirty data to disk, it must be called before the zfs_freesp.

    Suggested-by: Brian Behlendorf <behlendorf1@llnl.gov>
    Signed-off-by: Prasad Joshi <pjoshi@stec-inc.com>
    Closes #255

commit b312979252c5b566d2f59febcda67f309637e18c
Author: Prasad Joshi <pjoshi@stec-inc.com>
Date:   Sat Jun 25 13:30:29 2011 +0100

    Tear down and flush the mmap region

    The inode eviction should unmap the pages associated with the inode.
    These pages should also be flushed to disk to avoid the data loss.
    Therefore, use truncate_setsize() in evict_inode() to release the
    pagecache.

    The API truncate_setsize() was added in 2.6.35 kernel. To ensure
    compatibility with the old kernel, the patch defines its own
    truncate_setsize function.

    Signed-off-by: Prasad Joshi <pjoshi@stec-inc.com>
    Closes #255

commit 560bcf9d14a63e2cef4dd49d61399c8a865c1348
Author: Ned A. Bass <bass6@llnl.gov>
Date:   Tue Jun 21 16:18:27 2011 -0700

    Multipath device manageability improvements

    Update udev helper scripts to deal with device-mapper devices created
    by multipathd.  These enhancements are targeted at a particular
    storage network topology under evaluation at LLNL consisting of two
    SAS switches providing redundant connectivity between multiple server
    nodes and disk enclosures.

    The key to making these systems manageable is to create shortnames for
    each disk that conveys its physical location in a drawer.  In a
    direct-attached topology we infer a disk's enclosure from the PCI bus
    number and HBA port number in the by-path name provided by udev.  In a
    switched topology, however, multiple drawers are accessed via a single
    HBA port.  We therefore resort to assigning drawer identifiers based
    on which switch port a drive's enclosure is connected to.  This
    information is available from sysfs.

    Add options to zpool_layout to generate an /etc/zfs/zdev.conf using
    symbolic links in /dev/disk/by-id of the form
    <label>-<UUID>-switch-port:<X>-slot:<Y>.  <label> is a string that
    depends on the subsystem that created the link and defaults to
    "dm-uuid-mpath" (this prefix is used by multipathd).  <UUID> is a
    unique identifier for the disk typically obtained from the scsi_id
    program, and <X> and <Y> denote the switch port and disk slot numbers,
    respectively.

    Add a callout script sas_switch_id for use by multipathd to help
    create symlinks of the form described above.  Update zpool_id and the
    udev zpool rules file to handle both multipath devices and
    conventional drives.

commit 7e7baecaa321ce4e96938a02b87ab22a7939e422
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jun 21 14:26:51 2011 -0700

    Linux 3.0 compat, shrinker compatibility

    To accomindate the updated Linux 3.0 shrinker API the spl
    shrinker compatibility code was updated.  Unfortunately, this
    couldn't be done cleanly without slightly adjusting the comapt
    API.  See spl commit a55bcaad181096d764e12d847e3091cd7b15509a.

    This commit updates the ZFS code to use the slightly modified
    API.  You must use the latest SPL if your building ZFS.

commit b00131d43ca344d4b205a03ab3eb771a060e5087
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Mon Jun 20 10:36:58 2011 -0700

    Fix unlink/xattr deadlock

    The problem here is that prune_icache() tries to evict/delete
    both the xattr directory inode as well as at least one xattr
    inode contained in that directory. Here's what happens:

    1. File is created.
    2. xattr is created for that file (behind the scenes a xattr
       directory and a file in that xattr directory are created)
    3. File is deleted.
    4. Both the xattr directory inode and at least one xattr
       inode from that directory are evicted by prune_icache();
       prune_icache() acquires a lock on both inodes before it
       calls ->evict() on the inodes

    When the xattr directory inode is evicted zfs_zinactive attempts
    to delete the xattr files contained in that directory. While
    enumerating these files zfs_zget() is called to obtain a reference
    to the xattr file znode - which tries to lock the xattr inode.
    However that very same xattr inode was already locked by
    prune_icache() further up the call stack, thus leading to a
    deadlock.

    This can be reliably reproduced like this:
    $ touch test
    $ attr -s a -V b test
    $ rm test
    $ echo 3 > /proc/sys/vm/drop_caches

    This patch fixes the deadlock by moving the zfs_purgedir() call to
    zfs_unlinked_drain().  Instead zfs_rmnode() now checks whether the
    xattr dir is empty and leaves the xattr dir in the unlinked set if
    it finds any xattrs.

    To ensure zfs_unlinked_drain() never accesses a stale super block
    zfsvfs_teardown() has been update to block until the iput taskq
    has been drained.  This avoids a potential race where a file with
    an xattr directory is removed and the file system is immediately
    unmounted.

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

commit 6f0cf71e0d191abb850a45f6d216cb5af158a6dd
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Thu Jun 16 20:59:56 2011 +0200

    Removed erroneous zfs_inode_destroy() calls from zfs_rmnode().

    iput_final() already calls zpl_inode_destroy() -> zfs_inode_destroy()
    for us after zfs_zinactive(), thus making sure that the inode is
    properly cleaned up.

    The zfs_inode_destroy() calls in zfs_rmnode() would lead to a
    double-free.

    Fixes #282

commit df30f56639f96175ba71d83b4456ccf410c46542
Author: Christian Kohlschütter <christian@kohlschutter.com>
Date:   Thu Jun 16 21:56:38 2011 +0200

    Add "ashift" property to zpool create

    Some disks with internal sectors larger than 512 bytes (e.g., 4k) can
    suffer from bad write performance when ashift is not configured
    correctly.  This is caused by the disk not reporting its actual sector
    size, but a sector size of 512 bytes.  The drive may behave this way
    for compatibility reasons.  For example, the WDC WD20EARS disks are
    known to exhibit this behavior.

    When creating a zpool, ZFS takes that wrong sector size and sets the
    "ashift" property accordingly (to 9: 1<<9=512), whereas it should be
    set to 12 for 4k sectors (1<<12=4096).

    This patch allows an adminstrator to manual specify the known correct
    ashift size at 'zpool create' time.  This can significantly improve
    performance in certain cases.  However, it will have an impact on your
    total pool capacity.  See the updated ashift property description
    in the zpool.8 man page for additional details.

    Valid values for the ashift property range from 9 to 17 (512B-128KB).
    Additionally, you may set the ashift to 0 if you wish to auto-detect
    the sector size based on what the disk reports, this is the default
    behavior.  The most common ashift values are 9 and 12.

      Example:
      zpool create -o ashift=12 tank raidz2 sda sdb sdc sdd

    Closes #280

    Original-patch-by: Richard Laager <rlaager@wiktel.com>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 96801d290652812780cf6c070729154d4af8e1ce
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 16 20:20:22 2011 +0200

    Linux 2.6.37 compat, WRITE_FLUSH_FUA

    The WRITE_FLUSH, WRITE_FUA, and WRITE_FLUSH_FUA flags have been
    introduced as a replacement for WRITE_BARRIER.  This was done
    to allow richer semantics to be expressed to the block layer.
    It is the block layers responsibility to choose the correct way
    to implement these semantics.

    This change simply updates the bio's to use the new kernel API
    which should be absolutely safe.  However, since ZFS depends
    entirely on this working as designed for correctness we do
    want to be careful.

    Closes #281

commit db97f88646b0d59e8e3db9144006491fb2192854
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 17 11:47:45 2011 -0700

    Update rpm/deb packages to be FHS compliant

    This change is the first step towards updating the default
    rpm/deb packages to be FHS compliant.  It accomplishes this
    by passing the following options to ./configure to ensure the
    zfs build products are installed in FHS compliant locations.

      ./configure --prefix=/ --bindir=/lib/udev \
        --libexecdir=/usr/libexec --datadir=/usr/share

    The core zfs utilities (zfs, zpool, zdb) are now be installed
    in /sbin, the core libraries in /lib, and the udev helpers
    (zpool_id, zvol_id) are in /lib/udev with the other udev
    helpers.

    The remaining files in the zfs package remain in their
    previous locations under /usr.

commit b772aedeeca32d56ee1509128aa34b7209c01fb7
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Fri Jun 17 10:12:25 2011 -0700

    Autogen refresh.

    Run autogen.sh using the same autotools versions as upstream:

     * autoconf-2.63
     * automake-1.11.1
     * libtool-2.2.6b

commit 47a2455fbc10254ef38622b838d2dd8575709726
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 17 12:23:21 2011 -0700

    Use datadir not datarootdir for dracut

    The zfs dracut modules should be installed under the --datadir
    not --datarootdir path.  This was just an oversight in the
    original Makefile.am.

    After this change %{_datadir} can now be set safely in the
    zfs.spec file.  The 'make install' location is now consistent
    with the location expected by the spec file.

commit b9f27ee76582fa7826ca930889f8c281430c6b7a
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Fri Jun 17 10:02:36 2011 -0500

    Fix autoconf variable substitution in udev rules.

    Change the variable substitution in the udev rule templates
    according to the method described in the Autoconf manual;
    Chapter 4.7.2: Installation Directory Variables.

    The udev rules are improperly generated if the bindir parameter
    overrides the prefix parameter during configure. For example:

      # ./configure --prefix=/usr/local --bindir=/opt/zfs/bin

    The udev helper is installed as /opt/zfs/bin/zpool_id, but the
    corresponding udev rule has a different path:

      # /usr/local/etc/udev/rules.d/60-zpool.rules
      ENV{DEVTYPE}=="disk", IMPORT{program}="/usr/local/bin/zpool_id -d %p"

    The @bindir@ variable expands to "${exec_prefix}/bin", so it cannot
    be used instead of @prefix@ directly.

    This also applies to the zvol_id helper.

    Closes #283.

commit e130330a874f4dec6628c094455180d4113c6aa1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jun 14 16:25:29 2011 -0700

    Handle /etc/mtab -> /proc/mounts symlink

    Under Fedora 15 /etc/mtab is now a symlink to /proc/mounts by
    default.  When /etc/mtab is a symlink the mount.zfs helper
    should not update it.   There was code in place to handle this
    case but it used stat() which traverses the link and then issues
    the stat on /proc/mounts.  We need to use lstat() to prevent the
    link traversal and instead stat /etc/mtab.

    Closes #270

commit 2e08aedba456dccddf6418908a55014e56cad226
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jun 14 15:09:05 2011 -0700

    Always check -Wno-unused-but-set-variable gcc support

    The previous commit 8a7e1ceefa430988c8f888ca708ab307333b4464 wasn't
    quite right.  This check applies to both the user and kernel space
    build and as such we must make sure it runs regardless of what
    the --with-config option is set too.

    For example, if --with-config=kernel then the autoconf test does
    not run and we generate build warnings when compiling the kernel
    packages.

commit 8a7e1ceefa430988c8f888ca708ab307333b4464
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jun 14 11:02:13 2011 -0700

    Check for -Wno-unused-but-set-variable gcc support

    Gcc versions 4.3.2 and earlier do not support the compiler flag
    -Wno-unused-but-set-variable.  This can lead to build failures
    on older Linux platforms such as Debian Lenny.  Since this is
    an optional build argument this changes add a new autoconf check
    for the option.  If it is supported by the installed version of
    gcc then it is used otherwise it is omited.

    See commit's 12c1acde76683108441827ae9affba1872f3afe5 and
    79713039a2b6e0ed223d141b4a8a8455f282d2f2 for the reason the
    -Wno-unused-but-set-variable options was originally added.

commit 10715a018760e1d862b8348e31dc505e832a0904
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sat Jun 11 22:48:49 2011 -0700

    Add default stack checking

    When your kernel is built with kernel stack tracing enabled and you
    have the debugfs filesystem mounted.  Then the zfs.sh script will clear
    the worst observed kernel stack depth on module load and check the worst
    case usage on module removal.  If the stack depth ever exceeds 7000
    bytes the full stack will be printed for debugging.  This is dangerously
    close to overrunning the default 8k stack.

    This additional advisory debugging is particularly valuable when running
    the regression tests on a kernel built with 16k stacks.  In this case,
    almost no matter how bad the stack overrun is you will see be able to
    get a clean stack trace for debugging.  Since the worst case stack usage
    can be highly variable it's helpful to always check the worst case usage.

commit da88a7fbe8876437c25f1006f91ca5595659b8d2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 10 11:20:34 2011 -0700

    Pass -f option for import

    If a pool was not cleanly exported passing the -f flag may be required
    at 'zpool import' time.  Since this test is simply validating that the
    pool can be successfully imported in the absense of the cache file
    always pass the -f to ensure it succeeds.  This failure was observed
    under RHEL6.1.

commit 1b9d8c340f89ca00b0bc99bb0f8a532e2e7a3a1d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 9 13:41:55 2011 -0700

    Fix 'zfs send -D' segfault

    Sending pools with dedup results in a segfault due to a Solaris
    portability issue.  Under Solaris the pipe(2) library call
    creates a bidirectional data channel.  Unfortunately, on Linux
    pipe(2) call creates unidirection data channel.  The fix is to
    use the socketpair(2) function to create the expected
    bidirectional channel.

    Seth Heeren did the original leg work on this issue for zfs-fuse.
    We finally just rediscovered the same portability issue and
    dfurphy was able to point me at the original issue for the fix.

    Closes #268

commit cbc6fab65c201e44de9bda083cfaab209c6b4f7a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 3 15:08:49 2011 -0700

    Sanatize zpios-sanity.sh environment

    Just like zconfig.sh the zpios-sanity.sh tests should run in a
    sanatized environment.  This ensures they never conflict with an
    installed /etc/zfs/zpool.cache file.

    This commit additionally improves the -c cleanup option.  It now
    removes the modules stack if loaded and destroys relevant md devices.
    This behavior is now identical to zconfig.sh.

commit 608860b6d06aaaa647e03fc3f3fc1b49f025155e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jun 3 14:13:25 2011 -0700

    Delay before destroying loopback devices

    Generally I don't approve of just adding an arbitrary delay to
    avoid a problem but in this case I'm going to let it slide.  We
    may need to delay briefly after 'zpool destroy' returns to ensure
    the loopback devices are closed.  If they aren't closed than
    losetup -d will not be able to destroy them.  Unfortunately,
    there's no easy state the check so we'll have to make due with
    a simple delay.

commit 36391312afdfac5584ca40ef1af7721108ce4c20
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 2 10:25:35 2011 -0700

    Always unload zpios.ko on exit

    We should always unload zpios.ko on exit.  This ensures
    that subsequent calls to 'zfs.sh -u' from other utilities
    will be able to unload the module stack and properly
    cleanup.  This is important for the the --cleanup option
    which can be passed to zconfig.sh and zfault.sh.

commit 2ea9dc40f88ed84bc3e8022b91dd33cbce94653f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jun 2 10:13:15 2011 -0700

    Fix zpios-sanity.sh return code

    The zpios-sanity.sh script should return failure when any
    of the individual zpios.sh tests fail.  The previous code
    would always return success suppressing real failures.

commit e95b3bdcbbc64ea502349413234e7c71563e7115
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 25 13:56:40 2011 -0700

    Fix stack ddt_class_contains()

    Stack usage for ddt_class_contains() reduced from 524 bytes to 68
    bytes.  This large stack allocation significantly contributed to
    the likelyhood of a stack overflow when scrubbing/resilvering
    dedup pools.

commit 5b8c7bbcea7ad9ecd5f329d2d736cba8402ee781
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 25 14:13:18 2011 -0700

    Fix stack ddt_zap_lookup()

    Stack usage for ddt_zap_lookup() reduced from 368 bytes to 120
    bytes.  This large stack allocation significantly contributed to
    the likelyhood of a stack overflow when scrubbing/resilvering
    dedup pools.

commit c7f8f831a463e9d7d16e43323b71d9e9e187a4c7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 25 16:09:57 2011 -0700

    Revert "Fix stack traverse_visitbp()"

    This abomination is no longer required because the zio's issued
    during this recursive call path will now be handled asynchronously
    by the taskq thread pool.

    This reverts commit 6656bf56216f36805731298ee0f4de87ae6b6b3d.

commit 2fac4c2a74f1abc54d82068e3ae9a62e9a0468b0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed May 25 15:22:04 2011 -0700

    Make tgx_sync_thread zio's async

    The majority of the recursive operations performed by the dsl
    are done either in the context of the tgx_sync_thread or during
    pool import.  It is these recursive operations which contribute
    greatly to the stack depth.  When this recursion is coupled with
    a synchronous I/O in the same context overflow becomes possible.

    Previously to handle this case I have focused on keeping the
    individual stack frames as light as possible.  This is a good
    idea as long as it can be done in a way which doesn't overly
    complicate the code.  However, there is a better solution.

    If we treat all zio's issued by the tgx_sync_thread as async then
    we can use the tgx_sync_thread stack for the recursive parts, and
    the zio_* threads for the I/O parts.  This effectively doubles our
    available stack space with the only drawback being a small delay
    to schedule the I/O.  However, in practice the scheduling time
    is so much smaller than the actual I/O time this isn't an issue.
    Another benefit of making the zio async is that the zio pipeline
    is now parallel.  That should mean for CPU intensive pipelines
    such as compression or dedup performance may be improved.

    With this change in place the worst case stack usage observed so
    far is 6902 bytes.  This is still higher than I'd like but
    significantly improved.  Additional changes to specific functions
    should improve this further.  This change allows us to revent
    commit 6656bf5 which did some horrible things to the recursive
    traverse_visitbp() callpath in the name of saving stack.

commit f74fae8b305ce3b264489e71adb49c2e4e9e33db
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu May 26 16:48:16 2011 -0700

    Fix 4K sector support

    Yesterday I ran across a 3TB drive which exposed 4K sectors to
    Linux.  While I thought I had gotten this support correct it
    turns out there were 2 subtle bugs which prevented it from
    working.

      sudo ./cmd/zpool/zpool create -f large-sector /dev/sda
      cannot create 'large-sector': one or more devices is currently unavailable

    1) The first issue was that it was possible that bdev_capacity()
    would return the number of 512 byte sectors rather than the number
    of 4096 sectors.  Internally, certain Linux functions only operate
    with 512 byte sectors so you need to be careful.  To avoid any
    confusion in the future I've updated bdev_capacity() to simply
    return the device (or partition) capacity in bytes.  The higher
    levels of ZFS want the value in bytes anyway so this is cleaner.

    2) When creating a bio the ->bi_sector count must always be
    expressed in 512 byte sectors.  The existing code would scale
    the byte offset by the logical sector size.   Until now this was
    always 512 so it never caused problems.  Trying a 4K sector drive
    clearly exposed the issue.  The problem has been fixed by
    hard coding the 512 byte sector which is exactly what the bio
    code does internally.

    With these changes I'm now able to create ZFS pools using 4K
    sector drives.  No issues were observed during fairly extensive
    testing.  This is also a low risk change if your using 512b
    sectors devices because none of the logic changes.

    Closes #256

commit 2b8cad61590d38f70ebf8734484204d7da2da937
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 20 14:23:18 2011 -0700

    Use vmem_alloc() for zfs_ioc_userspace_many()

    The default buffer size when requesting multiple quota entries
    is 100 times the zfs_useracct_t size.  In practice this works out
    to exactly 27200 bytes.  Since this will be a short lived buffer
    in a non-performance critical path it is preferable to vmem_alloc()
    the needed memory.

commit 4804b739e1e851f21f8e98c99275af2570c44a15
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 20 10:25:41 2011 -0700

    Default to internal 'zfs userspace' implementation

    We will never bring over the pyzfs.py helper script from Solaris
    to Linux.  Instead the missing functionality will be directly
    integrated in to the zfs commands and libraries.  To avoid
    confusion remove the warning about the missing pyzfs.py utility
    and simply use the default internal support.

    The Illumous developers are of the same mind and have proposed an
    initial patch to do this which has been integrated in to the 'allow'
    development branch.  After some additional testing this code
    can be merged in to master as the right long term solution.

commit f01b360e67696fff002f5e2b9cf6eedf5ff84f4a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 20 10:12:25 2011 -0700

    Pass caller's credential in zfsdev_ioctl()

    Initially when zfsdev_ioctl() was ported to Linux we didn't have
    any credential support implemented.  So at the time we simply
    passed NULL which wasn't much of a problem since most of the
    secpolicy code was disabled.

    However, one exception is quota handling which does require the
    credential.  Now that proper credentials are supported we can
    safely start passing the callers credential.  This is also an
    initial step towards fully implemented the zfs secpolicy.

commit 3fd70ee6b0bc9fa74b7ef87657b9cc3b0304f689
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon May 9 12:18:46 2011 -0700

    Fix 'negative objects to delete' warning

    Normally when the arc_shrinker_func() function is called the return
    value should be:

       >=0 - To indicate the number of freeable objects in the cache, or
       -1  - To indicate this cache should be skipped

    However, when the shrinker callback is called with 'nr_to_scan' equal
    to zero.  The caller simply wants the number of freeable objects in
    the cache and we must never return -1.  This patch reorders the
    first two conditionals in arc_shrinker_func() to ensure this behavior.

    This patch also now explictly casts arc_size and arc_c_min to signed
    int64_t types so MAX(x, 0) works as expected.  As unsigned types
    we would never see an negative value which defeated the purpose of
    the MAX() lower bound and broke the shrinker logic.

    Finally, when nr_to_scan is non-zero we explictly prevent all reclaim
    below arc_c_min.  This is done to prevent the Linux page cache from
    completely crowding out the ARC.  This limit is tunable and some
    experimentation is likely going to be required to set it exactly right.
    For now we're sticking with the OpenSolaris defaults.

    Closes #218
    Closes #243

commit d9bfe0f57a82fd1a02e93309912008ed1aa83e04
Author: Alexey Shvetsov <alexxy@gentoo.org>
Date:   Sat May 14 18:25:37 2011 +0400

    Fix distribution detection for gentoo

    Also this may fix other distros because some of them also provide
    /etc/lsb-release not only ubuntu.

    Closes #244

commit e814770f2ed14808c7ea8cf8cea034aacb20564a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 13 08:16:10 2011 -0700

    Update synchronous open zfs_close() comment

    The comment in zfs_close() pertaining to decrementing the synchronous
    open count needs to be updated for Linux.  The code was already
    updated to be correct, but the comment was missed and is now misleading.
    Under Linux the zfs_close() hook is only called once when the final
    reference is dropped.  This differs from Solaris where zfs_close()
    is called for each close.

    Closes #237

commit 6f582dc708e713f1d5e1c6871657ac726873b4bf
Author: Alexey Shvetsov <alexxy@gentoo.org>
Date:   Thu May 12 14:54:03 2011 -0700

    Remove root 'ls' after mount workaround

    This workaround was introduced to workaround issue #164.  This
    issue was fixed by commit 5f35b19 so the workaround can be safely
    dropped from both the zfs.fedora and zfs.gentoo init scripts.

commit 06abcdd3f44999f694766b22a5fc42d125aa9bef
Author: Alexey Shvetsov <alexxy@gentoo.org>
Date:   Wed May 11 00:22:35 2011 +0400

    Fix zfs.gentoo init script logic

    * Fix zfs.ko module check
    * Check 'zfs umount -a' return value

commit 04c22478a7365622a8f3c7fd7d0046fe41813075
Author: Alexey Shvetsov <alexxy@gentoo.org>
Date:   Tue May 10 23:45:19 2011 +0400

    Make zfs.gentoo init script more gentoo style.

    * Improved compatibility with openrc
    * Removed LOCKFILE
    * Improved checksystem() function
    * Remove /etc/mtab check for /
    * General cleanup

commit c91d2298096cfe376000ee3e63b73b92bafae2e9
Merge: 21ade34 aa6d8c1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon May 9 16:41:28 2011 -0700

    Merge pull request #235 from nedbass/rdev

    Don't store rdev in SA for FIFOs and sockets

commit aa6d8c10864dd532b1577a84a22da2eaee10fcfd
Author: Ned A. Bass <bass6@llnl.gov>
Date:   Mon May 9 12:31:56 2011 -0700

    Don't store rdev in SA for FIFOs and sockets

    Update the handling of named pipes and sockets to be consistent with
    other platforms with regard to the rdev attribute.  While all ZFS
    ipmlementations store the rdev for device files in a system attribute
    (SA), this is not the case for FIFOs and sockets.  Indeed, Linux always
    passes rdev=0 to mknod() for FIFOs and sockets, so the value is not
    needed.  Add an ASSERT that rdev==0 for FIFOs and sockets to detect if
    the expected behavior ever changes.

    Closes #216

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

    Disable direct reclaim for z_wr_* threads

    The direct reclaim path in the z_wr_* threads must be disabled
    to ensure forward progress is always maintained for txg processing.
    This ensures that a txg will never get stuck waiting on itself
    because it entered the following memory reclaim callpath.

      ->prune_icache()->dispose_list()->zpl_clear_inode()->zfs_inactive()
      ->dmu_tx_assign()->dmu_tx_wait()->tgx_wait_open()

    It would be preferable to target this exact code path but the
    kernel offers no way to do this without custom patches.  To avoid
    this we are forced to disable all reclaim for these threads.  It
    should not be necessary to do this for other other z_* threads
    because they will not hold a txg open.

    Closes #232

commit 3117dd0b9005eb76e483b9772c493883b82998bb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 6 12:23:34 2011 -0700

    Handle NULL in nfsd .fsync() hook

    How nfsd handles .fsync() has been changed a couple of times in the
    recent kernels.  But basically there are three cases we need to
    consider.

    Linux 2.6.12 - 2.6.33
    * The .fsync() hook takes 3 arguments
    * The nfsd will call .fsync() with a NULL file struct pointer.

    Linux 2.6.34
    * The .fsync() hook takes 3 arguments
    * The nfsd no longer calls .fsync() but instead used sync_inode()

    Linux 2.6.35 - 2.6.x
    * The .fsync() hook takes 2 arguments
    * The nfsd no longer calls .fsync() but instead used sync_inode()

    For once it looks like we've gotten lucky.  The first two cases can
    actually be collased in to one if we stop using the file struct
    pointer entirely.  Since the dentry is still passed in both cases
    this is possible.  The last case can then be safely handled by
    unconditionally using the dentry in the file struct pointer now
    that we know the nfsd caller has been removed.

    Closes #230

commit 6ee44e32be259706aed9b1439b71971a165b198c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 6 10:16:04 2011 -0700

    Fix awk usage

    The zpool_id and zpool_layout helper scripts have been updated to
    use the more common /usr/bin/awk symlink.  On Fedora/Redhat systems
    there are both /bin/awk and /usr/bin/awk symlinks to your installed
    version of awk.  On Debian/Ubuntu systems only the /usr/bin/awk
    symlink exists.

    Additionally, add the '\<' token to the beginning of the regex
    pattern to prevent partial matches.  This pattern only appears to
    work with gawk despite the mawk man page claiming to support this
    extended regex.  Thus you will need to have gawk installed to use
    these optional helper scripts.  A comment has been added to the
    script to reflect this reality.

commit 34b84cb831695b276788493048ea34f8af8d5bdf
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 6 09:59:52 2011 -0700

    Use vmem_alloc() for zfs_ioc_pool_get_history()

    The default buffer size when requesting history is 128k.  This
    is far to large for a kmem_alloc() so instead use the slower
    vmem_alloc().  This path has no performance concerns and the
    buffer is immediately free'd after its contents are copied to
    the user space buffer.

commit 3613204cd7e3ab1ae658e31dac875e58827a6655
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu May 5 09:40:57 2011 -0700

    Allow mounting of read-only snapshots

    With the addition of the mount helper we accidentally regressed
    the ability to manually mount snapshots.  This commit updates
    the mount helper to expect the possibility of a ZFS_TYPE_SNAPSHOT.
    All snapshot will be automatically treated as 'legacy' type mounts
    so they can be mounted manually.

commit c409e4647f221ab724a0bd10c480ac95447203c3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue May 3 15:09:28 2011 -0700

    Add missing ZFS tunables

    This commit adds module options for all existing zfs tunables.
    Ideally the average user should never need to modify any of these
    values.  However, in practice sometimes you do need to tweak these
    values for one reason or another.  In those cases it's nice not to
    have to resort to rebuilding from source.  All tunables are visable
    to modinfo and the list is as follows:

    $ modinfo module/zfs/zfs.ko
    filename:       module/zfs/zfs.ko
    license:        CDDL
    author:         Sun Microsystems/Oracle, Lawrence Livermore National Laboratory
    description:    ZFS
    srcversion:     8EAB1D71DACE05B5AA61567
    depends:        spl,znvpair,zcommon,zunicode,zavl
    vermagic:       2.6.32-131.0.5.el6.x86_64 SMP mod_unload modversions
    parm:           zvol_major:Major number for zvol device (uint)
    parm:           zvol_threads:Number of threads for zvol device (uint)
    parm:           zio_injection_enabled:Enable fault injection (int)
    parm:           zio_bulk_flags:Additional flags to pass to bulk buffers (int)
    parm:           zio_delay_max:Max zio millisec delay before posting event (int)
    parm:           zio_requeue_io_start_cut_in_line:Prioritize requeued I/O (bool)
    parm:           zil_replay_disable:Disable intent logging replay (int)
    parm:           zfs_nocacheflush:Disable cache flushes (bool)
    parm:           zfs_read_chunk_size:Bytes to read per chunk (long)
    parm:           zfs_vdev_max_pending:Max pending per-vdev I/Os (int)
    parm:           zfs_vdev_min_pending:Min pending per-vdev I/Os (int)
    parm:           zfs_vdev_aggregation_limit:Max vdev I/O aggregation size (int)
    parm:           zfs_vdev_time_shift:Deadline time shift for vdev I/O (int)
    parm:           zfs_vdev_ramp_rate:Exponential I/O issue ramp-up rate (int)
    parm:           zfs_vdev_read_gap_limit:Aggregate read I/O over gap (int)
    parm:           zfs_vdev_write_gap_limit:Aggregate write I/O over gap (int)
    parm:           zfs_vdev_scheduler:I/O scheduler (charp)
    parm:           zfs_vdev_cache_max:Inflate reads small than max (int)
    parm:           zfs_vdev_cache_size:Total size of the per-disk cache (int)
    parm:           zfs_vdev_cache_bshift:Shift size to inflate reads too (int)
    parm:           zfs_scrub_limit:Max scrub/resilver I/O per leaf vdev (int)
    parm:           zfs_recover:Set to attempt to recover from fatal errors (int)
    parm:           spa_config_path:SPA config file (/etc/zfs/zpool.cache) (charp)
    parm:           zfs_zevent_len_max:Max event queue length (int)
    parm:           zfs_zevent_cols:Max event column width (int)
    parm:           zfs_zevent_console:Log events to the console (int)
    parm:           zfs_top_maxinflight:Max I/Os per top-level (int)
    parm:           zfs_resilver_delay:Number of ticks to delay resilver (int)
    parm:           zfs_scrub_delay:Number of ticks to delay scrub (int)
    parm:           zfs_scan_idle:Idle window in clock ticks (int)
    parm:           zfs_scan_min_time_ms:Min millisecs to scrub per txg (int)
    parm:           zfs_free_min_time_ms:Min millisecs to free per txg (int)
    parm:           zfs_resilver_min_time_ms:Min millisecs to resilver per txg (int)
    parm:           zfs_no_scrub_io:Set to disable scrub I/O (bool)
    parm:           zfs_no_scrub_prefetch:Set to disable scrub prefetching (bool)
    parm:           zfs_txg_timeout:Max seconds worth of delta per txg (int)
    parm:           zfs_no_write_throttle:Disable write throttling (int)
    parm:           zfs_write_limit_shift:log2(fraction of memory) per txg (int)
    parm:           zfs_txg_synctime_ms:Target milliseconds between tgx sync (int)
    parm:           zfs_write_limit_min:Min tgx write limit (ulong)
    parm:           zfs_write_limit_max:Max tgx write limit (ulong)
    parm:           zfs_write_limit_inflated:Inflated tgx write limit (ulong)
    parm:           zfs_write_limit_override:Override tgx write limit (ulong)
    parm:           zfs_prefetch_disable:Disable all ZFS prefetching (int)
    parm:           zfetch_max_streams:Max number of streams per zfetch (uint)
    parm:           zfetch_min_sec_reap:Min time before stream reclaim (uint)
    parm:           zfetch_block_cap:Max number of blocks to fetch at a time (uint)
    parm:           zfetch_array_rd_sz:Number of bytes in a array_read (ulong)
    parm:           zfs_pd_blks_max:Max number of blocks to prefetch (int)
    parm:           zfs_dedup_prefetch:Enable prefetching dedup-ed blks (int)
    parm:           zfs_arc_min:Min arc size (ulong)
    parm:           zfs_arc_max:Max arc size (ulong)
    parm:           zfs_arc_meta_limit:Meta limit for arc size (ulong)
    parm:           zfs_arc_reduce_dnlc_percent:Meta reclaim percentage (int)
    parm:           zfs_arc_grow_retry:Seconds before growing arc size (int)
    parm:           zfs_arc_shrink_shift:log2(fraction of arc to reclaim) (int)
    parm:           zfs_arc_p_min_shift:arc_c shift to calc min/max arc_p (int)

commit 8db77dd7edb5ac98812d3f8632da44018c1c8330
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue May 3 10:29:05 2011 -0700

    Prep zfs-0.6.0-rc4 tag

    Create the fourth 0.6.0 release candidate tag (rc4).

commit 712f8bd87b2d3799107e102652875996fa59647b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon May 2 15:39:59 2011 -0700

    Add Gentoo/Lunar/Redhat Init Scripts

    Every distribution has slightly different requirements for their
    init scripts.  Because of this the zfs package contains several
    init scripts for various distributions.  These scripts have been
    contributed by, and are supported by, the larger zfs community.
    Init scripts for Gentoo/Lunar/Redhat have been contributed by:

      Gentoo - devsk <devsku@gmail.com>
      Lunar  - Jean-Michel Bruenn <jean.bruenn@ip-minds.de>
      Redhat - Fajar A. Nugraha <list@fajar.net>

commit 5f35b190071048f25d66db81ce9763ecd0c1760e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon May 2 14:04:19 2011 -0700

    Fully update inode when created

    When a new znode/inode pair is created both the znode and the inode
    should be immediately updated to the correct values.  This was done
    for the znode and for most of the values in the inode, but not all
    of them.  This normally wasn't a problem because most subsequent
    operations would cause the inode to be immediately updated.  This
    change ensures the inode is now fully updated before it is inserted
    in to the inode hash.

    Closes #116
    Closes #146
    Closes #164

commit df554c148ecfdfb7e597f8ab7eee71388b24a19d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 25 14:36:01 2011 +0700

    Fix 'zfs set volsize=N pool/dataset'

    This change fixes a kernel panic which would occur when resizing
    a dataset which was not open.  The objset_t stored in the
    zvol_state_t will be set to NULL when the block device is closed.
    To avoid this issue we pass the correct objset_t as the third arg.

    The code has also been updated to correctly notify the kernel
    when the block device capacity changes.  For 2.6.28 and newer
    kernels the capacity change will be immediately detected.  For
    earlier kernels the capacity change will be detected when the
    device is next opened.  This is a known limitation of older
    kernels.

    Online ext3 resize test case passes on 2.6.28+ kernels:
    $ dd if=/dev/zero of=/tmp/zvol bs=1M count=1 seek=1023
    $ zpool create tank /tmp/zvol
    $ zfs create -V 500M tank/zd0
    $ mkfs.ext3 /dev/zd0
    $ mkdir /mnt/zd0
    $ mount /dev/zd0 /mnt/zd0
    $ df -h /mnt/zd0
    $ zfs set volsize=800M tank/zd0
    $ resize2fs /dev/zd0
    $ df -h /mnt/zd0

    Original-patch-by: Fajar A. Nugraha <github@fajar.net>
    Closes #68
    Closes #84

commit e90a3de3e8b52061aeb0717b031a956cc1e705d5
Author: Alejandro R. Sedeño <asedeno@mit.edu>
Date:   Fri Apr 29 22:13:23 2011 -0400

    Add zpl_export.c to the list of targets.

commit 94e954257acadca5d858741457282c63bb18c442
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 29 14:03:12 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.

    Closes #165

commit 055656d4f4dfc1a85646a2c0cc10b9dce86da72b
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Thu Apr 28 18:35:50 2011 +0200

    Implemented NFS export_operations.

    Implemented the required NFS operations for exporting ZFS datasets
    using the in-kernel NFS daemon.

commit 5476e6952c1ecbd2debe977eb5c3ec88dfdfea5b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Apr 27 09:32:51 2011 -0700

    Suppress 'vdev_metaslab_init' memory warning

    The vdev_metaslab_init() function has been observed to allocate
    larger than 8k chunks.  However, they are not much larger than 8k
    and it does this infrequently so it is allowed and the warning is
    supressed.

commit 40a39e1103bbbd6908bc1b5cf4af953c7e4706ad
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 26 14:56:04 2011 -0700

    Conserve stack in dsl_scan_visit()

    The dsl_scan_visit() function is a little heavy weight taking 464
    bytes on the stack.  This can be easily reduced for little cost by
    moving zap_cursor_t and zap_attribute_t off the stack and on to the
    heap.  After this change dsl_scan_visit() has been reduced in size
    by 320 bytes.

    This change was made to reduce stack usage in the dsl_scan_sync()
    callpath which is recursive and has been observed to overflow the
    stack.

    Issue #174

commit b81c4ac9af4f9e8b8c27d8011e3ce608cd04737b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 26 15:43:07 2011 -0700

    Conserve stack in dsl_scan_visitbp()

    This function is called recursively so everything possible must be
    done to limit its stack consumption.  The dprintf_bp() debugging
    function adds 30 bytes of local variables to the function we cannot
    afford.  By commenting out this debugging we save 30 bytes per
    recursion and depths of 13 are not uncommon.  This yeilds a total
    stack saving of 390 bytes on our 8k stack.

    Issue #174

commit 7a060636b05655cccd87ce74d70e5957bb234e5e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 22 10:12:49 2011 -0700

    Conserve stack in dsl_scan_visitbp()

    The recursive call chain dsl_scan_visitbp() -> dsl_scan_recurse() ->
    dsl_scan_visitdnode() -> dsl_scan_visitbp has been observed to consume
    considerable stack resulting in a stack overflow (>8k).  The cleanest
    way I see to fix this with minimal impact to the existing flow of
    code, and with the fewest performance concerns, is to always inline
    dsl_scan_recurse() and dsl_scan_visitdnode().  While this will increase
    the function size of dsl_scan_visitbp(), by 4660 bytes, it also reduces
    the stack requirements by removing the function call overhead.

    Issue #174

commit 44e9e3479388ee16f39253e8c3f8f6625324dfc6
Merge: 701b1f8 492b8e9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 26 13:30:27 2011 -0700

    Merged pull request #212 from dajhorn/hostid.

    Use gethostid in the Linux convention.

commit 701b1f8168ebb0ad6b6958b9593488c17adebb44
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 26 12:56:35 2011 -0700

    Fix zvol deadlock

    It's possible for a zvol_write thread to enter direct memory reclaim
    while holding open a transaction group.  This results in the system
    attempting to write out data to the disk to free memory.  Unfortunately,
    this can't succeed because the the thread doing reclaim is holding open
    the txg which must be closed to be synced to disk.  To prevent this
    the offending allocation is marked KM_PUSHPAGE which will prevent it
    from attempting writeback.

    Closes #191

commit 492b8e9e7b6f3df55eed04f7288db6b62c17c668
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Mon Apr 25 10:18:07 2011 -0500

    Use gethostid in the Linux convention.

    Disable the gethostid() override for Solaris behavior because Linux systems
    implement the POSIX standard in a way that allows a negative result.

    Mask the gethostid() result to the lower four bytes, like coreutils does in
    /usr/bin/hostid, to prevent junk bits or sign-extension on systems that have an
    eight byte long type. This can cause a spurious hostid mismatch that prevents
    zpool import on 64-bit systems.

commit a1cc0b3290dcf1b5cf759c89352d8bdb44ee41e6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 22 16:21:26 2011 -0700

    Fix 32-bit MAXOFFSET_T definition

    Having MAXOFFSET_T defined to 0x7fffffffl was artificially limiting
    the maximum file size on 32-bit systems.  In reality MAXOFFSET_T is
    used when working with 'long long' types and as such we now define
    it as LLONG_MAX.  This resolves the 2GB file size limit for files
    and additionally allows zvols greater than 2GB on 32-bit systems.

    Closes #136
    Closes #81

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

    Fix spurious -EFAULT when setting I/O scheduler

    Occasionally we would see an -EFAULT returned when setting the
    I/O scheduler on a vdev.  This was caused an improperly formatted
    user mode helper command.

    This commit restructures the command to something simpler, allocates
    space for it dynamically to save stack, and removes the retry logic
    which is no longer needed.

    Closes #169

commit 6a8f9b6bf0de3e3d09fcfa32e129c978e7641a8f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 30 18:59:17 2011 -0700

    Enforce ARC meta-data limits

    This change ensures the ARC meta-data limits are enforced.  Without
    this enforcement meta-data can grow to consume all of the ARC cache
    pushing out data and hurting performance.  The cache is aggressively
    reclaimed but this is a soft and not a hard limit.  The cache may
    exceed the set limit briefly before being brought under control.

    By default 25% of the ARC capacity can be used for meta-data.  This
    limit can be tuned by setting the 'zfs_arc_meta_limit' module option.
    Once this limit is exceeded meta-data reclaim will occur in 3 percent
    chunks, or may be tuned using 'arc_reduce_dnlc_percent'.

    Closes #193

commit 36df284366caa77cb40083d2e6bcce02274e2f05
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Thu Apr 14 22:07:24 2011 +0200

    Fixed a use-after-free bug in zfs_zget().

    Fixed a bug where zfs_zget could access a stale znode pointer when
    the inode had already been removed from the inode cache via iput ->
    iput_final -> ... -> zfs_zinactive but the corresponding SA handle
    was still alive.

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

commit d247f2a3cc24e8127ec1c5055bf0cd6c39c09add
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Apr 20 10:18:56 2011 -0700

    Suppress 'zfs receive' memory warning

    As part of zfs_ioc_recv() a zfs_cmd_t is allocated in the kernel
    which is 17808 bytes in size.  This sort of thing in general should
    be avoided.  However, since this should be an infrequent event for
    now we allow it and simply suppress the warning with the KM_NODEBUG
    flag.  This can be revisited latter if/when it becomes an issue.

    Closes #178

commit 9caef54224f8a0df2fdf6a16bbdf4037ee7e7a50
Author: Aniruddha Shankar <k@191a.net>
Date:   Wed Apr 20 06:15:21 2011 +0530

    Added required runlevel info for init on Debian

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

commit 3fce1d0962dd28d094589f6d5c3f88a1db12b7cb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 19 16:14:15 2011 -0700

    Update zconfig.sh to use new zvol names

    This change should have occured when we commited the new udev
    rules for zvols.  Basically, the test script is just out of date.
    We need to update it to use the /dev/zvol/ device names, and
    to expect the more common -partN suffixes.

    I added a udev_trigger() call in zconfig_partition() and
    zconfig_zvol_device_stat() to ensure that all the udev rules have
    run before.  This ensures the devices are available to subsequent
    commands and closes a small race.

    Finally, I was forced added a small 'sleep 1' to test 10.  I
    was observing occassional failures in my VM due to the device
    still claiming to be busy.  Delaying betwen the various methods
    of adding/removing a vdev avoids the issue.

    Closes #207

commit 18f42382777b23bf84a698dea7861c943ebd5639
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 19 15:01:37 2011 -0700

    Add parted and lsscsi dependencies to zfs-test

    The zfault.sh and zconfig.sh test scripts requires the parted
    utility, the lsscsi utility, and the scsi_debug module.  To
    ensure the utilities are available they have been added as
    dependencies to zfs-test package.  Checking for scsi_debug
    is a little more problematic because if it's missing you will
    need to build it.  For clarity the documention has been updated
    to mention this.

    Closes #205
    Closes #206

commit cbb1e401f94d1f597274464951e5effdbc7e6887
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 19 14:12:08 2011 -0700

    Add Gunnar Beutner to AUTHORS for his contributions

commit bec30953cdbbb03d2a3791bd1ffe5b062bad0ec3
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sun Apr 17 20:31:33 2011 +0200

    Truncate the xattr znode when updating existing attributes.

    If the attribute's new value was shorter than the old one the old
    code would leave parts of the old value in the xattr znode.

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

commit 274b7e79f3baece5ab28331e73629f6e81fdb5ca
Author: Gunnar Beutner <gunnar@beutner.name>
Date:   Sun Apr 17 19:42:33 2011 +0200

    Added missing initialization for va.va_dentry in zfs_get_xattrdir.

    Without this we may mistakenly believe we have a dentry and try to
    d_instantiate() it.  This will result in the following BUG.  It's
    important to note that while the xattr directory has an inode
    assoicated with it we never create a dentry for it.

      kernel BUG at fs/dcache.c:1418!

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

commit 826ab7ad1931eb8351af1f4f4b7a65f8b0c45839
Author: Richard Laager <rlaager@wiktel.com>
Date:   Sun Apr 10 18:08:53 2011 -0500

    Support IEC base-2 prefixes

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

commit 4da4a9e1a78e14112225fb73de5e465395c9a425
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 22:54:47 2011 -0500

    Cleanup various Sun/Solaris-isms

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

commit 251eb26d17adbdbeec65c8e8c70bcabbeb97959a
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 22:51:04 2011 -0500

    Update the version in the zpool upgrade example

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

commit 3b2041509f667b5706f669d72adddb03179a2111
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 22:47:11 2011 -0500

    Normalize the deferred destruction language

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

commit 0d122e21ff432aafb0cfc6dd0e3e64c40dc69cb1
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 22:41:40 2011 -0500

    Improve the wording about hot spares

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

commit 6b92390fe8c017674e3d15c2426bc5f6b7c499bf
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 22:39:36 2011 -0500

    Improve some quoting consistency

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

commit 577468215b714cddea60239192a457130bb44574
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 22:37:37 2011 -0500

    Remove a stray tab

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

commit 25d4782bac28c96770f71d2ac2c4b3cea3df6296
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 22:34:37 2011 -0500

    Linux has "partitions", not "slices"

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

commit 54e5f2264dbd0895339ad7ab31a7c03d970906b3
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 22:27:25 2011 -0500

    Use Linux disk names in zpool.8

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

commit 1dc3fea59e8fbcf81515a3bc616566e880181161
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 21:54:05 2011 -0500

    More and correct an example in zpool.8

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

commit 1fe2e23771113fd66442b11017b619aacc07bac1
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 21:45:13 2011 -0500

    Change /dev/dsk -> /dev in the man pages

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

commit 2d1b7b0b97d2a75bfeeca3fbdc0682c0176a38da
Author: Richard Laager <rlaager@wiktel.com>
Date:   Fri Apr 8 21:31:11 2011 -0500

    Correct man page section numbers for Linux

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

commit 12c1acde76683108441827ae9affba1872f3afe5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 19 10:39:31 2011 -0700

    Set -Wno-unused-but-set-variable globally

    As of gcc-4.6 the option -Wunused-but-set-variable is enabled by
    default.  While this is a useful warning there are numerous places
    in the ZFS code when a variable is set and then only checked in an
    ASSERT().  To avoid having to update every instance of this in the
    code we now set -Wno-unused-but-set-variable to suppress the warning.

    Additionally, when building with --enable-debug and -Werror set these
    warning also become fatal.  We can reevaluate the suppression of these
    error at a later time if it becomes an issue.  For now we are basically
    just reverting to the previous gcc behavior.

commit 79713039a2b6e0ed223d141b4a8a8455f282d2f2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 19 10:02:21 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.

    Closes #176

commit 03514b01109e0a6ef4eee4914ba7442c380fa6b4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Apr 18 16:44:22 2011 -0700

    Fix gcc compiler warning, parse_option()

    When compiling ZFS in user space gcc-4.6.0 correctly identifies
    the variable 'value' as being set but never used.  This generates a
    warning and a build failure when using --enable-debug.  Once again
    this is correct but I'm reluctant to remove 'value' because we are
    breaking the string in to name/value pairs.  While it is not used
    now there's a good chance it will be soon and I'd rather not have
    to reinvent this.  To suppress the warning with just as a VERIFY().
    This was observed under Fedora 15.

      cmd/mount_zfs/mount_zfs.c: In function ‘parse_option’:
      cmd/mount_zfs/mount_zfs.c:112:21: error: variable ‘value’ set but not
      used [-Werror=unused-but-set-variable]

commit 0fe3d820f5be0cc5733f08aa4a57093c7b8febe6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Apr 18 16:27:45 2011 -0700

    Fix gcc compiler warning, dsl_pool_create()

    When compiling ZFS in user space gcc-4.6.0 correctly identifies
    the variable 'os' as being set but never used.  This generates a
    warning and a build failure when using --enable-debug.  However,
    the code is correct we only want to use 'os' for the kernel space
    builds.  To suppress the warning the call was wrapped with a
    VERIFY() which has the nice side effect of ensuring the 'os'
    actually never is NULL.  This was observed under Fedora 15.

      module/zfs/dsl_pool.c: In function ‘dsl_pool_create’:
      module/zfs/dsl_pool.c:229:12: error: variable ‘os’ set but not used
      [-Werror=unused-but-set-variable]

commit e30c0ada6d0174e044b96fbedf5946c3be66e956
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Apr 18 14:12:28 2011 -0700

    Linux 2.6.39 compat, invalidate_inodes()

    Update code to use the spl_invalidate_inodes() wrapper.  This hides
    some of the complexity of determining if invalidate_inodes() was
    exported, and if so what is its prototype.  The second argument
    of spl_invalidate_inodes() determined the behavior of how dirty
    inodes are handled.  By passing a zero we are indicated that we
    want those inodes to be treated as busy and skipped.

commit cbf81d4c3b1344145519c4187e10251822204889
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Apr 18 12:48:44 2011 -0700

    Autogen refresh for kernel-insert-inode-locked.m4

    Several Makefile.in's were accidentally not updated when the
    kernel-insert-inode-locked.m4 check was added.  This change simply
    refreshes the missed files.

commit 0f6fd32927aa2b9c63d1b527824705924a5a21ca
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Apr 8 10:22:42 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 38baef530de4961390d5862e29cc1a85a3dcefa3
Author: Ned Bass <bass6@llnl.gov>
Date:   Fri Apr 8 09:41:41 2011 -0700

    Align closing fi in mount-zfs.sh

commit c4803a966367517d56d7b7a6becef841e44dabbd
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Apr 7 13:45:57 2011 -0700

    Use consistent indentation in mount-zfs.sh

commit f1329923610fb6281bdde1d99484e636d8de4ed9
Author: Richard Laager <rlaager@wiktel.com>
Date:   Wed Apr 6 23:47:02 2011 -0700

    Fix a couple comments

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

commit 0d3ac5e7356d29fbb7d2880c0a0c457656355ca0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Apr 7 14:23:45 2011 -0700

    Linux 2.6.29 compat, credentials

    The .sync_fs fix as applied did not use the updated SPL credential
    API.  This broke builds on Debian Lenny, this change applies the
    needed fix to use the portable API.  The original credential changes
    are part of commit 81e97e21872a9c38ad66c37fafe1436ee25abee3.

commit 9b1d6001bcfc065e32942c0c3af9f56cc0c26eb7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Apr 7 10:49:55 2011 -0700

    Prep zfs-0.6.0-rc3 tag

    Create the third 0.6.0 release candidate tag (rc3).

commit f5ef7150ead1f6234e18eb3bda0299f34209bbb8
Author: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
Date:   Thu Apr 7 10:34:20 2011 -0700

    Update zfs.fedora init script

    Apply all of Rudd-O's changes for the Fedora init script.  The
    initial init script was one I threw together based on Rudd-O's
    original work.  It worked for me but it has some flaws.

    Rudd-O has invested considerable time updating it to be significantly
    smarter.  It now handles using ZFS as your root filesystem plus
    various other quirks.  Since he is familiar with the right
    way to do things on Fedora and has tested this init script we
    are integrating all of his changes.

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

commit 6583dcacdcca2aad7eaec51f31797a3533845099
Author: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
Date:   Wed Apr 6 09:52:58 2011 -0700

    Permit both mountpoint=legacy and mountpoint=/ in initrd

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

commit 8610b52bd432b7c1eb3da5e67ce4820da82ae638
Author: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
Date:   Tue Mar 22 22:18:07 2011 -0700

    Added .gitignore for mount.zfs and zvol_id

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

commit eec8164771bee067c3cd55ed0a16dadeeba276de
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 31 10:05:58 2011 -0700

    Fix ASSERTION(!dsl_pool_sync_context(tx->tx_pool))

    Disable the normal reclaim path for the txg_sync thread.  This
    ensures the thread will never enter dmu_tx_assign() which can
    otherwise occur due to direct reclaim.  If this is allowed to
    happen the system can deadlock.  Direct reclaim call path:

      ->shrink_icache_memory->prune_icache->dispose_list->
      clear_inode->zpl_clear_inode->zfs_inactive->dmu_tx_assign

commit 7cb67b45f33fd7a61af24c675c7347eb5264b38c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 29 18:08:59 2011 -0700

    Add direct+indirect ARC reclaim

    Under OpenSolaris all memory reclaim is done asyncronously.  Under
    Linux memory reclaim is done asynchronously _and_ synchronously.
    When a process allocates memory with GFP_KERNEL it explicitly allows
    the kernel to do reclaim on its behalf to satify the allocation.
    If that GFP_KERNEL allocation fails the kernel may take more drastic
    measures to reclaim the memory such as killing user space processes.

    This was observed to happen with ZFS because the ARC could consume
    a large fraction of the system memory but no synchronous reclaim
    could be performed on it.  The result was GFP_KERNEL allocations
    could fail resulting in OOM events, and only moments latter the
    arc_reclaim thread would free unused memory from the ARC.

    This change leaves the arc_thread in place to manage the fundamental
    ARC behavior.  But it adds a synchronous (direct) reclaim path for
    the ARC which can be called when memory is badly needed.  It also
    adds an asynchronous (indirect) reclaim path which is called
    much more frequently to prune the ARC slab caches.

commit 1834f2d8b715d25bafbb0e4a099994f45c3211ae
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 24 12:13:55 2011 -0700

    Add missing arcstats

    The following useful values were missing the arcstats.  This change
    adds them in to provide greater visibility in to the arcs behavior.

    arc_no_grow                     4    0
    arc_tempreserve                 4    0
    arc_loaned_bytes                4    0
    arc_meta_used                   4    624774592
    arc_meta_limit                  4    400785408
    arc_meta_max                    4    625594176

commit c85b224fafacafa49817101f26f0a9760a8d05d1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 29 23:04:39 2011 -0700

    Call d_instantiate before unlocking inode

    Under Linux a dentry referencing an inode must be instantiated before
    the inode is unlocked.  To accomplish this without overly modifing
    the core ZFS code the dentry it passed via the vattr_t.  There are
    cases such as replay when a dentry is not available.  In which case
    it is obviously not initialized at inode creation time, if a dentry
    is needed it will be spliced as when required via d_lookup().

commit d433c206515e567c52ce09589033405a0ae3716e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Apr 5 13:13:01 2011 -0700

    Fix `make distclean` for `./configure --with-config=user

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

    When using --with-config=user the 'distclean' target would fail
    because it assumes the kernel configuration infrastrure is set up.
    This is not the case, nor does it need to be, because the
    '--with-config=user' option will prune the entire ./module subtree
    from SUBDIRS.  This prevents most build rules from operating in the
    ./module directory.

    However, the 'dist*' rules will still traverse this directory
    because it is listed in DIST_SUBDIRS.  This is correct because we
    need to ensure the dist rules package the directory contents
    regardless of the configuration for the 'dist' rule.  The correct
    way to handle this is to only invoke the kernel build system as
    part of the 'clean' rule when CONFIG_KERNEL_TRUE is set.

    Initial fix provided by Darik Horn <dajhorn@vanadac.com>.
    This commit is a slightly refined form of the original.

commit fa417e57a68b7aa026ec5fd8c0471b6c60ca109f
Author: Ned Bass <bass6@llnl.gov>
Date:   Fri Apr 1 09:47:05 2011 -0700

    Call udevadm trigger more safely

    Some udev hooks are not designed to be idempotent, so calling udevadm
    trigger outside of the distribution's initialization scripts can have
    unexpected (and potentially dangerous) side effects.  For example, the
    system time may change or devices may appear multiple times.  See Ubuntu
    launchpad bug 320200 and this mailing list post for more details:

    https://lists.ubuntu.com/archives/ubuntu-devel/2009-January/027260.html

    To avoid these problems we call udevadm trigger with --action=change
    --subsystem-match=block.  The first argument tells udev just to refresh
    devices, and make sure everything's as it should be.  The second
    argument limits the scope to block devices, so devices belonging to
    other subsystems cannot be affected.

    This doesn't fix the problem on older udev implementations that don't
    provide udevadm but instead have udevtrigger as a standalone program.
    In this case the above options aren't available so there's no way to
    call call udevtrigger safely.  But we can live with that since this
    issue only exists in optional test and helper scripts, and most
    zfs-on-linux users are running newer systems anyways.

commit 34e4864009d32da5fe29393082a56b5272f65faa
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 e88b041ed6a7ce358df25a7af057ea5c76dd1c2a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 31 12:16:24 2011 -0700

    Fix libzpool cv_* build error

    This build failure was accidentally introduced by previous commit
    bfd214a which fixed the load average.  Unfortunately, the wrapper
    for cv_wait_interruptible was not available in the zfs_context.h
    user compatibility code.  I failed to notice this because I didn't
    rebuild everything cleanly before committing.

      undefined reference to `cv_wait_interruptible'
      collect2: ld returned 1 exit status

    Closes #181

commit bfd214af01dd360417b1331d903655244979fe0f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 31 17:07:12 2011 -0700

    Fix inflated load average

    Kernel threads which sleep uninterruptibly on Linux are marked in the (D)
    state.  These threads are usually in the process of performing IO and are
    thus counted against the load average.  The txg_quiesce and txg_sync threads
    were always sleeping uninterruptibly and thus inflating the load average.

    This change makes them sleep interruptibly.  Some care is required however
    because these threads may now be woken early by signals.  In this case the
    callers are all careful to check that the required conditions are met after
    waking up.  If we're woken early due to a signal they will simply go back
    to sleep.  In this case these changes are safe.

    Closes #175

commit 1f5fd9d47815770fc8e0fea7028229fd0826871c
Author: Fajar A. Nugraha <github@fajar.net>
Date:   Fri Mar 25 10:01:28 2011 -0700

    Spec file compat, %{datadir}

    The dracut change caused an error during "make rpm".  The cause
    is simple, RHEL5 does not recognize the %{datarootdir} macro in
    zfs.spec.  It was changed to %{datadir} which fixes the build.

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

commit 1d82906dea5eb698a854d992e445e794fb5a0880
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 24 11:34:41 2011 -0700

    Set cmd paths in udev rules using --prefix

    The udev/rules.d scripts must use absolute paths to their support
    binaries.  However, where those binaries get installed depends
    on what --prefix was set to when the package was configured.
    This change makes the udev/rules.d helpers to *.in files which
    are processed by configure.  This allows them to be dynamically
    updated to include the specified --prefix.

    Additionally, this change updates 60-zvol.rules to handle both
    the 'add' and 'change' actions.  This ensures that that all
    valid zvol devices are correctly linked.

commit a5729f7b22e14aed657bd716f3ee98b02f7e7c41
Author: Fajar A. Nugraha <github@fajar.net>
Date:   Thu Mar 24 15:22:52 2011 +0700

    Fixes to enable zvol symlink creation

    This commit fixes issue on
    https://github.com/behlendorf/zfs/issues/#issue/172
    Changes:
    - update BLKZNAME to use _IOR instead of _IO.  Kernel 2.6.32 allows
    read parameters (copy_to_user) with _IO, while newer kernels (tested
    Archlinux's 2.6.37 kernel) enforces _IOR (which is correct)
    - fix return code and message on error

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

commit 7a1cdc0775aa4405501e64ebf0bfd998e723f2d7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 22 11:22:49 2011 -0700

    Linux 2.6.29 compat, .freeze_fs/.unfreeze_fs

    The .freeze_fs/.unfreeze_fs hooks were not added until Linux 2.6.29
    Since these hooks are currently unused they are being removed to
    allow support of older kernels.

commit 81e97e21872a9c38ad66c37fafe1436ee25abee3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 22 11:13:41 2011 -0700

    Linux 2.6.29 compat, credentials

    As of Linux 2.6.29 a clean credential API was added to the Linux kernel.
    Previously the credential was embedded in the task_struct.  Because the
    SPL already has considerable support for handling this API change the
    ZPL code has been updated to use the Solaris credential API.

commit bdf4328b04544ac3759d689d0a68e514b6df1025
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 22 09:55:09 2011 -0700

    Linux 2.6.28 compat, insert_inode_locked()

    Added insert_inode_locked() helper function, prior to this most callers
    used insert_inode_hash().  The older method doesn't check for collisions
    in the inode_hashtable but it still acceptible for use.  Fallback to
    using insert_inode_hash() when insert_inode_locked() is unavailable.

commit 3517f0b7e928e1a8e7634828fb92d194ea35004d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 22 09:26:38 2011 -0700

    Linux 2.6.27 compat, blk_queue_stackable()

    The blk_queue_stackable() queue flag was added in 2.6.27 to handle dm
    stacking drivers.  Prior to this request stacking drivers were detected
    by checking (q->request_fn == NULL), for earlier kernels we revert to
    this legacy behavior.

commit 1073d746d6421eb5faf8a3cf8534d82a2beb0512
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 21 16:54:59 2011 -0700

    Linux compat, umount2(2) flags

    Older glibc <sys/mount.h> headers did not define all the available
    umount2(2) flags.  Both MNT_FORCE and MNT_DETACH are supported in the
    kernel back to 2.4.11 so we define them correctly if they are missing.

    Closes #95

commit d6bd8eaae4bdbce8e162414bb6c84ac95fd456b4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 21 10:19:30 2011 -0700

    Fix evict() deadlock

    Now that KM_SLEEP is not defined as GFP_NOFS there is the possibility
    of synchronous reclaim deadlocks.  These deadlocks never existed in the
    original OpenSolaris code because all memory reclaim on Solaris is done
    asyncronously.  Linux does both synchronous (direct) and asynchronous
    (indirect) reclaim.

    This commit addresses a deadlock caused by inode eviction.  A KM_SLEEP
    allocation may trigger direct memory reclaim and shrink the inode cache.
    This can occur while a mutex in the array of ZFS_OBJ_HOLD mutexes is
    held.  Through the ->shrink_icache_memory()->evict()->zfs_inactive()->
    zfs_zinactive() call path the same mutex may be reacquired resulting
    in a deadlock.  To avoid this deadlock the process must not reacquire
    the mutex when it is already holding it.

    This is a reasonable fix for now but longer term the ZFS_OBJ_HOLD
    mutex locking should be reevaluated.  This infrastructure already
    prevents us from ever using the Linux lock dependency analysis tools,
    and it may limit scalability.

commit 691f6ac4c2858d64afc2a0dc1bd2b8c041d68502
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sat Mar 19 14:34:30 2011 -0700

    Use KM_PUSHPAGE instead of KM_SLEEP

    It used to be the case that all KM_SLEEP allocations were GFS_NOFS.
    Unfortunately this often resulted in the kernel being unable to
    reclaim the ARC, inode, and dentry caches in a timely manor.
    The fix was to make KM_SLEEP a GFP_KERNEL allocation in the SPL.

    However, this increases the posibility of deadlocking the system
    on a zfs write thread.  If a zfs write thread attempts to perform
    an allocation it may trigger synchronous reclaim.  This reclaim
    may attempt to flush dirty data/inode to disk to free memory.
    Unforunately, this write cannot finish because the write thread
    which would handle it is holding the previous transaction open.
    Deadlock.

    To avoid this all allocations in the zfs write thread path must
    use KM_PUSHPAGE which prohibits synchronous reclaim for that
    thread.  In this way forward progress in ensured.  The risk
    with this change is I missed updating an allocation for the
    write threads leaving an increased posibility of deadlock.  If
    any deadlocks remain they will be unlikely but we'll have to
    make sure they all get fixed.

commit f47c42e2143ccf83bb5ddca4251c9db14859a0b5
Merge: 716895b ae26d04
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 22 12:13:04 2011 -0700

    Merge branch 'dracut'

commit 716895b161e31e4db559566fa1dddc3d8d8c64c0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 18 14:47:19 2011 -0700

    Fix 'LDFLAGS=-Wl,--as-needed' build error

    Compiling with 'LDFLAGS=-Wl,--as-needed' exposed the fact that
    there were some library linking problems introduced by mount_zfs.
    In particular, the libzfs library does use nvpair symbols, and
    mount_zfs contains no dependencies on libzpool.

    Closes #161
    Closes #162

commit ec49a5f0ec020fa1b0d3e915e2ffb10bbed97599
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 18 13:54:27 2011 -0700

    Fix getcwd() warning

    New versions glibc declare getcwd() with the warn_unused_result attribute.
    This results in a warning because the updated mount helper was not
    checking this return value.  This issue was fixed by checking the return
    type and in the case of an error simply returning the passed dataset.
    One possible, but unlikely, error would be having your cwd directory
    unlinked while the mount command was running.

      cmd/mount_zfs/mount_zfs.c: In function ‘parse_dataset’:
      cmd/mount_zfs/mount_zfs.c:223:2: error: ignoring return value of
          ‘getcwd’, declared with attribute warn_unused_result

commit ae26d0465a234d7b340566287908c78fe24901e1
Author: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com>
Date:   Thu Mar 17 15:18:13 2011 -0700

    Add dracut support

    To simplify the process of using zfs as your root filesystem a
    zfs-drucat sub-package has been added.  This sub-package adds a zfs
    dracut module which allows your initramfs to be rebuilt with zfs
    support.  The process for doing this is still complicated but there
    is clearly interest from the community about getting this working
    well and documented.  This should help lay some of the groundwork.

    Longer term these changes should be pushed in the upstream dracut
    package.  Once that occurs this subpackage will no longer be
    required for new systems, however we may want to conditionally
    build this package in the future for systems running older
    dracut versions.

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

commit 01c0e61da027925b71c923a2b3896abf458b45a9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 17 15:02:28 2011 -0700

    Add init scripts

    To support automatically mounting your zfs on filesystem on boot
    a basic init script is needed.  Unfortunately, every distribution
    has their own idea of the _right_ way to do things.  Rather than
    write one very complicated portable init script, which would be
    invariably replaced by the distributions own anyway.  I have
    instead added support to provide multiple distribution specific
    init scripts.

    The correct init script for your distribution will be selected
    by ZFS_AC_DEFAULT_PACKAGE which will set DEFAULT_INIT_SCRIPT.
    During 'make install' the correct script for your system will
    be installed from zfs/etc/init.d/zfs.DEFAULT_INIT_SCRIPT to the
    usual /etc/init.d/zfs location.

    Currently, there is zfs.fedora and a more generic zfs.lsb init
    script.  Hopefully, the distribution maintainers who know best
    how they want their init scripts to function will feedback their
    approved versions to be included in the project.

    This change does not consider upstart jobs but I'm not at all
    opposed to add that sort of thing.

commit 0de19dad9cbca9ac89aea1c7742f131713ef8012
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 15 12:41:19 2011 -0700

    Register .remount_fs handler

    Register the missing .remount_fs handler.  This handler isn't strictly
    required because the VFS does a pretty good job updating most of the
    MS_* flags.  However, there's no harm in using the hook to call the
    registered zpl callback for various MS_* flags.  Additionaly, this
    allows us to lay the ground work for more complicated argument parsing
    in the future.

commit 03f9ba9d990efb911026ebee0902671915db01a3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 15 12:03:42 2011 -0700

    Register .sync_fs handler

    Register the missing .sync_fs handler.  This is a noop in most cases
    because the usual requirement is that sync just be initiated.  As part
    of the DMU's normal transaction processing txgs will be frequently
    synced.  However, when the 'wait' flag is set the requirement is that
    .sync_fs must not return until the data is safe on disk.  With the
    addition of the .sync_fs handler this is now properly implemented.

commit 3aff775555a40fe3e5193f1309ba6e80312be5ff
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 15 11:17:33 2011 -0700

    Strip 'zfsutil,remount' from /etc/mtab

    When updating /etc/mtab we should be careful and strip certain
    options.  In particular, we need to strip 'zfsutil' because if
    we don't the mount utility will helpfull provide it to the
    mount helper when we issue mount(8) again.  This subverts the
    check that the caller is zfs(8) and not mount(8).

commit 093aa692861d0c91fd29979c13fc188760a3985b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 15 09:34:56 2011 -0700

    Always allow '-o remount,ro'

    Allow the mount(8) utility to always operate on all datasets when
    remounting them read-only.  This critical for rc.sysinit/umountroot
    which remounts the root filesystem read-only during shutdown to
    ensure everything is correctly flushed to disk.

    Fix minor typo, the check to set zfsutil should use the bitwise
    '&'.  I must have accidentally hit the adjacent '*' and obviously
    neither the compiler or my code review caught this.  Fix it now.

commit 04516a45b27144cf42bec005ef2de6d505d236a5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 10 13:34:17 2011 -0800

    Don't set I/O Scheduler for Partitions

    ZFS should only change the i/o scheduler for a disk when it has
    ownership of the whole disk.  This is basically the same logic as
    adjusting the write cache behavior on a disk.  This change updates
    the vdev disk code to skip partitions when setting the i/o scheduler.

    Closes #152

commit a6cba65ccae5a5458f9ab4ac11020716d30ea7f7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 10 12:58:44 2011 -0800

    Check for trailing '/' in mount.zfs

    When run with a root '/' cwd the mount.zfs helper would strip not
    only the '/' but also the next character from the dataset name.
    For example, '/tank' was changed to 'ank' instead of just 'tank'.
    Originally, this was done for the '/tmp' cwd case where we needed
    to strip the '/' following the cwd.  For example '/tmp/tank' needed
    to remove the '/tmp' cwd plus 1 character for the '/'.

    This change fixes the problem by checking the cwd and if it ends in
    a '/' it does not strip and extra character.  Otherwise it will strip
    the next character.  I believe this should only ever be true for the
    root directory.

    Closes #148

commit 3eae80100bb32140aaa76864af636ea165584446
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 9 15:17:28 2011 -0800

    Prep zfs-0.6.0-rc2 tag

    Create the second 0.6.0 release candidate tag (rc2).

commit 9ac97c2a939aef0f9899244920007c605387949a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 7 10:10:20 2011 -0800

    Print mount/umount errors

    Because we are dependent of the system mount/umount utilities to
    ensure correct mtab locking, we should not suppress their error
    output.  During a successful mount/umount they will be silent,
    but during a failure the error message they print is the only sure
    way to know why a mount failed.  This is because the (u)mount(8)
    return code does not contain the result of the system call issued.
    The only way to clearly idenify why thing failed is to rely on
    the error message printed by the tool.

    Longer term once libmount is available we can issue the mount/umount
    system calls within the tool and still be ensured correct mtab locking.

    Closed #107

commit d53368f6755ff67342f68e2e536c4157409fd047
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Mar 4 15:14:46 2011 -0800

    Fix mount helper

    Several issues related to strange mount/umount behavior were reported
    and this commit should address most of them.  The original idea was
    to put in place a zfs mount helper (mount.zfs).  This helper is used
    to enforce 'legacy' mount behavior, and perform any extra mount argument
    processing (selinux, zfsutil, etc).  This helper wasn't ready for the
    0.6.0-rc1 release but with this change it's functional but needs to
    extensively tested.

    This change addresses the following open issues.
    Closes #101
    Closes #107
    Closes #113
    Closes #115
    Closes #119

commit adf2e8778e66e6a749cec981da00463b342bd563
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 9 13:20:28 2011 -0800

    Fix O_APPEND Corruption

    Due to an uninitialized variable files opened with O_APPEND may
    overwrite the start of the file rather than append to it.  This
    was introduced accidentally when I removed the Solaris vnodes.

    The zfs_range_lock_writer() function used to key off zf->z_vnode
    to determine if a znode_t was for a zvol of zpl object.  With
    the removal of vnodes this was replaced by the flag zp->z_is_zvol.
    This flag was used to control the append behavior for range locks.

    Unfortunately, this value was never properly initialized after
    the vnode removal.  However, because most of memory is usually
    zeros it happened to be set correctly most of the time making
    the bug appear racy.  Properly initializing zp->z_is_zvol to
    zero completely resolves the problem with O_APPEND.

    Closes #126

commit 17c37660a14cc5e26cc668fdb285933fee4b6cf4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 9 10:48:49 2011 -0800

    Conserve stack in zfs_setattr()

    Move 'bulk' and 'xattr_bulk' from the stack to the heap to minimize
    stack space usage.  These two arrays consumed 448 bytes on the stack
    and have been replaced by two 8 byte points for a total stack space
    saving of 432 bytes.  The zfs_setattr() path had been previously
    observed to overrun the stack in certain circumstances.

commit 450dc149bd5afdddad724a6eff7ff741fa8fdf11
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 8 12:17:35 2011 -0800

    Range lock performance improvements

    The original range lock implementation had to be modified by commit
    8926ab7 because it was unsafe on Linux.  In particular, calling
    cv_destroy() immediately after cv_broadcast() is dangerous because
    the waiters may still be asleep.  Thus the following cv_destroy()
    will free memory which may still be in use.

    This was fixed by updating cv_destroy() to block on waiters but
    this in turn introduced a deadlock.  The deadlock was resolved
    with the use of a taskq to move the offending free outside the
    range lock.  This worked well but using the taskq for the free
    resulted in a serious performace hit.  This is somewhat ironic
    because at the time I felt using the taskq might improve things
    by making the free asynchronous.

    This patch refines the original fix and moves the free from the
    taskq to a private free list.  Then items which must be free'd
    are simply inserted in to the list.  When the range lock is dropped
    it's safe to free the items.  The list is walked and all rl_t
    entries are freed.

    This change improves small cached read performance by 26x.  This
    was expected because for small reads the number of locking calls
    goes up significantly.  More surprisingly this change significantly
    improves large cache read performance.  This probably attributable
    to better cpu/memory locality.  Very likely the same processor
    which allocated the memory is now freeing it.

    bs	ext3	zfs	zfs+fix		faster
    ----------------------------------------------
    512     435     3       79      	26x
    1k      820     7       160     	22x
    2k      1536    14      305     	21x
    4k      2764    28      572     	20x
    8k      3788    50      1024    	20x
    16k     4300    86      1843    	21x
    32k     4505    138     2560    	18x
    64k     5324    252     3891    	15x
    128k    5427    276     4710    	17x
    256k    5427    413     5017    	12x
    512k    5427    497     5324    	10x
    1m      5427    521     5632    	10x

    Closes #142

commit 126400a1ca656d41dea9d2ad88afbec3ed32d391
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 8 11:04:51 2011 -0800

    Add zfs_open()/zfs_close()

    In the original implementation the zfs_open()/zfs_close() hooks
    were dropped for simplicity.  This was functional but not 100%
    correct with the expected ZFS sematics.  Updating and re-adding the
    zfs_open()/zfs_close() hooks resolves the following issues.

    1) The ZFS_APPENDONLY file attribute is once again honored.  While
    there are still no Linux tools to set/clear these attributes once
    there are it should behave correctly.

    2) Minimal virus scan file attribute hooks were added.  Once again
    this support in disabled but the infrastructure is back in place.

    3) Most importantly correctly handle assigning files which were
    opened syncronously to the intent log.  Without this change O_SYNC
    modifications could be lost during a system crash even though they
    were marked synchronous.

commit 53cf50e0816a89749b3ea4d51d5d9c9605bcc3e8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 7 16:06:22 2011 -0800

    Set stat->st_dev and statfs->f_fsid

    Filesystems like ZFS must use what the kernel calls an anonymous super
    block.  Basically, this is just a filesystem which is not backed by a
    single block device.  Normally this block device's dev_t is stored in
    the super block.  For anonymous super blocks a unique reserved dev_t
    is assigned as part of get_sb().

    This sb->s_dev must then be set in the returned stat structures as
    stat->st_dev.  This allows userspace utilities to easily detect the
    boundries of a specific filesystem.  Tools such as 'du' depend on this
    for proper accounting.

    Additionally, under OpenSolaris the statfs->f_fsid is set to the device
    id.  To preserve consistency with OpenSolaris we also set the fsid to
    the device id.  Other Linux filesystem (ext) set the fsid to a unique
    value determined by the filesystems uuid.  This value is unique but
    maintains no relationship to the device id.  This may be desirable
    when exporting NFS filesystem because it minimizes to chance of a
    client observing the same fsid from two different servers.

    Closes #140

commit a60b1c0a8e7e760088c51717614205bd5e43f560
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 7 13:03:48 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.

    Closes #127

commit 15805c7711a69a293d7ab974a7e8f19c388836b4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Mar 7 10:59:26 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 5075c7ea69cc66fa5031ab8d562a66274300ced6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 3 15:45:28 2011 -0800

    Add missing libspl+libzpool libs to libzfs

    The libspl and libzpool libraries were missing from the libzfs
    Makefile.am.  They should be explicitly listed to avoid build
    issues when compiling static libraries and binaries.

    Additionally, ensure libzpool is built before libzfs because
    libzfs is dependent on libzpool.  This was also exposed as an
    issue when forcing static linking.

commit 6742abf9ec5a2c0ca132951efa0dee85698ff9b8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 3 11:29:15 2011 -0800

    Use Linux ATTR_ versions

    The AT_ versions of these macros are used on Solaris and while they
    map to their Linux equivilants the code has been updated to use the
    ATTR_ versions.

commit f4ea75d492139f397866b64512803191103d69bb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Mar 2 14:18:40 2011 -0800

    Conserve stack in zfs_setattr()

    Move 'tmpxvattr' from the stack to the heap to minimize stack
    space usage.  This is enough to get us below the 1024 byte stack
    frame warning.  That however is still a large stack frame and it
    should be further reduced by moving the 'bulk' and 'xattr_bulk'
    sa_bulk_attr_t variables to the heap in a future patch.

commit 5484965ab650a56871a62a3373859a7a36ddafcb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 1 12:24:09 2011 -0800

    Drop HAVE_XVATTR macros

    When I began work on the Posix layer it immediately became clear to
    me that to integrate cleanly with the Linux VFS certain Solaris
    specific things would have to go.  One of these things was to elimate
    as many Solaris specific types from the ZPL layer as possible.  They
    would be replaced with their Linux equivalents.  This would not only
    be good for performance, but for the general readability and health of
    the code.  The Solaris and Linux VFS are different beasts and should
    be treated as such.  Most of the code remains common for constructing
    transactions and such, but there are subtle and important differenced
    which need to be repsected.

    This policy went quite for for certain types such as the vnode_t,
    and it initially seemed to be working out well for the vattr_t.  There
    was a relatively small amount of related xvattr_t code I was forced to
    comment out with HAVE_XVATTR.  But it didn't look that hard to come
    back soon and replace it all with a native Linux type.

    However, after going doing this path with xvattr some distance it
    clear that this code was woven in the ZPL more deeply than I thought.
    In particular its hooks went very deep in to the ZPL replay code
    and replacing it would not be as easy as I originally thought.

    Rather than continue persuing replacing and removing this code I've
    taken a step back and reevaluted things.  This commit reverts many of
    my previous commits which removed xvattr related code.  It restores
    much of the code to its original upstream state and now relies on
    improved xvattr_t support in the zfs package itself.

    The result of this is that much of the code which I had commented
    out, which accidentally broke things like replay, is now back in
    place and working.  However, there may be a small performance
    impact for getattr/setattr operations because they now require
    a translation from native Linux to Solaris types.  For now that's
    a price I'm willing to pay.  Once everything is completely functional
    we can revisting the issue of removing the vattr_t/xvattr_t types.

    Closes #111

commit 321a498b95f4a43a5553f53b435497f89fefc599
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 1 16:24:39 2011 -0800

    Add xvattr support

    With the removal of the minimal xvattr support from the spl this
    support needs to be replaced in the zfs package.  This is fairly
    easily accomplished by directly adding portions of the sys/vnode.h
    header from OpenSolaris.  These xvattr additions have been placed
    in the sys/xvattr.h header file and included as needed where simply
    a sys/vnode.h was included before.

    In additon to the xvattr types and helper macros two functions
    were also included.  The xva_init() and xva_getxoptattr() functions
    were included as static inline functions in xvattr.h.  They are
    simple enough and it was simpler to place them here rather than
    in their own .c file.

commit 9623f736d958b4a28613177e03095dbdde0cc4af
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 1 16:24:21 2011 -0800

    Remove caller_context_t

    Remove the remaining callers of caller_context_t.  This type has
    been removed because it is not needed for the Linux port.

commit a23cc0a443e3da417cc1894cd3e86946f1ff3add
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Mon Feb 28 10:15:05 2011 -0600

    Add the zpool and filesystem versions

    Print the supported zpool and filesystem versions at module load
    time.  This change removes an ambiguity and adds information that
    system administrators care about.  The phrase "ZFS pool version %s"
    is the same as zpool upgrade -v so that the operator is familiar
    with the message.

      ZFS: Loaded module v0.6.0, ZFS pool version 28, ZFS filesystem version 5
      ZFS: Unloaded module v0.6.0

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

commit fdcd952b4d93f9c9d9ec89a95ef6e2964c27da95
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 25 11:26:41 2011 -0800

    Fix set block scheduler warnings

    There were two cases when attempting to set the vdev block device
    scheduler which would causes console warnings.

    The first case was when the vdev used a loop, ram, dm, or other
    such device which doesn't support a configurable scheduler.  In
    these cases attempting to set a scheduler is pointless and can
    be safely skipped.

    The secord case is slightly more troubling.  We were seeing
    transient cases where setting the elevator would return -EFAULT.
    On retry everything is fine so there appears to be a small window
    where this is possible.  To handle that case we silently retry
    up to three times before reporting the warning.

    In all of the above cases the warning is harmless and at worse you
    may see slightly different performance characteristics from one
    or more of your vdevs.

commit 4c0d8e50b99b4f3b4a9b7bc67ac7fc4e406f5755
Author: Fajar A. Nugraha <github@fajar.net>
Date:   Tue Feb 22 17:58:44 2011 +0700

    Use udev to create /dev/zvol/[dataset_name] links

    This commit allows zvols with names longer than 32 characters, which
    fixes issue on https://github.com/behlendorf/zfs/issues/#issue/102.

    Changes include:
    - use /dev/zd* device names for zvol, where * is the device minor
      (include/sys/fs/zfs.h, module/zfs/zvol.c).
    - add BLKZNAME ioctl to get dataset name from userland
      (include/sys/fs/zfs.h, module/zfs/zvol.c, cmd/zvol_id).
    - add udev rule to create /dev/zvol/[dataset_name] and the legacy
      /dev/[dataset_name] symlink. For partitions on zvol, it will create
      /dev/zvol/[dataset_name]-part* (etc/udev/rules.d/60-zvol.rules,
      cmd/zvol_id).

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

commit 61da501f9d93f305d21d5d61fa3ecd476bdbac93
Author: Darik Horn <dajhorn@vanadac.com>
Date:   Thu Feb 24 11:08:35 2011 -0600

    Add the new blkdev_compat.h header to the DIST target.

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

commit dc1d7665c54de024cf5ded1b835482dbc5f1ae38
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 23 15:13:03 2011 -0800

    Remove rdev packing

    Remove custom code to pack/unpack dev_t's.  Under Linux all dev_t's
    are an unsigned 32-bit value even on 64-bit platforms.  The lower
    20 bits are used for the minor number and the upper 12 for the major
    number.

    This means if your importing a pool from Solaris you may get strange
    major/minor numbers.  But it doesn't really matter because even if
    we add compatibility code to translate the encoded Solaris major/minor
    they won't do you any good under Linux.  You will still need to
    recreate the dev_t with a major/minor which maps to reserved major
    numbers used under Linux.

    Dropping this code also resolves 32-bit builds by removing the
    offending 32-bit compatibility code.

commit 99c564bc48710ff2a6edbfcad16d3c3b89773111
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 23 15:03:30 2011 -0800

    Use correct ASSERT3* variant

    ASSERT3P should be used instead of ASSERT3U when comparing
    pointers.  Using ASSERT3U with the cast causes a compiler
    warning for 32-bit builds which is fatal with --enable-debug.

commit 05ff35c602827a0f03659ec974c67b3fb5bf1c0b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 23 13:57:50 2011 -0800

    Increase fragment size to block size

    The underlying storage pool actually uses multiple block
    size.  Under Solaris frsize (fragment size) is reported as
    the smallest block size we support, and bsize (block size)
    as the filesystem's maximum block size.  Unfortunately,
    under Linux the fragment size and block size are often used
    interchangeably.  Thus we are forced to report both of them
    as the filesystem's maximum block size.

    Closes #112

commit f6dcdf13f80ee039141ab92ae506bd4443111662
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 23 13:03:19 2011 -0800

    Fix 'statement with no effect' warning

    Because the secpolicy_* macros are all currently defined to (0).
    And because the caller of this function does not check the return
    code.  The compiler complains that this statement has no effect
    which is correct and OK.  To suppress the warning explictly cast
    the result to (void).

commit 718d77f622463e1763c4f6d5cbfb7740d7e6968d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 23 12:57:25 2011 -0800

    Fix uninitialized variable

    It was possible for rc to be unitialized in the parse_options()
    function which triggered a compiler warning.  Ensure rc is always
    initialized.

commit a31a70bbd1c3d6b27a68280e53103c5b9a8ebd65
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 23 12:50:05 2011 -0800

    Fix enum compiler warning

    Generally it's a good idea to use enums for switch statements,
    but in this case it causes warning because the enum is really a
    set of flags.  These flags are OR'ed together in some cases
    resulting in values which are not part of the original enum.
    This causes compiler warning such as this about invalid cases.

      error: case value ‘33’ not in enumerated type ‘zprop_source_t’

    To handle this we simply case the enum to an int for the switch
    statement.  This leaves all other enum type checking in place
    and effectively disabled these warnings.

commit 45066d1f20a582fc8229776503b1cdd554d7fde4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 22 14:55:35 2011 -0800

    Linux 2.6.38 compat, blkdev_get_by_path()

    The open_bdev_exclusive() function has been replaced (again) by the
    more generic blkdev_get_by_path() function.  Additionally, the
    counterpart function close_bdev_exclusive() has been replaced by
    blkdev_put().  Because these functions are more generic versions
    of the functions they replaced the compatibility macro must add
    the FMODE_EXCL mask to ensure they are exclusive.

    Closes #114

commit 61e909608d15dc6900a710a0ceab6e101a68ac5a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 22 12:15:13 2011 -0800

    Linux 2.6.x compat, blkdev_compat.h

    For legacy reasons the zvol.c and vdev_disk.c Linux compatibility
    code ended up in sys/blkdev.h and sys/vdev_disk.h headers.  While
    there are worse places for this code to live it should be in a
    linux/blkdev_compat.h header.  This change moves this block device
    Linux compatibility code in to the linux/blkdev_compat.h header
    and updates all the correct #include locations.  This is not a
    functional change or bug fix, it is just code cleanup.

commit 075cf6cb72a460d884c29085413c3ea16a62d32d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 18 09:33:12 2011 -0800

    Prep zfs-0.6.0-rc1 tag

    Create the first 0.6.0 release candidate tag (rc1).  The Posix
    layer is now functional and passes fstest and several other
    test suites cleanly.  We now need this release candidate tag
    to broaden the test coverage before we can release the official
    zfs-0.6.0.

commit 5d0265c0dd54d798a35babe587ad5138392fe807
Merge: 54a179e 037849f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 18 09:31:25 2011 -0800

    Merge branch 'zpl'

commit 037849f854c511d86e3564ed7000e6c6472d6f70
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 17 14:17:44 2011 -0800

    Use provided uid/gid for setattr

    When changing the uid/gid of a file via zfs_setattr() use the
    Posix id passed in iattr->ia_uid/gid.  While the zfs_fuid_create()
    code already had the fuid support disabled for Linux it was
    returning the uid/gid from the credential.  With this change
    the 'chown' command which relies on setxattr is now working
    properly.

    Also remove a little stray white space which was in front of
    zfs_update_inode() call and the end of zfs_setattr().

commit efd1832bc615a4e32259e31d1c7ff0af14f5c1b2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 17 11:26:51 2011 -0800

    Fix symlink(2) inode reference count

    Under Linux sys_symlink(2) should result in a inode being created
    with one reference for the inode itself, and a second reference on
    the inode which is held by the new dentry.  Under Solaris this
    appears not to be the case.  Their zfs_symlink() handler drops
    the inode reference before returning.

    The result of this under Linux is that the reference count for
    symlinks is always one smaller than it should have been. This
    results in a BUG() when the symlink is unlinked.  To handle this
    the Linux port now keeps the inode reference which differs from
    the Solaris behavior.  This results in correct reference counts.

    Closes #96

commit 5095000169f695ea6b65d74da917c3f465d05aab
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 17 09:48:06 2011 -0800

    Use -zfs_readlink() error

    The zfs_readlink() function returns a Solaris positive error value
    and that needs to be converted to a Linux negative error value.
    While in this case nothing would actually go wrong, it's still
    incorrect and should be fixed if for no other reason than clarity.

commit f03e41e8da6d184039ea3b03ba4937f4786a3f22
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 17 09:21:39 2011 -0800

    Improve 'zpool import' safety

    There are three improvements here to 'zpool import' proposed by Fajar
    in Github issue #98.  They are all good so I'm commiting all three.

    1) Add descriptions for "hpet" and "core" blacklist entries.

    2) Add "core" to the blacklist, as described in the issue accessing
    this device will crash Xen dom0.

    3) Refine probing behavior to use fstatat64().  This allows us to
    determine if a device is a block device or a regular file without
    having to open it.  This is the safest appraoch when probing /dev/
    because the simple act of opening a device may have unexpected
    consequences.

    Closes #98

commit 8b4f9a2d55fc5ee28f69b29f2fece7d8e2cb5c7a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 16 15:54:55 2011 -0800

    Fix readlink(2)

    This patch addresses three issues related to symlinks.

    1) Revert the zfs_follow_link() function to a modified version
    of the original zfs_readlink().  The only changes from the
    original OpenSolaris version relate to using Linux types.
    For the moment this means no vnode's and no zfsvfs_t.  The
    caller zpl_follow_link() was also updated accordingly.  This
    change was reverted because it was slightly gratuitious.

    2) Update zpl_follow_link() to use local variables for the
    link buffer.  I'd forgotten that iov.iov_base is updated by
    uiomove() so after the call to zfs_readlink() it can not longer
    be used.  We need our own private copy of the link pointer.

    3) Allocate MAXPATHLEN instead of MAXPATHLEN+1.  By default
    MAXPATHLEN is 4096 bytes which is a full page, adding one to
    it pushes it slightly over a page.  That means you'll likely
    end up allocating 2 pages which is wasteful of memory and
    possibly slightly slower.

commit 54a179e7b80413bd48cd2cd259110fb493d0215e
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Fri Jan 21 14:35:41 2011 -0800

    Add API to wait for pending commit callbacks

    This adds an API to wait for pending commit callbacks of already-synced
    transactions to finish processing.  This is needed by the DMU-OSD in
    Lustre during device finalization when some callbacks may still not be
    called, this leads to non-zero reference count errors.  See lustre.org
    bug 23931.

commit b9f6a49025809d658754c758dc7e2a81ee41271b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 16 11:10:31 2011 -0800

    Update 'zfs.sh -u' to umount all zfs filesystems

    Before it is safe to unload the zfs module stack all mounted
    zfs filesystems must be unmounted.  If they are not unmounted,
    there will be references held on the modules and the stack cannot
    be removed.  To handle this have 'zfs.sh -u' which is used by all
    of the test scripts umount all zfs filesystem before attempting
    to unload the module stack.

commit 07bd86718b74b2d8e0f633f1b80e976892eaf329
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 16 11:05:55 2011 -0800

    Suppress share error on mount

    Until code is added to support automatically sharing datasets
    we should return success instead of failure.  This prevents the
    command line tools from returning a non-zero error code.  While
    a user likely won't notice this, test scripts like zconfig.sh
    do and correctly fail because of it.

commit a6695d83b763aaeeeeb6d4bdb57ed59a384106f7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 16 09:55:53 2011 -0800

    Add get/setattr, get/setxattr hooks

    While the attr/xattr hooks were already in place for regular
    files this hooks can also apply to directories and special files.
    While they aren't typically used in this way, it should be
    supported.  This patch registers these additional callbacks
    for both directory and special inode types.

commit d8fd10545b677cb4b770674372c1e116b7c22c64
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 16 09:51:44 2011 -0800

    Fix FIFO and socket handling

    Under Linux when creating a fifo or socket type device in the ZFS
    filesystem it's critical that the rdev is stored in a SA.  This
    was already being correctly done for character and block devices,
    but that logic needed to be extended to include FIFOs and sockets.

    This patch takes care of device creation but a follow on patch
    may still be required to verify that the dev_t is being correctly
    packed/unpacked from the SA.

commit d5674448094cec6eb3563afb63cc1e096bc5b280
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 16 09:40:29 2011 -0800

    Create minors for all zvols

    It was noticed that when you have zvols in multiple datasets
    not all of the zvol devices are created at module load time.
    Fajarnugraha did the leg work to identify that the root cause of
    this bug is a non-zero return value from zvol_create_minors_cb().

    Returning a non-zero value from the dmu_objset_find_spa() callback
    function results in aborting processing the remaining children in
    a dataset.  Since we want to ensure that the callback in run on
    all children regardless of error simply unconditionally return
    zero from the zvol_create_minors_cb().  This callback function
    is solely used for this purpose so surpressing the error is safe.

    Closes #96

commit 2c395def2763ccc7a549d297f7f11bd304caaeae
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 11 13:46:10 2011 -0800

    Linux 2.6.36 compat, sops->evict_inode()

    The new prefered inteface for evicting an inode from the inode cache
    is the ->evict_inode() callback.  It replaces both the ->delete_inode()
    and ->clear_inode() callbacks which were previously used for this.

commit f9637c6c8b9c452c440a366aa937b363f027d95e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 11 10:33:01 2011 -0800

    Linux 2.6.33 compat, get/set xattr callbacks

    The xattr handler prototypes were sanitized with the idea being that
    the same handlers could be used for multiple methods.  The result of
    this was the inode type was changes to a dentry, and both the get()
    and set() hooks had a handler_flags argument added.  The list()
    callback was similiarly effected but no autoconf check was added
    because we do not use the list() callback.

commit 7268e1bec8478639b7a1047e02ab931f30bc2f92
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 11 08:58:55 2011 -0800

    Linux 2.6.35 compat, fops->fsync()

    The fsync() callback in the file_operations structure used to take
    3 arguments.  The callback now only takes 2 arguments because the
    dentry argument was determined to be unused by all consumers.  To
    handle this a compatibility prototype was added to ensure the right
    prototype is used.  Our implementation never used the dentry argument
    either so it's just a matter of using the right prototype.

commit 777d4af89137907adc91377327505f40c296035d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 10 16:16:52 2011 -0800

    Linux 2.6.35 compat, const struct xattr_handler

    The const keyword was added to the 'struct xattr_handler' in the
    generic Linux super_block structure.  To handle this we define an
    appropriate xattr_handler_t typedef which can be used.  This was
    the preferred solution because it keeps the code clean and readable.

commit 1b94c25ceb12649b4b2ffb9a016e4f51cfa91736
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 10 14:54:33 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 afffb5cd102f340f3879f4d7af8988dd209b9b72
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 10 12:11:05 2011 -0800

    MS_DIRSYNC and MS_REC compat

    It turns out that older versions of the glibc headers do not
    properly define MS_DIRSYNC despite it being explicitly mentioned
    in the man pages.  They instead call it S_WRITE, so for system
    where this is not correct defined map MS_DIRSYNC to S_WRITE.
    At the time of this commit both Ubuntu Lucid, and Debian Squeeze
    both use the out of date glibc headers.

    As for MS_REC this field is also not available in the older headers.
    Since there is no obvious mapping in this case we simply disable
    the recursive mount option which used it.

commit 1ac0ea38a5b19771b0dfbc6b2244c4f674ef1a31
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 10 10:57:29 2011 -0800

    Add missing -ldl linker option

    The inclusion on dlsym(), dlopen(), and dlclose() symbols require
    us to link against the dl library.  Be careful to add the flag to
    both the libzfs library and the commands which depend on the library.

commit 6c9e06f14de1ed27e6032be2197b8f4cbec7405a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 8 15:40:52 2011 -0800

    Update AUTHORS file

    This file has gotten stale and needed to be updated.  There are
    individuals who deserve to be recognized for their contributions
    to the project.  I've done my best to assemble names from the
    commit logs of those who have submitted patches.  This list may
    not be comprehensive, if you feel I've overlooked your contribution
    please let me know and we can get your name added.

commit 6839eed23e3c9d85cf0de767be32af0759e5bf2d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Feb 7 13:54:59 2011 -0800

    Use 'noop' IO Scheduler

    Initial testing has shown the the right IO scheduler to use under Linux
    is noop.  This strikes the ideal balance by allowing the zfs elevator
    to do all request ordering and prioritization.  While allowing the
    Linux elevator to do the maximum front/back merging allowed by the
    physical device.  This yields the largest possible requests for the
    device with the lowest total overhead.

    While 'noop' should be right for your system you can choose a different
    IO scheduler with the 'zfs_vdev_scheduler' option.  You may set this
    value to any of the standard Linux schedulers: noop, cfq, deadline,
    anticipatory.  In addition, if you choose 'none' zfs will not attempt
    to change the IO scheduler for the block device.

commit 4db77a74a6a26c57a04f98c4a23b9fda9319ba9f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Feb 7 12:21:29 2011 -0800

    Suppress large kmem_alloc() warning

    The following warning was observed under normal operation.  It's
    not fatal but it's something to be addressed long term.  Flag the
    offending allocation with KM_NODEBUG to suppress the warning and
    flag the call site.

    SPL: Showing stack for process 21761
    Pid: 21761, comm: iozone Tainted: P           ----------------
    2.6.32-71.14.1.el6.x86_64 #1
    Call Trace:
     [<ffffffffa05465a7>] spl_debug_dumpstack+0x27/0x40 [spl]
     [<ffffffffa054a84d>] kmem_alloc_debug+0x11d/0x130 [spl]
     [<ffffffffa05de166>] dmu_buf_hold_array_by_dnode+0xa6/0x4e0 [zfs]
     [<ffffffffa05de825>] dmu_buf_hold_array+0x65/0x90 [zfs]
     [<ffffffffa05de891>] dmu_read_uio+0x41/0xd0 [zfs]
     [<ffffffffa0654827>] zfs_read+0x147/0x470 [zfs]
     [<ffffffffa06644a2>] zpl_read_common+0x52/0x70 [zfs]
     [<ffffffffa0664503>] zpl_read+0x43/0x70 [zfs]
     [<ffffffff8116d905>] vfs_read+0xb5/0x1a0
     [<ffffffff8116da41>] sys_read+0x51/0x90
     [<ffffffff81013172>] system_call_fastpath+0x16/0x1b

commit f44b46a632d5b332d993faaeb16fe30650619803
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Feb 7 12:09:23 2011 -0800

    Update META to 0.6.0

    Roll the version forward to 0.6.0, the addition of the Posix
    layer warrents updating the major version number.

commit ceb43b935d6c4f4f6509623c7498d5dcc40ea813
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 4 16:54:34 2011 -0800

    Invalidate dcache and inode cache

    When performing a 'zfs rollback' it's critical to invalidate
    the previous dcache and inode cache.  If we don't there will
    stale cache entries which when accessed will result in EIOs.

commit b3b4f547f9243c0c1a446c74574a1f737e29dee6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 4 16:17:54 2011 -0800

    Remove useless libefi warnings

    These two warnings in libefi serve no real purpose.  When running
    without DEBUG they are already supressed, and even when DEBUG is
    enabled all they indicate is the device doesn't already have an
    EFI label.  For a Linux machine this is probably the common case.

commit 8926ab7a50d60d855e4d49d2ed7bdef49dd56149
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Feb 4 14:38:11 2011 -0800

    Move cv_destroy() outside zp->z_range_lock()

    With the recent SPL change (d599e4fa) that forces cv_destroy()
    to block until all waiters have been woken.  It is now unsafe
    to call cv_destroy() under the zp->z_range_lock() because it
    is used as the condition variable mutex.  If there are waiters
    cv_destroy() will block until they wake up and aquire the mutex.
    However, they will never aquire the mutex because cv_destroy()
    will not return allowing it's caller to drop the lock.  Deadlock.

    To avoid this cv_destroy() is now run asynchronously in a taskq.
    This solves two problems:

    1) It is no longer run under the zp->z_range_lock so no deadlock.
    2) Since cv_destroy() may now block we don't want this slowing
       down zfs_range_unlock() and throttling the system.

    This was not as much of an issue under OpenSolaris because their
    cv_destroy() implementation does not do anything.  They do however
    risk a bad paging request if cv_destroy() returns, the memory holding
    the condition variable is free'd, and then the waiters wake up and
    try to reference it.  It's a very small unlikely race, but it is
    possible.

commit c0d35759c5ab1abaa6b72062cc4ecd0d86628de8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Feb 3 10:34:05 2011 -0800

    Add mmap(2) support

    It's worth taking a moment to describe how mmap is implemented
    for zfs because it differs considerably from other Linux filesystems.
    However, this issue is handled the same way under OpenSolaris.

    The issue is that by design zfs bypasses the Linux page cache and
    leaves all caching up to the ARC.  This has been shown to work
    well for the common read(2)/write(2) case.  However, mmap(2)
    is problem because it relies on being tightly integrated with the
    page cache.  To handle this we cache mmap'ed files twice, once in
    the ARC and a second time in the page cache.  The code is careful
    to keep both copies synchronized.

    When a file with an mmap'ed region is written to using write(2)
    both the data in the ARC and existing pages in the page cache
    are updated.  For a read(2) data will be read first from the page
    cache then the ARC if needed.  Neither a write(2) or read(2) will
    will ever result in new pages being added to the page cache.

    New pages are added to the page cache only via .readpage() which
    is called when the vfs needs to read a page off disk to back the
    virtual memory region.  These pages may be modified without
    notifying the ARC and will be written out periodically via
    .writepage().  This will occur due to either a sync or the usual
    page aging behavior.  Note because a read(2) of a mmap'ed file
    will always check the page cache first even when the ARC is out
    of date correct data will still be returned.

    While this implementation ensures correct behavior it does have
    have some drawbacks.  The most obvious of which is that it
    increases the required memory footprint when access mmap'ed
    files.  It also adds additional complexity to the code keeping
    both caches synchronized.

    Longer term it may be possible to cleanly resolve this wart by
    mapping page cache pages directly on to the ARC buffers.  The
    Linux address space operations are flexible enough to allow
    selection of which pages back a particular index.  The trick
    would be working out the details of which subsystem is in
    charge, the ARC, the page cache, or both.  It may also prove
    helpful to move the ARC buffers to a scatter-gather lists
    rather than a vmalloc'ed region.

    Additionally, zfs_write/read_common() were used in the readpage
    and writepage hooks because it was fairly easy.  However, it
    would be better to update zfs_fillpage and zfs_putapage to be
    Linux friendly and use them instead.

commit cc5f931cfd623c50f283fa5cf1bc21cfd7e5c703
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 26 12:10:01 2011 -0800

    Add Hooks for Linux Xattr Operations

    The Linux specific xattr operations have all been located in the
    file zpl_xattr.c.  These functions primarily rely on the reworked
    zfs_* functions to do their job.  They are also responsible for
    converting the possible Solaris style error codes to negative
    Linux errors.

commit 51f0bbe425f7313a19ee54ccd3d67ed8ba686567
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 26 12:09:10 2011 -0800

    Add Hooks for Linux Super Block Operations

    The Linux specific super block operations have all been located in the
    file zpl_super.c.  These functions primarily rely on the reworked
    zfs_* functions to do their job.  They are also responsible for
    converting the possible Solaris style error codes to negative
    Linux errors.

commit ee154f01bf0bdb5e85524c518c19964272d33cd9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 26 12:08:24 2011 -0800

    Add Hooks for Linux Inode Operations

    The Linux specific inode operations have all been located in the
    file zpl_inode.c.  These functions primarily rely on the reworked
    zfs_* functions to do their job.  They are also responsible for
    converting the possible Solaris style error codes to negative
    Linux errors.

commit 1efb473f8919c5f195e127136b79c6d3b1eb1c81
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 26 12:03:58 2011 -0800

    Add Hooks for Linux File Operations

    The Linux specific file operations have all been located in the
    file zpl_file.c.  These functions primarily rely on the reworked
    zfs_* functions to do their job.  They are also responsible for
    converting the possible Solaris style error codes to negative
    Linux errors.

    This first zpl_* commit also includes a common zpl.h header with
    minimal entries to register the Linux specific hooks.  In also
    adds all the new zpl_* file to the Makefile.in.  This is not a
    standalone commit, you required the following zpl_* commits.

commit 633e8030b3582f3579a457a803c1382fc81f56e5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 8 11:33:08 2011 -0800

    Wrap with HAVE_XVATTR

    For the moment exactly how to handle xvattr is not clear.  This
    change largely consists of the code to comment out the offending
    bits until something reasonable can be done.

commit 3c4988c83e4f278cd6c8076f6cdb8e4858d05840
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 8 11:29:50 2011 -0800

    Add zp->z_is_zvol flag

    A new flag is required for the zfs_rlock code to determine if
    it is operation of the zvol of zpl dataset.  This used to be
    keyed off the zp->z_vnode, which was a hack to begin with, but
    with the removal of vnodes we needed a dedicated flag.

commit 3558fd73b5d863304102f6745c26e0b592aca60a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 8 11:16:06 2011 -0800

    Prototype/structure update for Linux

    I appologize in advance why to many things ended up in this commit.
    When it could be seperated in to a whole series of commits teasing
    that all apart now would take considerable time and I'm not sure
    there's much merrit in it.  As such I'll just summerize the intent
    of the changes which are all (or partly) in this commit.  Broadly
    the intent is to remove as much Solaris specific code as possible
    and replace it with native Linux equivilants.  More specifically:

    1) Replace all instances of zfsvfs_t with zfs_sb_t.  While the
    type is largely the same calling it private super block data
    rather than a zfsvfs is more consistent with how Linux names
    this.  While non critical it makes the code easier to read when
    your thinking in Linux friendly VFS terms.

    2) Replace vnode_t with struct inode.  The Linux VFS doesn't have
    the notion of a vnode and there's absolutely no good reason to
    create one.  There are in fact several good reasons to remove it.
    It just adds overhead on Linux if we were to manage one, it
    conplicates the code, and it likely will lead to bugs so there's
    a good change it will be out of date.  The code has been updated
    to remove all need for this type.

    3) Replace all vtype_t's with umode types.  Along with this shift
    all uses of types to mode bits.  The Solaris code would pass a
    vtype which is redundant with the Linux mode.  Just update all the
    code to use the Linux mode macros and remove this redundancy.

    4) Remove using of vn_* helpers and replace where needed with
    inode helpers.  The big example here is creating iput_aync to
    replace vn_rele_async.  Other vn helpers will be addressed as
    needed but they should be be emulated.  They are a Solaris VFS'ism
    and should simply be replaced with Linux equivilants.

    5) Update znode alloc/free code.  Under Linux it's common to
    embed the inode specific data with the inode itself.  This removes
    the need for an extra memory allocation.  In zfs this information
    is called a znode and it now embeds the inode with it.  Allocators
    have been updated accordingly.

    6) Minimal integration with the vfs flags for setting up the
    super block and handling mount options has been added this
    code will need to be refined but functionally it's all there.

    This will be the first and last of these to large to review commits.

commit 6149f4c45fc905761a6f636ea9e14ff76ce6c842
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Feb 8 10:39:06 2011 -0800

    Remove dmu_write_pages() support

    For the moment we do not use dmu_write_pages() to write pages
    directly in to a dmu object.  It may be required at some point
    in the future, but for now is simplest and cleanest to drop it.
    It can be easily readded if/when needed.

commit eb28321e2d8952290db7dceb66d7761d528788e3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 26 12:49:58 2011 -0800

    Create a root znode without VFS dependencies

    For portability reasons it's handy to be able to create a root
    znode and basic filesystem components without requiring the full
    cooperation of the VFS.  We are committing to this to simply the
    filesystem creations code.

commit bcf308227c9aa51ef9d5a1fe3f2f1342ff2aee94
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 26 12:45:24 2011 -0800

    Remove zfs_ctldir.[ch]

    This code is used for snapshot and heavily leverages Solaris
    functionality we do not want to reimplement.  These files have
    been removed, including references to them, and will be replaced
    by a zfs_snap.c/zpl_snap.c implementation which handles snapshots.

commit b516a07b997a8c3006788963f6b6128e505cf56c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 6 14:53:21 2011 -0800

    Disable fuid features

    These features should probably be enabled in the Linux zpl code.
    For now I'm disabling them until it's clear what needs to be done.

commit d5e53f9d06d149fbb62920bb5af766059dc35341
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 6 14:07:41 2011 -0800

    Disable zfs_sync during oops/panic

    Minor update to ensure zfs_sync() is disabled if a kernel oops/panic
    is triggered.  As the comment says 'data integrity is job one'.  This
    change could have been done by defining panicstr to oops_in_progress
    in the SPL.  But I felt it was better to use the native Linux API
    here since to be clear.

commit acb53769403aa896b022129f1bdb3d845a4d0201
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 5 16:38:30 2011 -0800

    Disable Shutdown/Reboot

    This support has been disable with HAVE_SHUTDOWN.  We can support
    this at some point by adding the needed reboot notifiers.

commit cb28b3494e88e0e43c43588fccfa6526344b9a64
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 6 14:15:48 2011 -0800

    Remove SYNC_ATTR check

    This flag does not need to be support under Linux.  As the comment
    says it was only there to support fsflush() for old filesystem like
    UFS.  This is not needed under Linux.

commit e15c02301489477c9201a80afac46791d20bd070
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 6 12:56:48 2011 -0800

    Remove mount options

    Mount option parsing is still very Linux specific and will be
    handled above this zfs filesystem layer.  Honoring those mount
    options once set if of course the responsibility of the lower
    layers.

commit d7cafa8e3e8973bca6b2ebabafb669508031075e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 5 17:00:34 2011 -0800

    Remove zfs_active_fs_count

    This variable was used to ensure that the ZFS module is never
    removed while the filesystem is mounted.  Once again the generic
    Linux VFS handles this case for us so it can be removed.

commit 42ab36aa368b09dfec7214cc884b004ee934b2df
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 5 16:56:49 2011 -0800

    Remove unused mount functions

    The functions zfs_mount_label_policy(), zfs_mountroot(), zfs_mount()
    will not be needed because most of what they do is already handled
    by the generic Linux VFS layer.  They all call zfs_domount() which
    creates the actual dataset, the caller of this library call which
    will be in the zpl layer is responsible for what's left.

commit c0b3dc7d0797ce2d08df7e07fff15298e957270c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 5 16:24:57 2011 -0800

    Remove zfs_major/zfs_minor/zfsfstype

    Under Linux we don't need to reserve a major or minor number for
    the filesystem.  We can rely on the VFS to handle colisions without
    this being handled by the lower ZFS layers.

    Additionally, there is no need to keep a zfsfstype around.  We are
    not limited on Linux by the OpenSolaris infrastructure which needed
    this.  The upper zpl layer can specify the filesystem type.

commit 4b3f12ecd5a641b182609d7fe78313d53f6e8976
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 5 14:46:59 2011 -0800

    Remove Solaris VFS Hooks

    The ZFS code is being restructured to act as a library and a stand
    alone module.  This allows us to leverage most of the existing code
    with minimal modification.  It also means we need to drop the Solaris
    vfs/vnode functions they will be replaced by Linux equivilants and
    updated to be Linux friendly.

commit 960e08fe3e2cdf5217996b9f42a01f7e20f2b97a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 5 14:27:30 2011 -0800

    VFS: Add zfs_inode_update() helper

    For the moment we have left ZFS unchanged and it updates many values
    as part of the znode.  However, some of these values should be set
    in the inode.  For the moment this is handled by adding a function
    called zfs_inode_update() which updates the inode based on the znode.

    This is considered a workaround until we can systematically go
    through the ZFS code and have it directly update the inode.  At
    which point zfs_update_inode() can be dropped entirely.  Keeping
    two copies of the same data isn't only inefficient it's a breeding
    ground for bugs.

commit 7304b6e50f656fbf4b126a4e94deac174133851c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 5 13:16:12 2011 -0800

    VFS: Integrate zfs_znode_alloc()

    Under Linux the convention for filesystem specific data structure is
    to embed it along with the generic vfs data structure.  This differs
    significantly from Solaris.

    Since we want to integrates as cleanly with the Linux VFS as possible.
    This changes modifies zfs_znode_alloc() to allocate a znode with an
    embedded inode for use with the generic VFS.  This is done by calling
    iget_locked() which will allocate a new inode if needed by calling
    sb->alloc_inode().  This function allocates enough memory for a
    znode_t by returns a pointer to the inode structure for Linux's VFS.
    This function is also responsible for setting the callback
    znode->z_set_ops_inodes() which is used to register the correct
    handlers for the inode.

commit 10c6047ea56445a87d8ce1397ac2d2caa97719ca
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 21 16:28:11 2010 -0800

    Enable zfs_znode compilation

    Basic compilation of the bulk of zfs_znode.c has been enabled.  After
    much consideration it was decided to convert the existing vnode based
    interfaces to more friendly Linux interfaces.  The following commits
    will systematically replace update the requiter interfaces.  There
    are of course pros and cons to this decision.

    Pros:
    * This simplifies intergration with Linux in the long term.  There is
      no longer any need to manage vnodes which are a foreign concept to
      the Linux VFS.
    * Improved long term maintainability.
    * Minor performance improvements by removing vnode overhead.

    Cons:
    * Added work in the short term to modify multiple ZFS interfaces.
    * Harder to pull in changes if we ever see any new code from Solaris.
    * Mixed Solaris and Linux interfaces in some ZFS code.

commit a405c8a665bf7d96880c97bcb783cf84d04e3e76
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 17 15:21:18 2010 -0800

    ACL related changes

    A small collection of ACL related changes related to not
    supporting fuid mapping.  This whole are will need to be
    closely investigated.

commit 3fc050aaf2bc2e11844268ae0c091e6eb56108e5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 17 15:26:17 2010 -0800

    Init/destroy tsd

    Add missing tsd_destroy() call for rrw_tsd_key to avoid a leak.

commit 8299a1f41eb4761cd25ea821830295a6f32be581
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 18 11:42:25 2011 -0800

    Add Linux Compat Infrastructure

    Lay the initial ground work for a include/linux/ compatibility
    directory.  This was less critical in the past because the bulk
    of the ZFS code consumes the Solaris API via the SPL.  This API
    was stable and the bulk Linux API differences were handled in
    the SPL.

    However, with the addition of a full Posix layer written directly
    against the Linux APIs we are going to need more compatibility
    code.  It makes sense that all this code should be cleanly located
    in one place.  Subsequent patches should move the existing zvol
    and vdev_disk compatibility code in to this directory.

commit ab892c5f0ad7c2ee291693cf61dfc9601a2472d0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 22 10:07:03 2010 -0800

    Replace VOP_* calls with direct zfs_* calls

    These generic Solaris wrappers are no longer required.  Simply
    directly call the correct zfs functions for clarity.

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

    Add basic uio support

    This code originates in OpenSolaris and was modified by KQ Infotech
    to be compatible with Linux.  While supporting uios in the short
    term is useful to get something working this is not an abstraction
    we want to keep.  This code is expected to be short lived and
    removed as soon as all the remaining uio based APIs and updated.

commit 538f669f63e43b1d2a288c872a66b9d18b4a4bee
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Jan 12 12:51:48 2011 -0800

    Add trivial acl helpers

    The zfs acl code makes use of the two OpenSolaris helper functions
    acl_trivial_access_masks() and ace_trivial_common().  Since they are
    only called from zfs_acl.c I've brought them over from OpenSolaris
    and added them as static function to this file.  This way I don't
    need to reimplement this functionality from scratch in the SPL.

    Long term once I take a more careful look at the acl implementation
    it may be the case that these functions really aren't needed.  If
    that turns out to be the case they can then be removed.

commit c60bc1fbf0760c9797411e10c05426fc41052f0a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 21 14:38:27 2010 -0800

    Remove dead ACL code

    The following code was unused which caused gcc to complain.
    Since it was deadcode it has simply been removed.

commit 4e1b54fdde35e952ea7084a4640e08c6e42f8a94
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 6 16:49:45 2011 -0800

    Remove zfs_parse_bootfs() support

    Remove unneeded bootfs functions.  This support shouldn't be required
    for the Linux port, and even if it is it would need to be reworked
    to integrate cleanly with Linux.

commit 9ee7fac5312f9c6b33155aed77e50b0dfd68a77d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 7 11:51:27 2011 -0800

    VFS: Wrap with HAVE_SHARE

    Certain NFS/SMB share functionality is not yet in place.  These
    functions used to be wrapped with the generic HAVE_ZPL to prevent
    them from being compiled.  I still don't want them compiled but
    I'm working toward eliminating the use of HAVE_ZPL.  So I'm just
    renaming the wrapper here to HAVE_SHARE.  They still won't be
    compiled until all the share issues are worked through.  Share
    support is the last missing piece from zfs_ioctl.c.

commit bc3e15e386a62c29e10194e5fae3c4f8a76337df
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 6 16:47:31 2011 -0800

    Wrap with HAVE_MLSLABEL

    The zfs_check_global_label() function is part of the HAVE_MLSLABEL
    support which was previously commented out by a HAVE_ZPL check.
    Since we're still deciding what to do about mls labels wrap it
    with the preexisting macro to keep it compiled out.

commit 5649246dd3ba02041c83f7bab1c19c5815f9b771
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 7 12:40:30 2011 -0800

    Remove znode move functionality

    Unlike Solaris the Linux implementation embeds the inode in the
    znode, and has no use for a vnode.  So while it's true that fragmention
    of the znode cache may occur it should not be worse than any of the
    other Linux FS inode caches.  Until proven that this is a problem it's
    just added complexity we don't need.

commit f30484afc32b6040a15fabfc697cfb76116e468f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 7 13:47:47 2011 -0800

    Conserve stack in zfs_mkdir()

    Move the sa_attrs array from the stack to the heap to minimize stack
    space usage.

commit 1ee1b76786aebc6eed546c6e869cc88f1e318890
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 17 14:21:46 2010 -0800

    Conserve stack in zfs_sa_upgrade()

    As always under Linux stack space is at a premium.  Relocate two
    20 element sa_bulk_attr_t arrays in zfs_sa_upgrade() from the stack
    to the heap.

commit e5c39b95a7ccc19ce7a3af8d8d09f0b8959a3991
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 17 11:18:08 2010 -0800

    Export required vfs/vn symbols

commit 72d5e2da3e45a6865806f1be908232f5fea8787b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 17 14:04:40 2010 -0800

    Add HAVE_SCANSTAMP

    This functionality is not supported under Linux, perhaps it
    will be some day if it's decided it's useful.

commit 872e8d26978a8e1caa1ca7d931db7f95d987a3e7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 17 09:14:38 2010 -0800

    Add initial rw_uio functions to the dmu

    These functions were dropped originally because I felt they would
    need to be rewritten anyway to avoid using uios.  However, this
    patch readds then with they dea they can just be reworked and
    the uio bits dropped.

commit b4ead57cfb410247eee4d2a8a6e488cf4542ac77
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 16 15:11:40 2010 -0800

    Remove HAVE_ZPL from commands and libraries

    Thanks to the previous few commits we can now build all of the
    user space commands and libraries with support for the zpl.

commit 9a616b5d17185c7fa5cd0d39ff8bc101cad8466d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 16 15:43:37 2010 -0800

    Documentation updates

    Minor Linux specific documentation updates to the comments and
    man pages.

commit c5d915f4237bbd1f5623b5044a1924a3cb91852b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 16 13:47:30 2010 -0800

    Minimal libshare infrastructure

    ZFS even under Solaris does not strictly require libshare to be
    available.  The current implementation attempts to dlopen() the
    library to access the needed symbols.  If this fails libshare
    support is simply disabled.

    This means that on Linux we only need the most minimal libshare
    implementation.  In fact just enough to prevent the build from
    failing.  Longer term we can decide if we want to implement a
    libshare library like Solaris.  At best this would be an abstraction
    layer between ZFS and NFS/SMB.  Alternately, we can drop libshare
    entirely and directly integrate ZFS with Linux's NFS/SMB.

    Finally the bare bones user-libshare.m4 test was dropped.  If we
    do decide to implement libshare at some point it will surely be
    as part of this package so the check is not needed.

commit 3fb1fcdea167d705e050a0383ec61b95fbe8a0ed
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 16 16:16:25 2010 -0800

    Add 'zfs mount' support

    By design the zfs utility is supposed to handle mounting and unmounting
    a zfs filesystem.  We could allow zfs to do this directly.  There are
    system calls available to mount/umount a filesystem.  And there are
    library calls available to manipulate /etc/mtab.  But there are a
    couple very good reasons not to take this appraoch... for now.

    Instead of directly calling the system and library calls to (u)mount
    the filesystem we fork and exec a (u)mount process.  The principle
    reason for this is to delegate the responsibility for locking and
    updating /etc/mtab to (u)mount(8).  This ensures maximum portability
    and ensures the right locking scheme for your version of (u)mount
    will be used.  If we didn't do this we would have to resort to an
    autoconf test to determine what locking mechanism is used.

    The downside to using mount(8) instead of mount(2) is that we lose
    the exact errno which was returned by the kernel.  The return code
    from mount(8) provides some insight in to what went wrong but it
    not quite as good.  For the moment this is translated as a best
    guess in to a errno for the higher layers of zfs.

    In the long term a shared library called libmount is under development
    which provides a common API to address the locking and errno issues.
    Once the standard mount utility has been updated to use this library
    we can then leverage it.  Until then this is the only safe solution.

      http://www.kernel.org/pub/linux/utils/util-linux/libmount-docs/index.html

commit feb46b92a7619a3bb67b925e24184fe70464d261
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 16 15:47:40 2010 -0800

    Open up libzfs_run_process/libzfs_load_module

    Recently helper functions were added to libzfs_util to load a kernel
    module or execute a process.  Initially this functionality was limited
    to libzfs but it has become clear there will be other consumers.  This
    change opens up the interface so it may be used where appropriate.

commit 95c4cae39fd77b5b00810eb976c9a6462d86ccd4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 16 12:56:10 2010 -0800

    Disable umount.zfs helper

    For the moment, the only advantage in registering a umount helper
    would be to automatically unshare a zfs filesystem.  Since under
    Linux this would be unexpected (but nice) behavior there is no
    harm in disabling it.

    This is desirable because the 'zfs unmount' path invokes the system
    umount.  This is done to ensure correct mtab locking but has the
    side effect that the umount.zfs helper would be called if it exists.
    By default this helper calls back in to zfs to do the unmount on
    Solaris which we don't want under Linux.

    Once libmount is available and we have a safe way to correctly
    lock and update the /etc/mtab file we can reconsider the need
    for a umount helper.  Using libmount is the prefered solution.

commit 3b8cfee8af1d966eea75389e2a2e53a5a8dca600
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 8 16:40:11 2010 -0800

    Enable mount.zfs helper

    While not strictly required to mount a zfs filesystem using a
    mount helper has certain advantages.

    First, we need it if we want to honor the mount behavior as found
    on Solaris.  As part of the mount we need to validate that the
    dataset has the legacy mount property set if we are using 'mount'
    instead of 'zfs mount'.

    Secondly, by using a mount helper we can automatically load the
    zpl kernel module.  This way you can just issue a 'mount' or
    'zfs mount' and it will just work.

    Finally, it gives us common hook in user space to add any zfs
    specific mount options we might want.  At the moment we don't
    have any but now the infrastructure is at least in place.

commit b3259b6a2ba29595dc5f2df0f6def8c7fc6bcb98
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 16 14:26:08 2010 -0800

    Autoconf selinux support

    If libselinux is detected on your system at configure time link
    against it.  This allows us to use a library call to detect if
    selinux is enabled and if it is to pass the mount option:

      "context=\"system_u:object_r:file_t:s0"

    For now this is required because none of the existing selinux
    policies are aware of the zfs filesystem type.  Because of this
    they do not properly enable xattr based labeling even though
    zfs supports all of the required hooks.

    Until distro's add zfs as a known xattr friendly fs type we
    must use mntpoint labeling.  Alternately, end users could modify
    their existing selinux policy with a little guidance.

commit 95c73795b001267d6b683b71e8abe51de4b0c938
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 7 12:24:03 2011 -0800

    Fix ZVOL rename minor devices

    During a rename we need to be careful to destroy and create a
    new minor for the ZVOL _only_ if the rename succeeded.  The previous
    code would both destroy you minor device unconditionally, it would
    also fail to create the new minor device on success.

commit 149e873ab174ded1f632f2b2eb2267593517c7ca
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 16 14:05:42 2010 -0800

    Fix minor compiler warnings

    These compiler warnings were introduced when code which was
    previously #ifdef'ed out by HAVE_ZPL was re-added for use
    by the posix layer.  All of the following changes should be
    obviously correct and will cause no semantic changes.

commit 683fe41fc718fd43f57aa9ca76457fe34e62057c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 10 12:54:30 2010 -0800

    Add missing mkdirp prototype

    For while now mkdirp has been built as part of libspl however
    the protoype was never added to libgen.h.  This went unnoticed
    until enabling the mount support which uses mkdirp().

commit 5b63b3eb6f42f3d9f6a19b22c3f10f72927eeacc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 10 12:00:00 2010 -0800

    Use cv_timedwait_interruptible in arc

    The issue is that cv_timedwait() sleeps uninterruptibly to block signals
    and avoid waking up early.  Under Linux this counts against the load
    average keeping it artificially high.  This change allows the arc to
    sleep interruptibly which mean it may be woken up early due to a signal.

    Normally this means some extra care must be taken to handle a potential
    signal.  But for the arcs usage of cv_timedwait() there is no harm in
    waking up before the timeout expires so no extra handling is required.

commit 8d4e8140ef67fa9c8fa0b1d0f5b1d5d36c747969
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Tue Dec 14 09:50:37 2010 -0800

    Fix block device-related issues in zdb.

    Specifically, this fixes the two following errors in zdb when a pool
    is composed of block devices:

    1) 'Value too large for defined data type' when running 'zdb <dataset>'.
    2) 'character device required' when running 'zdb -l <block-device>'.

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

commit a7dc7e5d5a5c4a68266b3d9ce89c6c53c04b1741
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 7 16:05:25 2010 -0800

    Enable rrwlock.c compilation

    With the addition of the thread specific data interfaces to the
    SPL it is safe to enable compilation of the re-enterant read
    reader/writer locks.

commit 135cf6a8ae587855c8df803549c81dc60ccc12b5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 7 15:33:12 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 31165fd9aacefb0f606ced8265de34247e9f9bc5
Author: Ned Bass <bass6@llnl.gov>
Date:   Tue Nov 23 11:19:57 2010 -0800

    Remove partition from vdev name in zfault.sh

    As of the 0.5.2 tag, names of whole-disk vdevs must be specified to
    the command line tools without partition identifiers.  This commit
    fixes a 'zpool online' command in zfault.sh that incorrectly includes
    he partition in the vdev name, causing test 9 to fail.

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

commit 5e7affae52365f9f329cc63a53ae570352c4d993
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 12 09:33:17 2010 -0800

    Skip /dev/hpet during 'zpool import'

    If libblkid does not contain ZFS support, then 'zpool import' will scan
    all block devices in /dev/ to determine which ones are components of a
    ZFS filesystem.  It does this by opening all the devices and stat'ing
    them to determine which ones are block devices.  If the device turns
    out not to be a block device it is skipped.

    Usually, this whole process is pretty harmless (although slow).  But
    there are certain devices in /dev/ which must be handled in a very
    specific way or your system may crash.  For example, if /dev/watchdog
    is simply opened the watchdog timer will be started and your system
    will panic when the timer expires.

    It turns out the /dev/hpet causes similiar problems although only when
    accessed under a virtual machine.  For some reason accessing /dev/hpet
    causes qemu to crash.  To address this issue this commit adds /dev/hpet
    to the device blacklist, it will be skipped solely based on its name.

commit e0f3df67e5174cd51284f0c26779046facfc95e0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Nov 11 10:22:36 2010 -0800

    Add '-ts' options to zconfig.sh/zfault.sh usage

    When adding this functionality originally the options to only
    run specific tests (-t), or conversely skip specific tests (-s)
    were omitted from the usage page.  This commit adds the missing
    documentation.

commit 7dc3830c0f591ae8dfe349cf67c0c61cc8602dc8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Nov 11 10:17:02 2010 -0800

    Remove spl/zfs modules as part of cleanup

    The idea behind the '-c' flag is to cleanup everything from a
    previous test run which might cause the test script to fail.
    This should also include removing the previously loaded module.
    This makes it a little easier to run 'zconfig.sh -c', however
    remember this is a test script and it will take all of your
    other zpools offline for the purposes of the test.  This notion
    has also been extended to the default 'make check' behavior.

commit cf47fad67d798f42e6d2edc8b0e9f9b43175703b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Nov 11 10:00:39 2010 -0800

    Unconditionally load core kernel modules

    Loading and unloading the zlib modules as part of the zfs.sh
    script has proven a little problematic for a few reasons.

      * First, your kernel may not need to load either zlib_inflate
        or zlib_deflate.  This functionality may be built directly in
        to your kernel.  It depends entirely on what your distribution
        decided was the right thing to do.

      * Second, even if you do manage to load the correct modules you
        may not be able to unload them.  There may other consumers
        of the modules with a reference preventing the unload.

    To avoid both of these issues the test scripts have been updated to
    attempt to unconditionally load all modules listed in KERNEL_MODULES.
    If the module is successfully loaded you must have needed it. If
    the module can't be loaded that almost certainly means either it is
    built in to your kernel or is already being used by another consumer.
    In both cases this is not an issue and we can move on to the spl/zfs
    modules.

    Finally, by removing these kernel modules from the MODULES list
    we ensure they are never unloaded during 'zfs.sh -u'.  This avoids
    the issue of the script failing because there is another consumer
    using the module we were not aware of.  In other words the script
    restricts unloading modules to only the spl/zfs modules.

    Closes #78

commit e06be586410cdad14d2dce76af4f2d43eebe7c83
Author: Ned Bass <bass6@llnl.gov>
Date:   Wed Nov 10 13:36:18 2010 -0800

    Fix for access beyond end of device error

    This commit fixes a sign extension bug affecting l2arc devices.  Extremely
    large offsets may be passed down to the low level block device driver on
    reads, generating errors similar to

        attempt to access beyond end of device
        sdbi1: rw=14, want=36028797014862705, limit=125026959

    The unwanted sign extension occurrs because the function arc_read_nolock()
    stores the offset as a daddr_t, a 32-bit signed int type in the Linux kernel.
    This offset is then passed to zio_read_phys() as a uint64_t argument, causing
    sign extension for values of 0x80000000 or greater.  To avoid this, we store
    the offset in a uint64_t.

    This change also changes a few daddr_t struct members to uint64_t in the libspl
    headers to avoid similar bugs cropping up in the future.  We also add an ASSERT
    to __vdev_disk_physio() to check for invalid offsets.

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

commit 1f30b9d432dd48826cd562757d19c2771b0973e8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 10 16:44:20 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 ZFS code 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 8326eb4605a3d7c87cac15d5d11316fb99cd9ab0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 10 16:38:14 2010 -0800

    Linux 2.6.36 compat, blk_* macros removed

    Most of the blk_* macros were removed in 2.6.36.  Ostensibly this was
    done to improve readability and allow easier grepping.  However, from
    a portability stand point the macros are helpful.  Therefore the needed
    macros are redefined here if they are missing from the kernel.

commit 675de5aa379bfceb0258a20c4ccd1414e4798ee6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 10 15:49:40 2010 -0800

    Linux 2.6.36 compat, synchronous bio flag

    The name of the flag used to mark a bio as synchronous has changed
    again in the 2.6.36 kernel due to the unification of the BIO_RW_*
    and REQ_* flags.  The new flag is called REQ_SYNC.  To simplify
    checking this flag I have introduced the vdev_disk_dio_is_sync()
    helper function.  Based on the results of several new autoconf
    tests it uses the correct mask to check for a synchronous bio.

    Preferred interface for flagging a synchronous bio:
      2.6.12-2.6.29: BIO_RW_SYNC
      2.6.30-2.6.35: BIO_RW_SYNCIO
      2.6.36-2.6.xx: REQ_SYNC

commit f4af6bb783b0b7f2a6075cb1c74c225db8a157b2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 10 14:40:38 2010 -0800

    Linux 2.6.36 compat, use REQ_FAILFAST_MASK

    As of linux-2.6.36 the BIO_RW_FAILFAST and REQ_FAILFAST flags
    have been unified under the REQ_* names.  These flags always had
    to be kept in-sync so this is a nice step forward, unfortunately
    it means we need to be careful to only use the new unified flags
    when the BIO_RW_* flags are not defined.  Additional autoconf
    checks were added for this and if it is ever unclear which method
    to use no flags are set.  This is safe but may result in longer
    delays before a disk is failed.

    Perferred interface for setting FAILFAST on a bio:
      2.6.12-2.6.27: BIO_RW_FAILFAST
      2.6.28-2.6.35: BIO_RW_FAILFAST_{DEV|TRANSPORT|DRIVER}
      2.6.36-2.6.xx: REQ_FAILFAST_{DEV|TRANSPORT|DRIVER}

commit b04cffc9b03db08148f19bfbc92a53e5dc7b30d5
Author: Ned Bass <bass6@llnl.gov>
Date:   Tue Nov 9 14:20:01 2010 -0800

    Remove inconsistent use of EOPNOTSUPP

    Commit 3ee56c292bbcd7e6b26e3c2ad8f0e50eee236bcc changed an ENOTSUP return value
    in one location to ENOTSUPP to fix user programs seeing an invalid ioctl()
    error code.  However, use of ENOTSUP is widespread in the zfs module.  Instead
    of changing all of those uses, we fixed the ENOTSUP definition in the SPL to be
    consistent with user space.  The changed return value in the above commit is
    therefore no longer needed, so this commit reverses it to maintain consistency.

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

commit 8c3ab23f4be92a4e55f07f8c1bb467b851ed3e54
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 5 12:29:58 2010 -0700

    Add lustre zpios-test workload

    The lustre zpios-test simulates a reasonable lustre workload.  It will
    create 128 threads, the same as a Lustre OSS, and then 4096 individual
    objects.  Each objects is 16MiB in size and will be written/read in 1MiB
    from a random thread.  This is fundamentally how we expect Lustre to behave
    for large IO intensive workloads.

commit a8179b513904f4e11eb1299f70869d15ee577139
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 5 11:51:24 2010 -0700

    Prep for 0.5.2 tag

    Update META file to prep for 0.5.2 tag.

commit cb39a6c6aa91531a641232e7d0c6a4d63836b0cc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 5 11:43:20 2010 -0700

    Replace custom zpool configs with generic configs

    To streamline testing I have in the past added several custom configs
    to the zpool-config directory.  This change reverts those custom configs
    and replaces them with three generic config which can do the same thing.
    The generic config behavior can be set by setting various environment
    variables when calling either the zpool-create.sh or zpios.sh scripts.

    For example if you wanted to create and test a single 4-disk Raid-Z2
    configuration using disks [A-D]1 with dedicated ZIL and L2ARC devices
    you could run the following.

    $ ZIL="log A2" L2ARC="cache B2" RANKS=1 CHANNELS=4 LEVEL=2 \
      zpool-create.sh -c zpool-raidz

    $ zpool status tank
      pool: tank
     state: ONLINE
     scan: none requested
    config:

          NAME        STATE     READ WRITE CKSUM
          tank        ONLINE       0     0     0
            raidz2-0  ONLINE       0     0     0
              A1      ONLINE       0     0     0
              B1      ONLINE       0     0     0
              C1      ONLINE       0     0     0
              D1      ONLINE       0     0     0
          logs
            A2        ONLINE       0     0     0
          cache
            B2        ONLINE       0     0     0

    errors: No known data errors

commit 3ee56c292bbcd7e6b26e3c2ad8f0e50eee236bcc
Author: Ned Bass <bass6@llnl.gov>
Date:   Fri Oct 29 15:27:03 2010 -0700

    Make rollbacks fail gracefully

    Support for rolling back datasets require a functional ZPL, which we currently
    do not have.  The zfs command does not check for ZPL support before attempting
    a rollback, and in preparation for rolling back a zvol it removes the minor
    node of the device.  To prevent the zvol device node from disappearing after a
    failed rollback operation, this change wraps the zfs_do_rollback() function in
    an #ifdef HAVE_ZPL and returns ENOSYS in the absence of a ZPL.  This is
    consistent with the behavior of other ZPL dependent commands such as mount.

    The orginal error message observed with this bug was rather confusing:

        internal error: Unknown error 524
        Aborted

    This was because zfs_ioc_rollback() returns ENOTSUP if we don't HAVE_ZPL, but
    Linux actually has no such error code.  It should instead return EOPNOTSUPP, as
    that is how ENOTSUP is defined in user space.  With that we would have gotten
    the somewhat more helpful message

        cannot rollback 'tank/fish': unsupported version

    This is rather a moot point with the above changes since we will no longer make
    that ioctl call without a ZPL.  But, this change updates the error code just in
    case.

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

commit 7e55f4e00cefd7bf5ff7753759c42c5af19ba710
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Oct 28 10:42:38 2010 -0700

    Increate zio write interrupt thread count.

    Increasing the default zio_wr_int thread count from 8 to 16 improves
    write performence by 13% on large systems.  More testing need to be
    done but I suspect the ideal tuning here is ZTI_BATCH() with a minimum
    of 8 threads.

commit 451041db531dfec52c9e70fbd5d4179e30d61e2f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Oct 28 10:36:50 2010 -0700

    Shorten zio_* thread names

    Linux kernel thread names are expected to be short.  This change shortens
    the zio thread names to 10 characters leaving a few chracters to append
    the /<cpuid> to which the thread is bound.  For example: z_wr_iss/0.

commit b1c58213751141f28793e723017d4064893d819a
Author: Ned Bass <bass6@llnl.gov>
Date:   Fri Oct 29 12:13:52 2010 -0700

    Fix panic mounting unformatted zvol

    On some older kernels, i.e. 2.6.18, zvol_ioctl_by_inode() may get passed a NULL
    file pointer if the user tries to mount a zvol without a filesystem on it.
    This change adds checks to prevent a null pointer dereference.

    Closes #73.

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

commit 6ee71f5ce39885969f986f3092fed00f41667963
Author: Ned Bass <bass6@llnl.gov>
Date:   Fri Oct 22 11:13:16 2010 -0700

    Call modprobe with absolute path

    Some sudo configurations may not include /sbin in the PATH.
    libzfs_load_module() currently does not call modprobe with an absolute path, so
    it may fail under such configurations if called under sudo.  This change adds
    the absolute path to modprobe so we no longer rely on how PATH is set.

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

commit d877ac6bfefaf09f0399888df1fc88bd4b4419d0
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Oct 21 17:08:30 2010 -0700

    Fix intermittent 'zpool add' failures

    Creating whole-disk vdevs can intermittently fail if a udev-managed symlink to
    the disk partition is already in place.  To avoid this, we now remove any such
    symlink before partitioning the disk.  This makes zpool_label_disk_wait() truly
    wait for the new link to show up instead of returning if it finds an old link
    still in place.  Otherwise there is a window between when udev deletes and
    recreates the link during which access attempts will fail with ENOENT.

    Also, clean up a comment about waiting for udev to create symlinks.  It no
    longer needs to describe the special cases for the link names, since that is
    now handled in a separate helper function.

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

commit d4055aac3c4fdb6c1b5b1a7b73d20ff716e0a711
Author: Ned Bass <bass6@llnl.gov>
Date:   Mon Oct 18 11:07:20 2010 -0700

    Add zconfig test for adding and removing vdevs

    This test performs a sanity check of the zpool add and remove commands.  It
    tests adding and removing both a cache disk and a log disk to and from a zpool.
    Usage of both a shorthand device path and a full path is covered.  The test
    uses a scsi_debug device as the disk to be added and removed.  This is done so
    that zpool will see it as a whole disk and partition it, which it does not
    currently done for loopback devices.  We want to verify that the manipulation
    done to whole disks paths to hide the parition information does not break the
    add/remove interface.

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

commit 4682b8c14efdeae26808195422a763b896fef037
Author: Ned Bass <bass6@llnl.gov>
Date:   Mon Oct 18 11:26:04 2010 -0700

    Remove solaris-specific code from make_leaf_vdev()

    Portability between Solaris and Linux isn't really an issue for us anymore, and
    removing sections like this one helps simplify the code.

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

commit a2c6816c34952eb6dad51248d31172189fba9126
Author: Ned Bass <bass6@llnl.gov>
Date:   Wed Oct 13 17:27:41 2010 -0700

    Support shorthand names with zpool remove

    zpool status displays abbreviated vdev names without leading path components
    and, in the case of whole disks, without partition information.  Also, the
    zpool subcommands 'create' and 'add' support using shorthand devices names
    without qualified paths.  Prior to this change, however, removing a device
    generally required specifying its name as it is stored in the vdev label.  So
    while zpool status might list a cache disk with a name like A16, removing it
    would require a full path such as /dev/disk/zpool/A16-part1, which is
    non-intuitive.

    This change adds support for shorthand device names with the remove subcommand
    so one can simply type, for example,

            zpool remove tank A16

    A consequence of this change is that including the partition information when
    removing a whole-disk vdev now results in an error.  While this is arguably the
    correct behavior, it is a departure from how zpool previously worked in this
    project.

    This change removes the only reference to ctd_check_path(), so that function is
    also removed to avoid compiler warnings.

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

commit 79e7242a91c17f50c857b53d2a7313cf363ea535
Author: Ned Bass <bass6@llnl.gov>
Date:   Wed Oct 13 16:16:25 2010 -0700

    Add helper functions for manipulating device names

    This change adds two helper functions for working with vdev names and paths.
    zfs_resolve_shortname() resolves a shorthand vdev name to an absolute path
    of a file in /dev, /dev/disk/by-id, /dev/disk/by-label, /dev/disk/by-path,
    /dev/disk/by-uuid, /dev/disk/zpool.  This was previously done only in the
    function is_shorthand_path(), but we need a general helper function to
    implement shorthand names for additional zpool subcommands like remove.
    is_shorthand_path() is accordingly updated to call the helper function.

    There is a minor change in the way zfs_resolve_shortname() tests if a file
    exists.  is_shorthand_path() effectively used open() and stat64() to test for
    file existence, since its scope includes testing if a device is a whole disk
    and collecting file status information.  zfs_resolve_shortname(), on the other
    hand, only uses access() to test for existence and leaves it to the caller to
    perform any additional file operations.  This seemed like the most general and
    lightweight approach, and still preserves the semantics of is_shorthand_path().

    zfs_append_partition() appends a partition suffix to a device path.  This
    should be used to generate the name of a whole disk as it is stored in the vdev
    label. The user-visible names of whole disks do not contain the partition
    information, while the name in the vdev label does.   The code was lifted from
    the function make_disks(), which now just calls the helper function.  Again,
    having a helper function to do this supports general handling of shorthand
    names in the user interface.

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

commit 0ee8118bd31d1c160123d0aac9c55455706d5975
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Sep 28 16:32:12 2010 -0700

    Add zfault zpool configurations and tests

    Eleven new zpool configurations were added to allow testing of various
    failure cases.  The first 5 zpool configurations leverage the 'faulty'
    md device type which allow us to simuluate IO errors at the block layer.
    The last 6 zpool configurations leverage the scsi_debug module provided
    by modern kernels.  This device allows you to create virtual scsi
    devices which are backed by a ram disk.  With this setup we can verify
    the full IO stack by injecting faults at the lowest layer.  Both methods
    of fault injection are important to verifying the IO stack.

    The zfs code itself also provides a mechanism for error injection
    via the zinject command line tool.  While we should also take advantage
    of this appraoch to validate the code it does not address any of the
    Linux integration issues which are the most concerning.  For the
    moment we're trusting that the upstream Solaris guys are running
    zinject and would have caught internal zfs logic errors.

    Currently, there are 6 r/w test cases layered on top of the 'faulty'
    md devices.  They include 3 writes tests for soft/transient errors,
    hard/permenant errors, and all writes error to the device.  There
    are 3 matching read tests for soft/transient errors, hard/permenant
    errors, and fixable read error with a write.  Although for this last
    case zfs doesn't do anything special.

    The seventh test case verifies zfs detects and corrects checksum
    errors.  In this case one of the drives is extensively damaged and
    by dd'ing over large sections of it.  We then ensure zfs logs the
    issue and correctly rebuilds the damage.

    The next  test cases use the scsi_debug configuration to injects error
    at the bottom of the scsi stack.  This ensures we find any flaws in the
    scsi midlayer or our usage of it.  Plus it stresses the device specific
    retry, timeout, and error handling outside of zfs's control.

    The eighth test case is to verify that the system correctly handles an
    intermittent device timeout.  Here the scsi_debug device drops 1 in N
    requests resulting in a retry either at the block level.  The ZFS code
    does specify the FAILFAST option but it turns out that for this case
    the Linux IO stack with still retry the command.  The FAILFAST logic
    located in scsi_noretry_cmd() does no seem to apply to the simply
    timeout case.  It appears to be more targeted to specific device or
    transport errors from the lower layers.

    The ninth test case handles a persistent failure in which the device
    is removed from the system by Linux.  The test verifies that the failure
    is detected, the device is made unavailable, and then can be successfully
    re-add when brought back online.  Additionally, it ensures that errors
    and events are logged to the correct places and the no data corruption
    has occured due to the failure.

commit baa40d45cbb336765b2f89d934cd9ea690e4f7c9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Oct 4 16:21:04 2010 -0700

    Fix missing 'zpool events'

    It turns out that 'zpool events' over 1024 bytes in size where being
    silently dropped.  This was discovered while writing the zfault.sh
    tests to validate common failure modes.

    This could occur because the zfs interface for passing an arbitrary
    size nvlist_t over an ioctl() is to provide a buffer for the packed
    nvlist which is usually big enough.  In this case 1024 byte is the
    default.  If the kernel determines the buffer is to small it returns
    ENOMEM and the minimum required size of the nvlist_t.  This was
    working properly but in the case of 'zpool events' the event stream
    was advanced dispite the error.  Thus the retry with the bigger
    buffer would succeed but it would skip over the previous event.

    The fix is to pass this size to zfs_zevent_next() and determine
    before removing the event from the list if it will fit.  This was
    preferable to checking after the event was returned because this
    avoids the need to rewind the stream.

commit a69052be7f9a4008e2b09578e9db5fdebc186111
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Oct 1 16:54:52 2010 -0700

    Initial zio delay timing

    While there is no right maximum timeout for a disk IO we can start
    laying the ground work to measure how long they do take in practice.
    This change simply measures the IO time and if it exceeds 30s an
    event is posted for 'zpool events'.

    This value was carefully selected because for sd devices it implies
    that at least one timeout (SD_TIMEOUT) has occured.  Unfortunately,
    even with FAILFAST set we may retry and request and not get an
    error.  This behavior is strongly dependant on the device driver
    and how it is hooked in to the scsi error handling stack.  However
    by setting the limit at 30s we can log the event even if no error
    was returned.

    Slightly longer term we can start recording these delays perhaps
    as a simple power-of-two histrogram.  This histogram can then be
    reported as part of the 'zpool status' command when given an command
    line option.

    None of this code changes the internal behavior of ZFS.  Currently
    it is simply for reporting excessively long delays.

commit 2959d94a0a53612cc1ca9ce9d17df26c3d69a513
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Oct 1 10:57:56 2010 -0700

    Add FAILFAST support

    ZFS works best when it is notified as soon as possible when a device
    failure occurs.  This allows it to immediately start any recovery
    actions which may be needed.  In theory Linux supports a flag which
    can be set on bio's called FAILFAST which provides this quick
    notification by disabling the retry logic in the lower scsi layers.

    That's the theory at least.  In practice is turns out that while the
    flag exists you oddly have to set it with the BIO_RW_AHEAD flag.
    And even when it's set it you may get retries in the low level
    drivers decides that's the right behavior, or if you don't get the
    right error codes reported to the scsi midlayer.

    Unfortunately, without additional kernels patchs there's not much
    which can be done to improve this.  Basically, this just means that
    it may take 2-3 minutes before a ZFS is notified properly that a
    device has failed.  This can be improved and I suspect I'll be
    submitting patches upstream to handle this.

commit c5343ba71b9fea6e3636be25a16173092f2042ba
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Sep 28 16:30:54 2010 -0700

    Fix 'zpool events' formatting for awk

    To make the 'zpool events' output simple to parse with awk the extra
    newline after embedded nvlists has been dropped.  This allows the
    entire event to be parsed as a single whitespace seperated record.

    The -H option has been added to operate in scripted mode.  For the
    'zpool events' command this means don't print the header.  The usage
    of -H is consistent with scripted mode for other zpool commands.

commit 312c07edfdbdbabfab7f721797bba8eade5dcdeb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Sep 27 16:55:05 2010 -0700

    Generate zevents for speculative and soft errors

    By default the Solaris code does not log speculative or soft io errors
    in either 'zpool status' or post an event.  Under Linux we don't want
    to change the expected behavior of 'zpool status' so these io errors
    are still suppressed there.

    However, since we do need to know about these events for Linux FMA and
    the 'zpool events' interface is new we do post the events.  With the
    addition of the zio_flags field the posted events now contain enough
    information that a user space consumer can identify and discard these
    events if it sees fit.

commit d148e95156b98ac226013d24962d1afa4a51c712
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Sep 27 15:30:14 2010 -0700

    Fix negative zio->io_error which must be positive.

    All the upper layers of zfs expect zio->io_error to be positive.  I was
    careful but I missed one instance in vdev_disk_physio_completion() which
    could return a negative error.  To ensure all cases are always caught I
    had additionally added an ASSERT() to check this before zio_interpret().

    Finally, as a debugging aid when zfs is build with --enable-debug all
    errors from the backing block devices will be reported to the console
    with an error message like this:

    	ZFS: zio error=5 type=1 offset=4217856 size=8192 flags=60440

commit 398f129ca36b211b19b98ca16aff1d7e91ee2949
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Sep 27 15:04:24 2010 -0700

    Suppress large kmem_alloc() warning.

    Observed during failure mode testing, dsl_scan_setup_sync() allocates
    73920 bytes.  This is way over the limit of what is wise to do with a
    kmem_alloc() and it should probably be moved to a slab.  For now I'm
    just flagging it with KM_NODEBUG to quiet the error until this can be
    revisited.

commit 5c1bad0013204d70c5b60713af977bdaa5df1302
Author: Ned Bass <bass6@llnl.gov>
Date:   Mon Oct 11 14:48:52 2010 -0700

    Fix undersized buffer in is_shorthand_path()

    The string array 'char dirs[5][8]' was too small to accomodate the terminating
    NUL character in "by-label". This change adds the needed additional byte.

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

commit 4b1abce9f5c20e298ddaa3368b3fb6a529c71459
Author: Ned Bass <bass6@llnl.gov>
Date:   Wed Oct 6 18:00:55 2010 -0700

    Make commands load zfs module on demand

    This commit modifies libzfs_init() to attempt to load the zfs kernel module if
    it is not already loaded.  This is done to simplify initialization by letting
    users simply import their zpools without having to first load the module.

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

commit 83c62c939938ca5915a61022208a31c4ab3faa1c
Author: Ned Bass <bass6@llnl.gov>
Date:   Fri Oct 1 12:00:58 2010 -0700

    Strip partition from device name for whole disks

    Under Solaris, the slice number is chopped off when displaying the device name
    if the vdev is a whole disk.  Under Linux we should similarly discard the
    partition number.  This commit adds the logic to perform the name truncation
    for devices ending in -partX, XpX, or X, where X is a string of digits.  The
    second case handles devices like md0p0. The third case is limited to scsi and
    ide disks, i.e. those beginning with "sd" or "hd", in order to avoid stripping
    the number from names like "loop0".

    This commit removes the Solaris-specific code for removing slices, since we no
    longer reasonably expect our changes to be merged in upstream.  The partition
    stripping code was moved off to a helper function to improve readability.

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

commit 3a7381e531f55929f894fa2e81b79e1980de6f22
Author: Ned Bass <bass6@llnl.gov>
Date:   Mon Oct 4 13:08:24 2010 -0700

    Use stored whole_disk property when opening a vdev

    This commit fixes a bug in vdev_disk_open() in which the whole_disk property
    was getting set to 0 for disk devices, even when it was stored as a 1 when the
    zpool was created.  The whole_disk property lets us detect when the partition
    suffix should be stripped from the device name in CLI output.  It is also used
    to determine how writeback cache should be set for a device.

    When an existing zpool is imported its configuration is read from the vdev
    label by user space in zpool_read_label().  The whole_disk property is saved in
    the nvlist which gets passed into the kernel, where it in turn gets saved in
    the vdev struct in vdev_alloc().  Therefore, this value is available in
    vdev_disk_open() and should not be overridden by checking the provided device
    path, since that path will likely point to a partition and the check will
    return the wrong result.

    We also add an ASSERT that the whole_disk property is set.  We are not aware of
    any cases where vdev_disk_open() should be called with a config that doesn't
    have this property set.  The ASSERT is there so that when debugging is enabled
    we can identify any legitimate cases that we are missing.  If we never hit the
    ASSERT, we can at some point remove it along with the conditional whole_disk
    check.

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

commit 0151834d65bb05f02a43c7f1b6128030aa3e76c4
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Mon Oct 4 10:19:17 2010 -0700

    Register the space accounting callback even when we don't have the ZPL.

    This callback is needed for properly accounting the per-uid and per-gid
    space usage.  Even if we don't have the ZPL, we still need this callback
    in order to have proper on-disk ZPL compatibility and to be able to use
    Lustre quotas.

    Fortunately, the callback doesn't have any ZPL/VFS dependencies so we
    can just move it out of #ifdef HAVE_ZPL.

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

commit 858219cc4e44aea8373c56a94380f5be53026b38
Author: Ned Bass <bass6@llnl.gov>
Date:   Wed Sep 22 18:53:59 2010 -0700

    Fix missing vdev names in zpool status output

    Top-level vdev names in zpool status output should follow a <type-id> naming
    convention.  In the case of raidz devices, the type portion of the name was
    missing.

    This commit fixes a bug in zpool_vdev_name() where in this snprintf call

    	(void) snprintf(buf, sizeof (buf), "%s-%llu", path,
    		(u_longlong_t)id);

    buf and path may point to the same location.  The result is that buf ends up
    containing only the "-id" part.  This only occurred for raidz devices because
    the code for appending the parity level to the type string stored its result in
    buf then set path to point there.  To fix this we allocate a new temporary
    buffer on the stack instead of reusing buf.

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

commit 368f4c10aec9da58738750cf33de6d12e4fcb500
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Fri Sep 17 16:07:24 2010 -0700

    Export ZFS symbols needed by Lustre.

    Required for the DB_DNODE_ENTER()/DB_DNODE_EXIT() helpers.

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

commit 1e411a4c12b95b1a18028585ae7fd5e51030b25e
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Fri Sep 17 16:08:56 2010 -0700

    Quiet down very frequent large allocation warning in ZFS.

    In my machine, dnode_hold_impl() allocates 9992 bytes in DEBUG mode and it
    causes a large stream of stack traces in the logs. Instead, use KM_NODEBUG
    to quiet down this known large alloc.

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

commit 12f30129745a3da85b6bbc31e24d3738ff007d9b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 17 16:22:08 2010 -0700

    Add missing Makefile.in from zpool_layout commit

    The scripts/zpool-layout/Makefile.in file generated by autogen.sh
    was accidentally omitted from the previous commit.  Add it.

commit a5b4d63582005300c4526c7c15b63294e5408534
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 15 15:32:27 2010 -0700

    Add [-m map] option to zpool_layout

    By default the zpool_layout command would always use the slot
    number assigned by Linux when generating the zdev.conf file.
    This is a reasonable default there are cases when it makes
    sense to remap the slot id assigned by Linux using your own
    custom mapping.

    This commit adds support to zpool_layout to provide a custom
    slot mapping file.  The file contains in the first column the
    Linux slot it and in the second column the custom slot mapping.
    By passing this map file with '-m map' to zpool_config the
    mapping will be applied when generating zdev.conf.

    Additionally, two sample mapping have been added which reflect
    different ways to map the slots in the dragon drawers.

commit bbf3a3575c0b5795d3e4ddc27523258dc61ffa88
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 15 09:09:37 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 b1aa38137f7085cfce5d76c3d28b8dabdac1830e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Sep 14 15:58:25 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 2c4834f87af4beec4b16157622c85d2850cce25f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 10 21:44:17 2010 -0700

    Wait up to timeout seconds for udev device

    Occasional failures were observed in zconfig.sh because udev
    could be delayed for a few seconds.  To handle this the wait_udev
    function has been added to wait for timeout seconds for an
    expected device before returning an error.  By default callers
    currently use a 30 seconds timeout which should be much longer
    than udev ever needs but not so long to worry the test suite
    is hung.

commit ac063c48ae12061bbe0f66b3a9d641239782ae62
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 10 21:35:27 2010 -0700

    Reduce volume size in zconfig.sh

    Due to occasional ENOSPC failures on certain platforms I've reduced
    the size of the ZVOL from 400M to 300M for the zvol+ext2 clone tests.

commit e32f7d6162296de70cab5a6b298bfe2618d657ef
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 10 12:33:31 2010 -0700

    Use top level object directory in zfs-module.spec

    Commit 6283f55ea1b91e680386388c17d14b89e344fa8d updated _almost_
    everything to use the correct top level object directory.  This
    was done to correctly supporting building in custom directories.
    Unfortunately, I missed this one instance in the zfs-module.spec.in
    rpm spec file.  Fix it.

commit d9400aede6ad32dde7021c739f0e8c7b570432af
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 10 11:43:12 2010 -0700

    Exclude atomic.S source from dist rules

    The zfs package supports the option --with-config=srpm which
    is used to bootstrap configure to allow the 'make srpm' target
    to work.  This has the advantage of allowing creation of source
    rpms without having all your -devel packages installed.  This
    source package can then be feed back in to an automated build
    farm which only installs the required packages listed by the
    srpm.  This ensures that all proper dependencies are expressed
    by the source package, because if they are not you will get
    configure/build failures.

    The trouble here is that --with-config=srpm prevents the
    architecture check from running resulting in TARGET_ASM_DIR
    being set to the default asm-generic.  The 'make dist' rule
    then fails because there is no asm-generic/atomic.S file
    because it is generated at build time.  To handle this I
    have added an empty file asm-generic/atomic.S simply as a
    place holder for 'make dist'.

commit e37e1d3040edac06a0d4380f7eaaa7a69892c7c6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Sep 10 09:36:39 2010 -0700

    Use linux __KERNEL__ define

    Previously the project contained who zfs_context.h files,
    one for user space builds and one for kernel space builds.
    It was the responsibility of the source including the file
    to ensure the right one was included based on the order of
    the include paths.

    This was the way it was done in OpenSolaris but for our
    purposes I felt it was overly obscure.  The user and kernel
    zfs_context.h files have been combined in to a single file
    and a #define determines if you get the user or kernel
    context.

    The issue here was that I used the _KERNEL macro which is
    defined as part of the spl which will only be defined for
    most builds after you include the right zfs_context.  It is
    safer to use the __KERNEL__ macro which is automatically
    defined as part of the kernel build process and passed as
    a command line compiler option.  It will always be defined
    if your building in the kernel and never for user space.

commit 8ec8000f95d60daa51f670fd46930a2cec6accae
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 8 21:39:28 2010 -0700

    Fix "format not a string literal" warning

    Under Ubuntu 10.04 the default compiler flags include -Wformat
    and -Wformat-security which cause the above warning.  In particular,
    cases where "%s" was forgotten as part of the format specifier.

    https://wiki.ubuntu.com/CompilerFlags

commit 6283f55ea1b91e680386388c17d14b89e344fa8d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sat Sep 4 13:26:23 2010 -0700

    Support custom build directories and move includes

    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/zfs/zfs-x.y.z.tar.gz
    tar -xzf zfs-x.y.z.tar.gz
    cd zfs-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 change also moves many of the include headers from individual
    incude/sys directories under the modules directory in to a single
    top level include directory.  This has the advantage of making
    the build rules cleaner and logically it makes a bit more sense.

commit 5e6121455c0b941f4612ceb2c1f312d527534b46
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Sep 2 20:44:41 2010 -0700

    Fix spl version check

    The spl_config.h file is checked to determine the spl version.
    However, the zfs code was looking for it in the source directory
    and not the build directory.

commit 8160dd9a74b5b5eb3439d4aa0f0bc50e3400c123
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Sep 2 13:18:17 2010 -0700

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

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

commit 7d06aee0965d66e6e5eb413c2b3ddfc049398ee0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 1 11:23:32 2010 -0700

    Prep for zfs-0.5.1 tag

commit f5e79474f07ec7a2035da2e139885a046ad70066
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 1 15:58:09 2010 -0700

    Fix zfsdev_compat_ioctl() case

    For the !CONFIG_COMPAT case fix the zfsdev_compat_ioctl()
    compatibility function name.  This was caught by the
    chaos4.3 builder.

commit 1ae93745d2eadcdfdf1ab677180f28922e7c7d26
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 1 12:54:51 2010 -0700

    Minor packaging fixes

    The GIT file was removed from the tree because I have stopped
    using TopGit.  Because of this is must also be removed from
    the top level Makefile.am as will as the zfs.spec.in file
    which referenced it.

    Fix type in lib/libzpool/Makefile.am which was preventing
    the needed zrlock.h header from being included by 'make dist'.
    I simply had the name wrong in the Makefile.am.

    Regenerated autogen.sh build products.

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

commit 9691eb9fee92301869ae34f750279f93504f7db1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 1 12:50:44 2010 -0700

    Remove scripts/common.sh

    This script is now dynamically generated at configure time
    from scripts/common.sh.in.  This change was made by commit
    26e61dd074df64f9e1d779273efd56fa9d92cdc5 but we accidentally
    kept the common.sh file around.

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

commit 34bc5537e574ac8fa7c7818e48529710e4fb83f6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Sep 1 11:23:13 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.

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

commit e70e591c51177d202396b1b0c5de04a7664d45cf
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 12:28:14 2010 -0700

    Add initial autoconf products

    Add the initial products from autogen.sh.  These products will
    be updated incrementally after this point as development occurs.

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

commit 0e8d1b2d8b5f8515aada6b43e68483bcd96db85e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:59:11 2010 -0700

    Add linux ztest support

    Minor changes to ztest for this environment.  These including
    updating ztest to run in the local development tree, as well
    as relocating some local variables in this function to the heap.

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

commit 302ef1517e5769cbe6a12d94c89f44a90721bfd4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:58:00 2010 -0700

    Add linux zpios support

    Linux kernel implementation of PIOS test app.

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

commit 9b020fd97a3dc449a94baec028b30b1fe3c2d5bc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:57:29 2010 -0700

    Add linux user util support

    This topic branch contains required changes to the user space
    utilities to allow them to integrate cleanly with Linux.

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

commit d603ed6c278f9c25b17ba8e75e9bce6e5d715ac0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:56:53 2010 -0700

    Add linux user disk support

    This topic branch contains all the changes needed to integrate the user
    side zfs tools with Linux style devices.  Primarily this includes fixing
    up the Solaris libefi library to be Linux friendly, and integrating with
    the libblkid library which is provided by e2fsprogs.

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

commit f1fb119f6bb0c3185ec88912e4488fdd9ec08ab2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:55:32 2010 -0700

    Add linux unused code tracking

    Track various large hunks which have been dropped simply
    because they are not relevant to this port.

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

commit 6b003d7cda153c58bb5faab62c5e5a7aab780715
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:55:19 2010 -0700

    Add linux topology support

    Solaris recently introduced the idea of drive topology because
    where a drive is located does matter.  I have already handled
    this with udev/blkid integration under Linux so I'm hopeful
    this case can simply be removed but for now I've just stubbed
    out what is needed in libspl and commented out the rest here.

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

commit 054bc00b4c0c257f6baf6d7145b270c7283fe51e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:54:51 2010 -0700

    Add linux compatibility

    Resolve minor Linux compatibility issues.

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

commit 7b89a549965e50f4f80e41b804bfbc3c09bbddca
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:52:20 2010 -0700

    Add linux spa thread support

    Disable the spa thread under Linux until it can be implemented.

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

commit 9c905c550bb9cb095a5d9707bc7cf72d3f2562af
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:52:05 2010 -0700

    Add linux sha2 support

    The upstream ZFS code has correctly moved to a faster native sha2
    implementation.  Unfortunately, under Linux that's going to be a little
    problematic so we revert the code to the more portable version contained
    in earlier ZFS releases.  Using the native sha2 implementation in Linux
    is possible but the API is slightly different in kernel version user
    space depending on which libraries are used.  Ideally, we need a fast
    implementation of SHA256 which builds as part of ZFS this shouldn't be
    that hard to do but it will take some effort.

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

commit a26baf285f71eb95f1eace8c79d12d647a694488
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:50:56 2010 -0700

    Add linux libspl support

    All changes needed for the libspl layer.  This includes modifications
    to files directly copied from OpenSolaris and the addition of new
    files needed to fill in the gaps.

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

commit c28b227942b421ebdc03c9df9a012642fb517223
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:49:16 2010 -0700

    Add linux kernel module support

    Setup linux kernel module support, this includes:
    - zfs context for kernel/user
    - kernel module build system integration
    - kernel module macros
    - kernel module symbol export
    - kernel module options

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

commit 00b46022c676e402e3f33ce93ee2983bbad2c46f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:46:09 2010 -0700

    Add linux kernel memory support

    Required kmem/vmem changes

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

commit 60101509ee73c6e61e50c0a4079097f31bb39f4b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:45:02 2010 -0700

    Add linux kernel disk support

    Native Linux vdev disk interfaces

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

commit 325f023544bbec6a478882c442e15304ee379759
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:44:39 2010 -0700

    Add linux kernel device support

    This branch contains the majority of the changes required to cleanly
    intergrate with Linux style special devices (/dev/zfs).  Mainly this
    means dropping all the Solaris style callbacks and replacing them
    with the Linux equivilants.

    This patch also adds the onexit infrastructure needed to track
    some minimal state between ioctls.  Under Linux it would be easy
    to do this simply using the file->private_data.  But under Solaris
    they apparent need to pass the file descriptor as part of the ioctl
    data and then perform a lookup in the kernel.  Once again to keep
    code change to a minimum I've implemented the Solaris solution.

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

commit 47d0ed1e6f8a8ee67492ec63173a27df8e4ca059
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:44:12 2010 -0700

    Add linux spl debug support

    Use spl debug if HAVE_SPL defined

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

commit 2eadf037f5ae2735bcbc61e3bb2974c6d3235b8e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:43:58 2010 -0700

    Add linux mntent support

    Use mount entry if HAVE_SETMNTENT defined

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

commit d2c15e84e9c37f9c3d10dfffc9bd6be4600bf924
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:43:42 2010 -0700

    Add linux mlslabel support

    The ZFS update to onnv_141 brought with it support for a
    security label attribute called mlslabel.  This feature
    depends on zones to work correctly and thus I am disabling
    it under Linux.  Equivilant functionality could be added
    at some point in the future.

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

commit be160928b79888fc8b4ce8122435f3f633f01ead
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:43:07 2010 -0700

    Add linux idmap support

    Use idmap service if available.

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

commit 266852767f42781821c1d62544c9b9e985828304
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:42:43 2010 -0700

    Add linux events

    This topic branch leverages the Solaris style FMA call points
    in ZFS to create a user space visible event notification system
    under Linux.  This new system is called zevent and it unifies
    all previous Solaris style ereports and sysevent notifications.

    Under this Linux specific scheme when a sysevent or ereport event
    occurs an nvlist describing the event is created which looks almost
    exactly like a Solaris ereport.  These events are queued up in the
    kernel when they occur and conditionally logged to the console.
    It is then up to a user space application to consume the events
    and do whatever it likes with them.

    To make this possible the existing /dev/zfs ABI has been extended
    with two new ioctls which behave as follows.

    * ZFS_IOC_EVENTS_NEXT
    Get the next pending event.  The kernel will keep track of the last
    event consumed by the file descriptor and provide the next one if
    available.  If no new events are available the ioctl() will block
    waiting for the next event.  This ioctl may also be called in a
    non-blocking mode by setting zc.zc_guid = ZEVENT_NONBLOCK.  In the
    non-blocking case if no events are available ENOENT will be returned.
    It is possible that ESHUTDOWN will be returned if the ioctl() is
    called while module unloading is in progress.  And finally ENOMEM
    may occur if the provided nvlist buffer is not large enough to
    contain the entire event.

    * ZFS_IOC_EVENTS_CLEAR
    Clear are events queued by the kernel.  The kernel will keep a fairly
    large number of recent events queued, use this ioctl to clear the
    in kernel list.  This will effect all user space processes consuming
    events.

    The zpool command has been extended to use this events ABI with the
    'events' subcommand.  You may run 'zpool events -v' to output a
    verbose log of all recent events.  This is very similar to the
    Solaris 'fmdump -ev' command with the key difference being it also
    includes what would be considered sysevents under Solaris.  You
    may also run in follow mode with the '-f' option.  To clear the
    in kernel event queue use the '-c' option.

    $ sudo cmd/zpool/zpool events -fv
    TIME                        CLASS
    May 13 2010 16:31:15.777711000 ereport.fs.zfs.config.sync
            class = "ereport.fs.zfs.config.sync"
            ena = 0x40982b7897700001
            detector = (embedded nvlist)
                    version = 0x0
                    scheme = "zfs"
                    pool = 0xed976600de75dfa6
            (end detector)

            time = 0x4bec8bc3 0x2e5aed98
            pool = "zpios"
            pool_guid = 0xed976600de75dfa6
            pool_context = 0x0

    While the 'zpool events' command is handy for interactive debugging
    it is not expected to be the primary consumer of zevents.  This ABI
    was primarily added to facilitate the addition of a user space
    monitoring daemon.  This daemon would consume all events posted by
    the kernel and based on the type of event perform an action.  For
    most events simply forwarding them on to syslog is likely enough.
    But this interface also cleanly allows for more sophisticated
    actions to be taken such as generating an email for a failed drive.

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

commit c9c0d073da561bcbefbdf09c87fc75b227415619
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:22:58 2010 -0700

    Add build system

    Add autoconf style build infrastructure to the ZFS tree.  This
    includes autogen.sh, configure.ac, m4 macros, some scripts/*,
    and makefiles for all the core ZFS components.

commit 40b84e7aec6392187722e61e5a4a853b530bf60f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:13:05 2010 -0700

    Fix stack ztest

    While ztest does run in user space we run it with the same stack
    restrictions it would have in kernel space.  This ensures that any
    stack related issues which would be hit in the kernel can be caught
    and debugged in user space instead.

    This patch is a first pass to limit the stack usage of every ztest
    function to 1024 bytes.  Subsequent updates can further reduce this.

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

commit 6656bf56216f36805731298ee0f4de87ae6b6b3d
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 27 16:48:18 2010 -0700

    Fix stack traverse_visitbp()

    Due to  limited stack space recursive functions are frowned upon in
    the Linux kernel.  However, they often are the most elegant solution
    to a problem.  The following code preserves the recursive function
    traverse_visitbp() but moves the local variables AND function
    arguments to the heap to minimize the stack frame size.  Enough
    space is initially allocated on the stack for 20 levels of recursion.
    This change does ugly-up-the-code but it reduces the worst case
    usage from roughly 4160 bytes to 960 bytes on x86_64 archs.

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

commit da6b4005c92ce02359aabae6549f1031ad1fe41c
Author: Ned Bass <bass6@llnl.gov>
Date:   Thu Aug 26 11:38:38 2010 -0700

    Fix stack zio_execute()

    Implement zio_execute() as a wrapper around the static function
    __zio_execute() so that we can force  __zio_execute() to be inlined.
    This reduces stack overhead which is important because __zio_execute()
    is called recursively in several zio code paths.  zio_execute() itself
    cannot be inlined because it is externally visible.

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

commit c776b317e44a64d53217d34c3fa61d36fd5a32d5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:04:17 2010 -0700

    Fix stack zio_done()

    Eliminated local variables pointing to members of the zio struct.
    Just refer to the struct members directly.  This saved about 32 bytes per
    call, but this function can be called recurisvely up to 19 levels deep,
    so we potentially save up to 608 bytes.

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

commit 5ae4e2c2c660269d87dd5bbac6f590f69d0c7d8c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:03:04 2010 -0700

    Fix stack vn_open()

    We should not put a 4k maxpathlen buffer on the stack, instead
    locate it to the heap.  Even in user space we run ztest with 8K
    stacks to verify correctness

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

commit 5fed499defe68b57fab349ac945a84416fb024ba
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 11:00:46 2010 -0700

    Fix stack vdev_cache_read()

    Moving the vdev_cache_entry_t struct ve_search from the stack to
    the heap saves ~100 bytes.

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

commit 47050a88ac1445f3557030d0d7e61b8a397a5476
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:58:47 2010 -0700

    Fix stack traverse_impl()

    Stack use reduced from 560 bytes to 128 bytes.

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

commit 60948de1ef976aabaa3630707bcc8b5867508507
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:58:36 2010 -0700

    Fix stack noinline

    Certain function must never be automatically inlined by gcc because
    they are stack heavy or called recursively.  This patch flags all
    such functions I've found as 'noinline' to prevent gcc from making
    the optimization.

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

commit 18a89ba43d3e5e8a31d50838c93ec26d1cb27429
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:58:19 2010 -0700

    Fix stack lzjb

    Reduce kernel stack usage by lzjb_compress() by moving uint16 array
    off the stack and on to the heap.  The exact performance implications
    of this I have not measured but we absolutely need to keep stack
    usage to a minimum.  If/when this becomes and issue we optimize.

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

commit bf701a83c5ec192be6d3afe87ebeee45ce9127f4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:58:00 2010 -0700

    Fix stack inline

    Decrease stack usage for various call paths by forcing certain
    functions to be inlined.  By inlining the functions the overhead
    of a new stack frame is removed at the cost of increased code size.

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

commit 161ce7ce3cfc7ec1cd3c93d27f25a94b7408588f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:53:43 2010 -0700

    Fix stack dsl_scan_visitbp()

    To reduce stack overhead this topic branch moves the 128 byte
    blkptr_t data strucutre in dsl_scan_visitbp() to the heap.

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

commit fcf37ec6c28f3d62773097c2fd0d5d56c4b2f2ff
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:53:31 2010 -0700

    Fix stack dsl_dir_open_spa()

    Reduce stack usage by 256 bytes by moving buf char array from
    the stack to the heap.

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

commit 48c67dc8f8d822dbd2fec51d5e46cdb445f66814
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:53:19 2010 -0700

    Fix stack dsl_deleg_get()

    Reduce stack usage in dsl_deleg_get, gcc flagged it as consuming a
    whopping 1040 bytes or potentially 1/4 of a 4K stack.  This patch
    moves all the large structures and buffer off the stack and on to
    the heap.  This includes 2 zap_cursor_t structs each 52 bytes in
    size, 2 zap_attribute_t structs each 280 bytes in size, and 1
    256 byte char array.  The total saves on the stack is 880 bytes
    after you account for the 5 new pointers added.

    Also the source buffer length has been increased from MAXNAMELEN
    to MAXNAMELEN+strlen(MOS_DIR_NAME)+1 as described by the comment in
    dsl_dir_name().  A buffer overrun may have been possible with the
    slightly smaller buffer.

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

commit 81a4966389518651823deec8719fbf98df002102
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:52:40 2010 -0700

    Fix stack dsl_dataset_destroy()

    Move dsl_dataset_t local variable from the stack to the heap.
    This reduces the stack usage of this function from 2048 bytes
    to 176 bytes for x84_64 arches.

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

commit a8ac8e715e50e56b5e907007ef70f39301a4d984
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:52:23 2010 -0700

    Fix stack dmu_objset_snapshot()

    Reduce stack usage by 276 bytes by moving the snaparg struct from the
    stack to the heap.  We have limited stack space we must not waste.

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

commit fc5bb51f08a6c91ff9ad3559d0266eeeab0b1f61
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:52:00 2010 -0700

    Fix stack dbuf_hold_impl()

    This commit preserves the recursive function dbuf_hold_impl() but moves
    the local variables and function arguments to the heap to minimize
    the stack frame size.  Enough space is initially allocated on the
    stack for 20 levels of recursion.  This technique was based on commit
    34229a2f2ac07363f64ddd63e014964fff2f0671 which reduced stack usage of
    traverse_visitbp().

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

commit 5ac1241a9527df92f6631459127d8b2a985a8f29
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Aug 27 10:55:07 2010 -0700

    Fix dnode_move() scope

    The dnode_move() functionality is only used in the kernel build.
    As such we should be careful to wrap all of the related code
    with '#ifdef _KERNEL' to avoid gcc warnings about unused code.

commit 1e33ac1e2677c898a0b5ef6207048c692cb51bf4
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:43:27 2010 -0700

    Fix Solaris thread dependency by using pthreads

    This is a portability change which removes the dependence of the Solaris
    thread library.  All locations where Solaris thread API was used before
    have been replaced with equivilant Solaris kernel style thread calls.
    In user space the kernel style threading API is implemented in term of
    the portable pthreads library.  This includes all threads, mutexs,
    condition variables, reader/writer locks, and taskqs.

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

commit 8a8f5c6b3ca44248b47a4a65515d7828803c71ff
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:34:33 2010 -0700

    Fix zfs_ioc_objset_stats

    Interestingly this looks like an upstream bug as well.  If for some
    reason we are unable to get a zvols statistics, because perhaps the
    zpool is hopelessly corrupt, we would trigger the VERIFY.  This
    commit adds the proper error handling just to propagate the error
    back to user space.  Now the user space tools still must handle this
    properly but in the worst case the tool will crash or perhaps have
    some missing output.  That's far far better than crashing the host.

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

commit 5cc556b447380bf5fed181d3aa5f138618cd69c8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:32:23 2010 -0700

    Fix zio_taskq_dispatch to use TQ_NOSLEEP

    The zio_taskq_dispatch() function may be called at interrupt time
    and it is critical that we never sleep.

    Additionally, wrap taskq_dispatch() in a while loop because it may
    fail.  This is non optimal but is OK for now.

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

commit 2a442d1629e5405efe82b832d06f69e8d1360cc7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:31:53 2010 -0700

    Fix strncat usage

    This look like a typo.  The intention was to use strlcat() however
    strncat() was used instead accidentally this may lead to a buffer
    overflow.  This was caught by gcc -D_FORTIFY_SOURCE=2.

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

commit ef5319df8e1272f6d89e3b79e248c34f286ae049
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:30:13 2010 -0700

    Fix rw_init() usage

    Properly initialize rwlock primitives.

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

commit eaa8687be33318ae07d61a91e0069244b326f450
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:29:11 2010 -0700

    Fix zmod.h usage in userspace

    Do not use zmod.h in userspace.

    This has also been filed with the ZFS team. It makes the userspace
    libzpool code use the zlib API, instead of the Solaris-only and
    non-standard zmod.h.  The zlib API is almost identical and is a de
    facto standard, so this is a no-brainer.

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

commit 3f504482929e4c4e098ec00b335ddc45509be716
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:28:31 2010 -0700

    Fix missing newlines

    Add missing \n's to dprintf()s

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

commit 22c81dd8a9ec5177a65808c1d782599402b40233
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:27:53 2010 -0700

    Fix metaslab

    If your only going to allow one allocator to be used and it is defined
    at compile time there is no point including the others in the build.
    This patch could/should be refined for Linux to make the metaslab
    configurable at run time.  That might be a bit tricky however since
    you would need to quiese all IO.  Short of that making it configurable
    as a module load option would be a reasonable compromise.

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

commit 98f72a539c8ca2ba1ca7fc8cac44018ade96065c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:26:44 2010 -0700

    Fix list handling to only use the API

    Remove all instances of list handling where the API is not used
    and instead list data members are directly accessed.  Doing this
    sort of thing is bad for portability.

    Additionally, ensure that list_link_init() is called on newly
    created list nodes.  This ensures the node is properly initialized
    and does not rely on the assumption that zero'ing the list_node_t
    via kmem_zalloc() is the same as proper initialization.

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

commit 59e6e7ca85e984433fc9c929dd0d474579bb88a5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:26:05 2010 -0700

    Fix kstat xuio

    Move xiou stat structures from a header to the dmu.c source as is
    done with all the other kstat interfaces.  This information is local
    to dmu.c registered the xuio kstat and should stay that way.

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

commit 754c6663a36b9801b391a9659319416ecd79d9d2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:24:44 2010 -0700

    Fix dbuf eviction assertion

    Replace non-fatal assertion with warning.  This was being observed
    during testing and it should not be fatal.

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

commit 4d58b69de8a6e2dc77b73e113d2c7847d389f456
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Thu Aug 26 10:21:44 2010 -0700

    Fix vn_open/vn_rdwr error handling

    1) In vn_open(), if fstat64() returned an error, the real errno
    was being obscured by calling close().

    2) Add error handling for both pwrite64() calls in vn_rdwr().

    Signed-off-by: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>

commit 235db0aceaa01638d3cd7d041ac968c3faa3a691
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:19:48 2010 -0700

    Fix deadcode

    Remove deadcode.  It's possible the code should be in use
    somewhere, but as the source code is laid out it currently
    is not.

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

commit 753972fccf7d3d5c9406edbd5281950681e0f606
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:19:04 2010 -0700

    Fix dbuf_dirty_record_t leaks

    Fix two leaks with dbuf_dirty_record_t

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

commit 5631c038895ea97fde261831887226ee56d06dd5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:18:06 2010 -0700

    Fix variables named current

    In the linux kernel 'current' is defined to mean the current process
    and can never be used as a local variable in a function.  Simply
    replace all usage of 'current' with 'curr' in this function.

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

commit 090ff0929ec7a2e2e65efaaddb9981d15964f7d9
Author: Ricardo M. Correia <ricardo.correia@oracle.com>
Date:   Thu Aug 26 10:17:18 2010 -0700

    Fix commit callbacks

    The upstream commit cb code had a few bugs:

    1) The arguments of the list_move_tail() call in txg_dispatch_callbacks()
    were reversed by mistake. This caused the commit callbacks to not be
    called at all.

    2) ztest had a bug in ztest_dmu_commit_callbacks() where "error" was not
    initialized correctly. This seems to have caused the test to always take
    the simulated error code path, which made ztest unable to detect whether
    commit cbs were being called for transactions that successfuly complete.

    3) ztest had another bug in ztest_dmu_commit_callbacks() where the commit
    cb threshold was not being compared correctly.

    4) The commit cb taskq was using 'max_ncpus * 2' as the maxalloc argument
    of taskq_create(), which could have caused unnecessary delays in the txg
    sync thread.

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

commit a6098088eb706f643a726f71f22ea7126fcd822e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 10:10:35 2010 -0700

    Fix minor acl issue

    Minor fixes for newly introduced acl support.

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

commit d4ed667343c3dac114642b9f6cb4f7baa3ff7334
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:58:04 2010 -0700

    Fix gcc uninitialized variable warnings

    Gcc -Wall warn: 'uninitialized variable'

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

commit 1fde1e37208c2f56c72c70a06676676f04b65998
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:53:00 2010 -0700

    Fix gcc unused variable warnings

    Gcc -Wall warn: 'unused variable'

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

commit c65aa5b2b9c48375ea1c451f252f0056e16f4e49
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:52:42 2010 -0700

    Fix gcc missing parenthesis warnings

    Gcc -Wall warn: 'missing parenthesis'

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

commit e75c13c353571efaa9b4e047f16969ec13a518f5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:52:41 2010 -0700

    Fix gcc missing case warnings

    Gcc ASSERT() missing cases are impossible

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

commit 2598c0012dc33496539ce893a0af601c66cbb7e2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:52:41 2010 -0700

    Fix gcc missing braces warnings

    Resolve compiler warnings concerning missing braces.

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

commit 0bc8fd7884fc603eb7646c43b1fc0b18e37e7d62
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:52:41 2010 -0700

    Fix gcc invalid prototype warnings

    Gcc -Wall warn: 'invalid prototype'

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

commit 0ccd9d24e4fdbe9cd07f838d0a62083e8eca95f2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:52:40 2010 -0700

    Fix gcc init pragma warnings

    Use constructor attribute on non-Solaris platforms.

    The #pragma init/fini ->__attribute__((constructor/destructor))
    conversions, these should go upstream.

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

commit e5dc681a50a41d42c18b52abc8d5a3c2a357bdaa
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Thu Aug 26 09:52:40 2010 -0700

    Fix gcc ident pragma warnings

    Remove all ident pragmas which are unknown to gcc.

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

commit 0e5b68e0159e071dae2cac01c2b6783b8e926133
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:52:40 2010 -0700

    Fix gcc fortify source warnings

    Resolve issues uncovered by -D_FORTIFY_SOURCE=2, the default redhat
    macro's file adds this option to the cflags.  This causes warnings
    of the following type designed to keep the developer honest:

            warning: ignoring return value of 'foo', declared
                     with attribute warn_unused_result

    The short term fix is to wrap these calls in VERIFY() to check the
    return code.  The code was already assusing these would never fail.

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

commit f709a82dc11fe9bad4953e9cfb0a78f71c859ff0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:52:40 2010 -0700

    Fix gcc useless debug warnings

    Gcc useless debugging.

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

commit b8864a233c569edcc57c686f3ea8cd1ae3b89153
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:52:39 2010 -0700

    Fix gcc cast warnings

    Gcc -Wall warn: 'lacks a cast'
    Gcc -Wall warn: 'comparison between pointer and integer'

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

commit d6320ddb78fa89c4d0fc2af00ae53c7c70992f96
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 09:52:39 2010 -0700

    Fix gcc c90 compliance warnings

    Fix non-c90 compliant code, for the most part these changes
    simply deal with where a particular variable is declared.
    Under c90 it must alway be done at the very start of a block.

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

commit c5b3a7bbcc321846bb15ff73c6fd6f1c483b6aa6
Author: Ricardo M. Correia <Ricardo.M.Correia@Sun.COM>
Date:   Thu Aug 26 09:52:39 2010 -0700

    Fix gcc 64-bit constant warnings

    Add 'ull' suffix to 64-bit constants.

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

commit 572e285762521df27fe5b026f409ba1a21abb7ac
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 14:24:34 2010 -0700

    Update to onnv_147

    This is the last official OpenSolaris tag before the public
    development tree was closed.

commit 1980602bfae0605d3231e79627b3e25c07991b0e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Aug 26 13:45:31 2010 -0700

    Remove GIT notes

    These notes describe how to use TopGit with this repo.  As of
    this point TopGit is no longer used so the notes have been removed.

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

commit b3c82b1b18b5935fdc2f69d6e2c85331589eeac5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jun 29 14:35:21 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 428870ff734fdaccc342b33fc53cf94724409a46
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri May 28 13:45:14 2010 -0700

    Update core ZFS code from build 121 to build 141.

commit 6119cb885a976e175a6e827894accf657ff1984f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue May 18 14:55:01 2010 -0700

    Add AUTHORS to master branch

commit fa94cf43b915fbb13e039886a572682d48365ac8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue May 18 14:25:28 2010 -0700

    Update COPYRIGHT to reference zpios CDDL exceptions.

commit 94d52d93d9efbdad47a3923277a417c88a3c9de6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue May 18 11:06:56 2010 -0700

    Update COPYRIGHT to include release id LLNL-CODE-403049.

commit 91ac110c9ce29fcf81625cea81876b958564d384
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue May 18 10:32:23 2010 -0700

    Update COPYRIGHT and DISCLAIMER.

    Update the COPYRIGHT and DISCLAIMER in an attempt to be clear about
    the copyright and licensing issues.

commit 3affbe6d7e23f26ef9b4e70043b9fb93bfe9ea32
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Apr 29 11:59:41 2010 -0700

    Update nvpair's to include nv_alloc_fixed support

commit fa42225a3d5daa58704bdb920ec92cd95c274011
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Apr 29 10:37:15 2010 -0700

    Add Solaris FMA style support

commit 414f1f975e5c8ac0e9a399e992e46f517ab59828
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Mar 11 09:53:59 2010 -0800

    Rename update-zfs.sh -> zfs-update.sh for consistency

commit 774f7c02b181f6e18b91ebdd3092df57151da3e3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Mar 9 14:14:09 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 4cd8e49a69db0c3058c03f2541175985f07ff5c1
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Jan 8 11:35:17 2010 -0800

    Add .gitignore files to exclude build products

commit 058ac9ba7811baea78a47ba1ead8acd7512684b6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 11 16:15:33 2009 -0800

    Pull in latest man pages as part of update-zfs.sh

    The script has been updated to download the latest documentations
    packages for Solaris and extract the needed ZFS man pages.  These
    will still need a little markup to handle changes between the
    Solaris and Linux versions of ZFS.  Howver, they should be pretty
    minor I've tried hard to keep the interface the same.

    In additional to the script update the zdb, zfs, and zpool man
    pages have been added to the repo.

commit 0aa61e8427c63e835d9159d3b497591b0691dfe8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Sun Nov 15 16:20:01 2009 -0800

    Remove zvol.c when updating in update-zfs.sh Linux version available.

commit 5c36312909256a886495b56fb0cd75ebaa25615b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Oct 9 15:37:29 2009 -0700

    Script update-zfs.sh updated to include libefi library

commit 45d1cae3b8c949ecc391dd7a5b81963b34c71c29
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Aug 18 11:43:27 2009 -0700

    Rebase master to b121

commit 9babb37438b58e77bad04e820d5702e15b79e6a6
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jul 2 15:44:48 2009 -0700

    Rebase master to b117

commit d164b2093561a9771db07346e6fffc9ca19427a2
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Feb 18 12:51:31 2009 -0800

    Rebase master to b108

commit c65e71073f45e6e549c825969740cb15a96ea547
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 26 21:58:32 2009 -0800

    Refresh type in topgit git://* reference

commit 4710ede86aa9ea299e58e8f7293ee7c493a53ce0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Jan 20 15:43:44 2009 -0800

    Add GIT to master

commit fb5f0bc83330c8a0236c4d34a23723ac1974971a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Jan 15 13:59:39 2009 -0800

    Rebase master to b105

commit 42bcb36c8987b0b11411ce6cf8339694b624a17c
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 5 12:03:23 2009 -0800

    Add unicode library

commit 36b849fa517f04d9145aa6874e5398bb01cef4d7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Jan 5 11:10:13 2009 -0800

    Remove zdump, it's an unrelateds command which I added simply due to the z* command convention

commit 810db7e0a2186eaedf888ab12283f2d796d9c5e9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Dec 12 13:41:20 2008 -0800

    Remove zcommon reference merged in to zpool

commit 6b2c60acca39ef3468797095d3a4162e6ce69786
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 11 15:38:59 2008 -0800

    Moving lib/libspl to linux-libspl branch

commit a4076c7544bdbdc0ac0fe20f4ef86c2aa06862fb
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 11 14:21:14 2008 -0800

    Script updates

commit c4911ece249bad4329e1ed6a9de6fba51bd06f1f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 11 14:16:55 2008 -0800

    Move library files to lib

commit b453b61272db34cd097f8636f57033785b00d932
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 11 11:22:02 2008 -0800

    Fix libspl move to the wrong place

commit 4b7ee081ce0c36750d8039ec98c160a0a1ec471b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 11 11:16:38 2008 -0800

    Fix typo

commit 77755a5771c339a1d96c36ab1a8f1e41e14507f0
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 11 11:14:49 2008 -0800

    Add a few missing files

commit 172bb4bd5e4afef721dd4d2972d8680d983f144b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Dec 11 11:08:09 2008 -0800

    Move the world out of /zfs/ and seperate out module build tree

commit 9e8b1e836caa454586797f771a7ad1817ebae315
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 10 12:43:20 2008 -0800

    Remove libumem, we will try and remove this dependency entirely.  If we can't then the best move will simply be to use the official library, or build it as a convenience library

commit 5e97ed8493584c0d331592894de401edd89f5bab
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 9 14:14:00 2008 -0800

    Move vmem* to libumem

commit 48343be6a309efe3787ed8c539f10b376ece5ef8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 9 13:32:01 2008 -0800

    Temporarily move taskq+util to libzpool until that directory is broken in to lib+module

commit 2f40ac4d9e154f1d1ca4073ef8c3bfba92093c86
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Dec 8 16:38:46 2008 -0800

    Minor tweak to update script

commit 2b67f51fb663abe1a4a5cb969c73d0e10bcafe84
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Dec 8 16:20:25 2008 -0800

    Attempt move of kernel.c with topgit

commit 96072c88e22486c05a0bfc6c490d9e0c59fbd7e8
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 3 15:43:56 2008 -0800

    Add userspace zfs_context file

commit b128c09fbee863d15be744a2ce602b514eddbe3a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Dec 3 12:09:06 2008 -0800

    Rebase to OpenSolaris b103, in the process we are removing any code which did not originate from the OpenSolaris source.  These changes will be reintroduced in topic branches for easier tracking

commit b6097ae55adc8edb7149c4d433fa45a6ea3c45e7
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Tue Dec 2 08:47:21 2008 -0800

    Remove stray stub kernel files which should be brought in my linux-kernel-module patch

commit 7ebbc0c799748b8e13cdfcf7c96e11b3d331549b
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Dec 1 16:15:29 2008 -0800

    Finish removing all non-upstream bits from master

commit ef76e2f5ea42f9fab723ee79d17d69fe7caf1e13
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Dec 1 15:41:33 2008 -0800

    Removed build system from master branch, will relocate to linux-zfs-branch

commit 42baae9615b86e48e0c8c37eb83b409b8afa5e76
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Dec 1 15:38:41 2008 -0800

    Removed build system from master branch, will relocate to linux-zfs-branch

commit fe441a9050c2309b222976a70385e19fafa1d569
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Dec 1 15:34:53 2008 -0800

    Relocate COPYING+COPYRIGHT, remove README cruft

commit ef2e1711d2d515ce48fd0bf4e070ed60d610f4a9
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Dec 1 14:49:34 2008 -0800

    Add CDDL license file

commit 100eb88b46781b3777b59a81cc2e800ff386d9f3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 15:48:14 2008 -0800

    Update zpios for trivial workload

commit 62b749c8c846442f37f41c8ae5c612d75308c046
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 15:32:39 2008 -0800

    Working version of M4 macro config

commit f0e648ca02f55bb2c4bc328656769a0c529f683a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 14:29:45 2008 -0800

    Make everything a M4 macro, it's just cleaner that way

commit e833fd4a5c1fc22077c36782070837553f60b258
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 14:06:23 2008 -0800

    Additional buidl system cleanup.  Starting to move all
    of the kernel specific build info in to config/kernel,
    likewise and user specific build flags should go in
    config/user.  This seems like a reasonable way to go.

commit dbceaca71db4d7989acdef950ae23d4c92a55b67
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 13:28:44 2008 -0800

    Prefix META_ALIAS with ZFS_

commit cb9c044bf698cc063b986baa7f25cfcf4c76f54e
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 13:11:33 2008 -0800

    Add SPL prefix to META_* #defines

commit c9a913795679c3f5895de8258f31269530c5eaed
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Wed Nov 26 12:53:24 2008 -0800

    First step of META build system cleanup

commit 536640fe2908070f22d340ec23cfa9224df97aa3
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Nov 24 11:56:48 2008 -0800

    Minor autoconf build fixes:

    Fixed BUILDDIR in config/*
    Added missing " to ZFS_AC_SCRIPT_CONFIG macro
    Removed autoconf/Makefile

commit 22b47b55363f41ce526225e8e1d22aebc84442dc
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Nov 24 11:29:11 2008 -0800

    Use config directory, enable maintainer mode

commit a54f863a14edbbd2c5bd14774c8f1ead32ed7bf5
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Mon Nov 24 11:16:19 2008 -0800

    Restructure autoconf around ./config directory

commit 5b1a72b34269450274b6901b81eeb35f8cbf2f82
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Fri Nov 21 10:55:10 2008 -0800

    Update GIT docs, removing remaining patches.  They will soon me applies as topic branches

commit 9fc325737bd0fc5f5539763570cdde792859326a
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Nov 20 16:54:29 2008 -0800

    Update GIT documentation to describe the new DAC setup

commit 34dc7c2f2553220ebc6e29ca195fb6d57155f95f
Author: Brian Behlendorf <behlendorf1@llnl.gov>
Date:   Thu Nov 20 12:01:55 2008 -0800

    Initial Linux ZFS GIT Repo

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