Commit Graph

18164 Commits

Author SHA1 Message Date
Brian Behlendorf 1eefcf593d New TopGit dependency: linux-debug-zerocopy 2010-05-14 13:29:41 -07:00
Brian Behlendorf bc92365d32 Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch 2010-05-14 12:55:12 -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 3e9b8dc559 Merge branch 'linux-kernel-device' into refs/top-bases/linux-zfs-branch 2010-05-14 12:55:10 -07:00
Brian Behlendorf 106e92b2df Merge commit 'refs/top-bases/linux-kernel-device' into linux-kernel-device 2010-05-14 12:55:08 -07:00
Brian Behlendorf d186e0ca0c Merge branch 'linux-have-idmap' into refs/top-bases/linux-zfs-branch 2010-05-14 12:55:01 -07:00
Brian Behlendorf d89c845543 Merge commit 'refs/top-bases/linux-have-idmap' into linux-have-idmap 2010-05-14 12:54:59 -07:00
Brian Behlendorf 143c34eecf Merge branch 'linux-ztest' into refs/top-bases/linux-zfs-branch 2010-05-14 12:54:52 -07:00
Brian Behlendorf 474981ffac Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-05-14 12:54:50 -07:00
Brian Behlendorf b144320bb9 Merge branch 'linux-unused' into refs/top-bases/linux-zfs-branch 2010-05-14 12:54:43 -07:00
Brian Behlendorf 89396b5fff Merge commit 'refs/top-bases/linux-unused' into linux-unused 2010-05-14 12:54:41 -07:00
Brian Behlendorf 2a39c44637 Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch 2010-05-14 12:54:34 -07:00
Brian Behlendorf 0ea6b5a042 Merge commit 'refs/top-bases/linux-libspl' into linux-libspl 2010-05-14 12:54:33 -07:00
Brian Behlendorf 3b47d76d8e Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch 2010-05-14 12:54:25 -07:00
Brian Behlendorf bbfb1eeb4c Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-05-14 12:54:23 -07:00
Brian Behlendorf cb7be901de Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2010-05-14 12:54:16 -07:00
Brian Behlendorf 9d8124099b Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-05-14 12:54:14 -07:00
Brian Behlendorf 2fdc73fada Merge branch 'linux-symbol-collisions' into refs/top-bases/linux-zfs-branch 2010-05-14 12:54:07 -07:00
Brian Behlendorf b79b434e68 Merge commit 'refs/top-bases/linux-symbol-collisions' into linux-symbol-collisions 2010-05-14 12:54:05 -07:00
Brian Behlendorf 41456b2bd7 Merge branch 'linux-legacy' into refs/top-bases/linux-zfs-branch 2010-05-14 12:53:58 -07:00
Brian Behlendorf 06f00866eb Merge commit 'refs/top-bases/linux-legacy' into linux-legacy 2010-05-14 12:53:56 -07:00
Brian Behlendorf a57ba8a2ec Merge branch 'linux-kernel-mem' into refs/top-bases/linux-zfs-branch 2010-05-14 12:53:49 -07:00
Brian Behlendorf 0ff45595f2 Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2010-05-14 12:53:47 -07:00
Brian Behlendorf 6ded08648c Merge branch 'linux-kernel-disk' into refs/top-bases/linux-zfs-branch 2010-05-14 12:53:40 -07:00
Brian Behlendorf 98add009b7 Merge commit 'refs/top-bases/linux-kernel-disk' into linux-kernel-disk 2010-05-14 12:53:38 -07:00
Brian Behlendorf 4afb1dc2f7 Merge branch 'linux-have-spl-debug' into refs/top-bases/linux-zfs-branch 2010-05-14 12:53:31 -07:00
Brian Behlendorf da073cac3d Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-05-14 12:53:29 -07:00
Brian Behlendorf d333ae7ec9 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-05-14 12:53:21 -07:00
Brian Behlendorf c550f0172b Merge commit 'refs/top-bases/linux-have-mntent' into linux-have-mntent 2010-05-14 12:53:20 -07:00
Brian Behlendorf 7d30d5032a Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2010-05-14 12:53:12 -07:00
Brian Behlendorf a7b3190198 Merge commit 'refs/top-bases/linux-docs' into linux-docs 2010-05-14 12:53:10 -07:00
Brian Behlendorf e42734b565 New TopGit dependency: linux-events 2010-05-14 12:51:37 -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 aded580f0b Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch 2010-05-14 11:55:56 -07:00
Brian Behlendorf 93b00c558f Merge branch 'linux-kernel-device' into refs/top-bases/linux-zfs-branch
Conflicts:
	module/zfs/zfs_ioctl.c
2010-05-14 11:51:27 -07:00
Brian Behlendorf 51ad7dc87d New TopGit dependency: linux-kernel-device 2010-05-14 11:49:12 -07:00
Brian Behlendorf 0c443b1d13 Create linux-kernel-device topic branch.
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.  Additionally, this means slightly
expanding the zfs_ioc_* functions to include a 'struct file *' to
allow the tracking of private data for each open file descriptor.
This is very helpful when you need to maintain a little information
about the open file between ioctls().
2010-05-14 11:48:06 -07:00
Brian Behlendorf 7c3f11da5c Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch 2010-05-14 11:39:32 -07:00
Brian Behlendorf 3ae75228e3 Merge branch 'linux-kernel-disk' into refs/top-bases/linux-zfs-branch
Conflicts:
	module/zfs/zfs_ioctl.c
2010-05-14 11:38:09 -07:00
Brian Behlendorf d18f100fb7 Revert zfs_ioctl.c related changes.
All the changes required to cleanly integrate with linux style
devices are being moved to their own topic branch.  It was abouti
to get to the point where too many topic branches each wanted to
tweak this code and it was getting confusing.  To simplify this
all /dev/zfs device related changes are being moved to the
linux-kernel-device topic branch.
2010-05-14 11:24:36 -07:00
Brian Behlendorf 147f283be1 Merge commit 'refs/top-bases/linux-zfs-branch' into linux-zfs-branch 2010-05-14 11:01:47 -07:00
Brian Behlendorf 1b3382ba9a Merge branch 'linux-have-idmap' into refs/top-bases/linux-zfs-branch 2010-05-14 11:01:46 -07:00
Brian Behlendorf c3ba25165e Merge commit 'refs/top-bases/linux-have-idmap' into linux-have-idmap 2010-05-14 11:01:44 -07:00
Brian Behlendorf 02b11f75d9 Merge branch 'linux-ztest' into refs/top-bases/linux-zfs-branch 2010-05-14 11:01:37 -07:00
Brian Behlendorf 8645ca847e Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-05-14 11:01:35 -07:00
Brian Behlendorf 6ee292f284 Merge branch 'linux-unused' into refs/top-bases/linux-zfs-branch 2010-05-14 11:01:28 -07:00
Brian Behlendorf 6079f61615 Merge commit 'refs/top-bases/linux-unused' into linux-unused 2010-05-14 11:01:26 -07:00
Brian Behlendorf 406432e9aa Merge branch 'linux-libspl' into refs/top-bases/linux-zfs-branch 2010-05-14 11:01:19 -07:00
Brian Behlendorf 821a652a56 Merge commit 'refs/top-bases/linux-libspl' into linux-libspl 2010-05-14 11:01:17 -07:00