Commit Graph

3246 Commits

Author SHA1 Message Date
Brian Behlendorf 91ac110c9c Update COPYRIGHT and DISCLAIMER.
Update the COPYRIGHT and DISCLAIMER in an attempt to be clear about
the copyright and licensing issues.
2010-05-18 10:32:23 -07:00
Brian Behlendorf d404dd1dad Minor spec file cleanup for srpm case.
Ensure kpkg is defined is srpm case before using it to define
the krequires macro.  Interestingly this is not an issue for
rpm-4.7.1-4 but it is for rpm-4.4.2.3-18.
2010-05-18 10:08:29 -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 98d5d8bd50 Add missing include path for FMA aware zpool command. 2010-05-14 11:57:48 -07:00
Brian Behlendorf 20ee89f0f2 Add nvpair_alloc_fixed.c in to libnvpair build. 2010-05-14 10:55:02 -07:00
Brian Behlendorf 98660aec20 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-04-29 12:32:01 -07:00
Brian Behlendorf 82782d7874 Merge commit 'refs/top-bases/gcc-branch' into gcc-branch 2010-04-29 12:32:00 -07:00
Brian Behlendorf aa4a91aef5 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-04-29 12:32:00 -07:00
Brian Behlendorf 354bebb795 Merge branch 'gcc-ident-pragmas' into refs/top-bases/gcc-branch 2010-04-29 12:31:59 -07:00
Brian Behlendorf 89154c98f9 Update build system to include nvpair_alloc_fixed.c. 2010-04-29 12:24:25 -07:00
Brian Behlendorf f26fce7b17 Strip ident pragma from module/nvpair/nvpair_alloc_fixed.c 2010-04-29 12:23:12 -07:00
Brian Behlendorf 66ba722b0a Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-04-29 12:04:36 -07:00
Brian Behlendorf 49dff0437f Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2010-04-29 12:04:35 -07:00
Brian Behlendorf 620a5ae89b Merge commit 'refs/top-bases/feature-branch' into feature-branch 2010-04-29 12:04:33 -07:00
Brian Behlendorf f3017eccb7 Merge commit 'refs/top-bases/feature-pthreads' into feature-pthreads 2010-04-29 12:04:33 -07:00
Brian Behlendorf b9610ade84 Merge branch 'feature-pthreads' into refs/top-bases/feature-branch 2010-04-29 12:04:33 -07:00
Brian Behlendorf 7a062682fb Merge commit 'refs/top-bases/feature-commit-cb' into feature-commit-cb 2010-04-29 12:04:32 -07:00
Brian Behlendorf 9c10b70375 Merge branch 'feature-zap-cursor-to-key' into refs/top-bases/feature-branch 2010-04-29 12:04:31 -07:00
Brian Behlendorf 9d8e4f07ff Merge commit 'refs/top-bases/feature-zap-cursor-to-key' into feature-zap-cursor-to-key 2010-04-29 12:04:30 -07:00
Brian Behlendorf dcf9769135 Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-04-29 12:04:28 -07:00
Brian Behlendorf d4ee043aaf Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-04-29 12:04:27 -07:00
Brian Behlendorf 3b31b7c0e8 Merge commit 'refs/top-bases/fix-error-handling' into fix-error-handling 2010-04-29 12:04:26 -07:00
Brian Behlendorf ec11b6cecb Merge branch 'fix-error-handling' into refs/top-bases/fix-branch 2010-04-29 12:04:26 -07:00
Brian Behlendorf 0d327d93b6 Merge branch 'fix-acl' into refs/top-bases/fix-branch 2010-04-29 12:04:25 -07:00
Brian Behlendorf 1264752aa8 Merge commit 'refs/top-bases/fix-acl' into fix-acl 2010-04-29 12:04:24 -07:00
Brian Behlendorf 2fbc59f539 Merge commit 'refs/top-bases/fix-deadcode' into fix-deadcode 2010-04-29 12:04:23 -07:00
Brian Behlendorf c0b678ce5e Merge branch 'fix-deadcode' into refs/top-bases/fix-branch 2010-04-29 12:04:23 -07:00
Brian Behlendorf 937c0f121a Merge branch 'fix-strncat' into refs/top-bases/fix-branch 2010-04-29 12:04:22 -07:00
Brian Behlendorf c880752748 Merge commit 'refs/top-bases/fix-strncat' into fix-strncat 2010-04-29 12:04:21 -07:00
Brian Behlendorf 4d4cda51e2 Merge commit 'refs/top-bases/fix-list' into fix-list 2010-04-29 12:04:20 -07:00
Brian Behlendorf 0ff8a25a8a Merge branch 'fix-list' into refs/top-bases/fix-branch 2010-04-29 12:04:20 -07:00
Brian Behlendorf cf4e5324e9 Merge commit 'refs/top-bases/fix-taskq' into fix-taskq 2010-04-29 12:04:18 -07:00
Brian Behlendorf eb6835bf73 Merge branch 'fix-taskq' into refs/top-bases/fix-branch 2010-04-29 12:04:18 -07:00
Brian Behlendorf 695903c308 Merge commit 'refs/top-bases/fix-stack' into fix-stack 2010-04-29 12:04:17 -07:00
Brian Behlendorf 036db491b4 Merge branch 'fix-stack' into refs/top-bases/fix-branch 2010-04-29 12:04:17 -07:00
Brian Behlendorf 1a18829f86 Merge commit 'refs/top-bases/fix-rwlocks' into fix-rwlocks 2010-04-29 12:04:15 -07:00
Brian Behlendorf 539276c157 Merge branch 'fix-rwlocks' into refs/top-bases/fix-branch 2010-04-29 12:04:15 -07:00
Brian Behlendorf 5b30cb5202 Merge branch 'fix-no-zmod' into refs/top-bases/fix-branch 2010-04-29 12:04:14 -07:00
Brian Behlendorf 8efa2c0cc8 Merge commit 'refs/top-bases/fix-no-zmod' into fix-no-zmod 2010-04-29 12:04:13 -07:00
Brian Behlendorf f75b8d294a Merge branch 'fix-newlines' into refs/top-bases/fix-branch 2010-04-29 12:04:12 -07:00
Brian Behlendorf fa08457e03 Merge commit 'refs/top-bases/fix-newlines' into fix-newlines 2010-04-29 12:04:11 -07:00
Brian Behlendorf c28e1220a2 Merge commit 'refs/top-bases/fix-get-configs' into fix-get-configs 2010-04-29 12:04:10 -07:00
Brian Behlendorf b1e72bd6a5 Merge branch 'fix-get-configs' into refs/top-bases/fix-branch 2010-04-29 12:04:10 -07:00
Brian Behlendorf 17839ab2dd Merge branch 'fix-evict-dbufs' into refs/top-bases/fix-branch 2010-04-29 12:04:09 -07:00
Brian Behlendorf a749db3e7c Merge commit 'refs/top-bases/fix-evict-dbufs' into fix-evict-dbufs 2010-04-29 12:04:08 -07:00
Brian Behlendorf 05b4f88b78 Merge commit 'refs/top-bases/fix-dsl_pool_t' into fix-dsl_pool_t 2010-04-29 12:04:07 -07:00
Brian Behlendorf 5f53726a08 Merge branch 'fix-dsl_pool_t' into refs/top-bases/fix-branch 2010-04-29 12:04:07 -07:00
Brian Behlendorf 1ef5fcd9e7 Merge branch 'fix-dnode-cons' into refs/top-bases/fix-branch 2010-04-29 12:04:06 -07:00
Brian Behlendorf 16b4aa089e Merge commit 'refs/top-bases/fix-dnode-cons' into fix-dnode-cons 2010-04-29 12:04:05 -07:00
Brian Behlendorf e5edc5104d Merge commit 'refs/top-bases/fix-dbuf_dirty_record_t' into fix-dbuf_dirty_record_t 2010-04-29 12:04:04 -07:00