Permalink
Commits on Sep 12, 2010
  1. 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.
    behlendorf committed Sep 11, 2010
Commits on Sep 11, 2010
  1. 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.
    behlendorf committed Sep 11, 2010
Commits on Sep 10, 2010
  1. Use top level object directory in zfs-module.spec

    Commit 6283f55 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.
    behlendorf committed Sep 10, 2010
  2. 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'.
    behlendorf committed Sep 10, 2010
  3. 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.
    behlendorf committed Sep 10, 2010
Commits on Sep 9, 2010
  1. 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
    behlendorf committed Sep 9, 2010
Commits on Sep 8, 2010
  1. 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.
    behlendorf committed Sep 4, 2010
Commits on Sep 3, 2010
  1. 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.
    behlendorf committed Sep 3, 2010
Commits on Sep 2, 2010
  1. 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.
    behlendorf committed Sep 2, 2010
Commits on Sep 1, 2010
  1. Prep for zfs-0.5.1 tag

    behlendorf committed Sep 1, 2010
  2. 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.
    behlendorf committed Sep 1, 2010
  3. 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>
    behlendorf committed Sep 1, 2010
  4. Remove scripts/common.sh

    This script is now dynamically generated at configure time
    from scripts/common.sh.in.  This change was made by commit
    26e61dd but we accidentally
    kept the common.sh file around.
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Sep 1, 2010
  5. 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>
    behlendorf committed Sep 1, 2010
Commits on Aug 31, 2010
  1. 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>
    behlendorf committed Aug 26, 2010
  2. 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>
    behlendorf committed Aug 26, 2010
  3. Add linux zpios support

    Linux kernel implementation of PIOS test app.
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Aug 26, 2010
  4. 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>
    behlendorf committed Aug 26, 2010
  5. 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>
    behlendorf committed Aug 26, 2010
  6. 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>
    behlendorf committed Aug 26, 2010
  7. 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>
    behlendorf committed Aug 26, 2010
  8. Add linux compatibility

    Resolve minor Linux compatibility issues.
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Aug 26, 2010
  9. Add linux spa thread support

    Disable the spa thread under Linux until it can be implemented.
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Aug 26, 2010
  10. 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>
    behlendorf committed Aug 26, 2010
  11. 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>
    behlendorf committed Aug 26, 2010
  12. 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>
    behlendorf committed Aug 26, 2010
  13. Add linux kernel memory support

    Required kmem/vmem changes
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Aug 26, 2010
  14. Add linux kernel disk support

    Native Linux vdev disk interfaces
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Aug 26, 2010
  15. 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>
    behlendorf committed Aug 26, 2010
  16. Add linux spl debug support

    Use spl debug if HAVE_SPL defined
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Aug 26, 2010
  17. Add linux mntent support

    Use mount entry if HAVE_SETMNTENT defined
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Aug 26, 2010
  18. 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>
    behlendorf committed Aug 26, 2010
  19. Add linux idmap support

    Use idmap service if available.
    
    Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
    behlendorf committed Aug 26, 2010
  20. 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>
    behlendorf committed Aug 26, 2010
  21. 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.
    behlendorf committed Aug 26, 2010