Commit Graph

1758 Commits

Author SHA1 Message Date
Brian Behlendorf 3193647679 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-21 10:51:52 -07:00
Brian Behlendorf 14152c7b2c Merge branch 'linux-user-util' into refs/top-bases/linux-zfs-branch 2010-05-21 10:49:47 -07:00
Brian Behlendorf 868e5de066 Add linux-user-util topic branch.
This topic branch contains required changes to the user space
utilities to allow them to integrate cleanly with Linux.
2010-05-21 10:47:59 -07:00
Brian Behlendorf 13ed2ef931 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-21 10:44:31 -07:00
Brian Behlendorf 3b79eba6d7 Merge branch 'linux-debug-zerocopy' into refs/top-bases/linux-zfs-branch 2010-05-21 10:44:28 -07:00
Brian Behlendorf a876892309 Revert user space changes from linux-kernel-module topic branch.
These changes do not belong on linux-kernel-module since they
are tweaks to user space utilities.  I'm reverting them from
this topic branch and will be moving them to a new topic branch
which can be used for just this sort of thing.
2010-05-21 10:40:09 -07:00
Brian Behlendorf e0309d9f3c Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-20 14:51:16 -07:00
Brian Behlendorf c8d574777d Merge branch 'linux-kernel-mem' into refs/top-bases/linux-zfs-branch 2010-05-20 14:51:13 -07:00
Brian Behlendorf fe3cca82ae Support KM_NODEBUG kmem flag.
It turns out the zil allocates quite large buffers.  This isn't
all the surprising but we need to suppress the warnings until
it's clear what to do about it.
2010-05-20 14:35:02 -07:00
Brian Behlendorf 89375ef80b Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-20 10:29:55 -07:00
Brian Behlendorf 19035d1734 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2010-05-20 10:26:10 -07:00
Brian Behlendorf b50494ba2d Add missing header observed after linux-legacy was reverted.
Interestingly this has only been a problem on a clean RHEL6
install so I suspect the include was removed from one of the
standard system include headers.  We should be including it
explicitly anyway since it's used in both of these .c files.
2010-05-20 10:04:10 -07:00
Brian Behlendorf 233c86a30a Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-18 16:24:57 -07:00
Brian Behlendorf d0fb672d5b Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2010-05-18 16:23:33 -07:00
Brian Behlendorf e19dec32a7 Minor fix from linux-legacy branch.
Fold in a minor fix from the removed linux-legacy branch to skip checking
character devices in /dev/ during import.  Under Linux pread() may simply
block when reading from these devices causing the import to hang.
2010-05-18 16:13:10 -07:00
Brian Behlendorf a0d5b22e98 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-18 13:42:36 -07:00
Brian Behlendorf ae9ef8987f Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch 2010-05-18 13:42:34 -07:00
Brian Behlendorf c98946e318 Add missing CDDL headers. 2010-05-18 13:38:06 -07:00
Brian Behlendorf b1be987202 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-18 12:53:06 -07:00
Brian Behlendorf c5004e8fb1 Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch 2010-05-18 12:53:04 -07:00
Brian Behlendorf 2a80af91ed Remove nvpair_alloc_system.c change in libspl topic branch.
A change to the nvpair implementation should not have been made in
the libspl-topic branch.  This patch fixes that accident by reverting
the change and providing the missing libspl header to allow the
proper building of nvpair_alloc_system.c without the need to modify it.
2010-05-18 12:47:08 -07:00
Brian Behlendorf caef19af88 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-18 12:17:20 -07:00
Brian Behlendorf 9c65da32f1 Merge branch 'linux-legacy' into refs/top-bases/linux-zfs-branch 2010-05-18 12:17:18 -07:00
Brian Behlendorf a056f3de6d Revert linux-legacy topic branch.
These changes were made when some development was still occuring
under RHEL4.  Since then the needed fopendir() and atopen() APIs
have become commonly available under Linux.  Since I have no
intention of supporting systems as old as RHEL4 we can safely
drop the topic branch.
2010-05-18 12:10:13 -07:00
Brian Behlendorf 6e06d537fe Refresh autogen products 2010-05-14 13:36:31 -07:00
Brian Behlendorf d6f1f21cae Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2010-05-14 13:31:27 -07:00
Brian Behlendorf 66c45ef1f4 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-14 12:59:08 -07:00
Brian Behlendorf feb723fa7d Merge branch 'linux-events' into refs/top-bases/linux-zfs-branch 2010-05-14 12:55:10 -07:00
Brian Behlendorf 97d19a5e45 Add linux-events topic branch for zevent handling.
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
2010-05-14 12:40:44 -07:00
Brian Behlendorf 500e506883 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-14 11:01:48 -07:00
Brian Behlendorf 821a652a56 Merge commit 'refs/top-bases/linux-libspl' into linux-libspl 2010-05-14 11:01:17 -07:00
Brian Behlendorf 0f536cc091 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-05-14 11:00:59 -07:00
Brian Behlendorf 7088870ae6 Merge commit 'refs/top-bases/linux-legacy' into linux-legacy 2010-05-14 11:00:41 -07:00
Brian Behlendorf e64cab1869 Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2010-05-14 11:00:32 -07:00
Brian Behlendorf 6ae8aa39ab Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2010-05-14 10:59:57 -07:00
Brian Behlendorf 20ee89f0f2 Add nvpair_alloc_fixed.c in to libnvpair build. 2010-05-14 10:55:02 -07:00
Brian Behlendorf e55a65895a Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-14 10:44:14 -07:00
Brian Behlendorf 3809bc6ac5 Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch 2010-05-14 10:44:12 -07:00
Brian Behlendorf 9b8aa5f57e Extend libspl as required for linux FMA integration.
These changes lay some of the ground work for supporting something
similar to FMA event under Solaris.  In particular these changes
add or modify the following areas.

First off an implementation of the gethrestime() function is added
to libspl.  Secondly, the missing type processorid_t has been added.
And finally the lib/libspl/include/sys/fm/{protocol.h|util.h} stub
headers have been removed in favor of updating the full versions
in module/zfs/include/sys/fm/{protocol.h|util.h} to work cleanly
in both user and kernel space.
2010-05-14 10:33:00 -07:00
Brian Behlendorf 02ddf26563 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-04-29 13:15:33 -07:00
Brian Behlendorf 8e870b63d0 Merge branch 'linux-have-sysevent' into refs/top-bases/linux-zfs-branch 2010-04-29 13:15:30 -07:00
Brian Behlendorf d6f1146154 Remove changes from linux-have-sysevent to prepare for topic branch removal. 2010-04-29 13:12:25 -07:00
Brian Behlendorf 824c6c437b Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-04-29 12:34:06 -07:00
Brian Behlendorf 35afc56620 Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch 2010-04-29 12:33:39 -07:00
Brian Behlendorf c14cca5c07 Add fm_init/fm_fini stubs for user space FMA update. 2010-04-29 12:25:18 -07:00
Brian Behlendorf 486ef8b62c Refresh autogen products 2010-04-29 11:03:52 -07:00
Brian Behlendorf beb7a03515 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-04-29 11:02:45 -07:00
Brian Behlendorf 0ff721ce5d Merge commit 'refs/top-bases/linux-libspl' into linux-libspl 2010-04-29 11:02:17 -07:00
Brian Behlendorf 02daa2aa9f Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-04-29 11:02:02 -07:00
Brian Behlendorf 0461f831ed Merge commit 'refs/top-bases/linux-legacy' into linux-legacy 2010-04-29 11:01:47 -07:00