Commit Graph

759 Commits

Author SHA1 Message Date
Brian Behlendorf a08f4edee7 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-05-27 16:21:20 -07:00
Brian Behlendorf ea431b4dc6 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-05-27 16:14:04 -07:00
Brian Behlendorf 319f69734b Merge branch 'feature-branch' into refs/top-bases/zfs-branch
Conflicts:
	cmd/ztest/ztest.c
2010-05-27 16:13:19 -07:00
Brian Behlendorf 390995db28 Revert all remaining changes. 2010-05-27 14:25:06 -07:00
Brian Behlendorf 5cad1e175d Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch
Conflicts:
	module/zfs/dmu_tx.c
	module/zfs/txg.c
2010-05-27 13:48:54 -07:00
Brian Behlendorf d8e5eb56b8 Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2010-05-27 13:42:00 -07:00
Brian Behlendorf 028e42b692 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-05-27 13:42:00 -07:00
Brian Behlendorf cde6e6fec8 Merge commit 'refs/top-bases/feature-branch' into feature-branch 2010-05-27 13:40:15 -07:00
Brian Behlendorf 1e32b3c781 Revert feature-commit-cb feature upstream
We can drop this feature and we will pick up the lastest version
during the b141 update.
2010-05-27 13:39:17 -07:00
Brian Behlendorf 95885a2f68 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch
Conflicts:
	lib/libzpool/include/sys/zfs_context.h
	lib/libzpool/kernel.c
2010-05-27 13:35:09 -07:00
Brian Behlendorf c17d3e05eb Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2010-05-27 13:32:58 -07:00
Brian Behlendorf 51536ea5f4 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-05-27 13:32:58 -07:00
Brian Behlendorf a082023842 Merge commit 'refs/top-bases/feature-branch' into feature-branch
Conflicts:
	cmd/ztest/ztest.c
	lib/libzpool/include/sys/zfs_context.h
	lib/libzpool/kernel.c
	lib/libzpool/taskq.c
2010-05-27 13:30:48 -07:00
Brian Behlendorf 099e8e493a Remove feature-pthreads prior to b141 update.
The pthreads change will need to be reworked and reapplied.
This will be easier to do from scratch rather than sort out
the merge.
2010-05-27 13:23:58 -07:00
Brian Behlendorf 542052314e Merge branch 'linux-events' into refs/top-bases/linux-zfs-branch 2010-05-21 15:35:53 -07:00
Brian Behlendorf 1573fc9932 Cast to (const time_t *) to fix compiler type warning. 2010-05-21 15:06:25 -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 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 630ce17804 Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch 2010-05-18 14:23:08 -07:00
Brian Behlendorf 86f961b310 Update all zpios related headers for consistency and correctness. 2010-05-18 14:18:09 -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 feb723fa7d Merge branch 'linux-events' into refs/top-bases/linux-zfs-branch 2010-05-14 12:55:10 -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 7d30d5032a Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2010-05-14 12:53:12 -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 66b756d253 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2010-04-23 11:09:00 -07:00
Brian Behlendorf aafdbe5d6e Check all partitions with check_file() even when no libblkid is found
When creating a new pool on a block device we need to check all the
partitions even if we don't have liblkdid support.  In this case
we can't consult the blkid cache but we still can call check_file()
and attempt to read a valid label from each partition.

Additionally, the O_EXCL flag was removed because the device will
be opened multiple times and this was causing the check the file.
The device is only opened read-only anyway so this is still safe.

$ sudo zpool create tank /dev/sdz
invalid vdev specification
use '-f' to override the following errors:
/dev/sdz1 is part of potentially active pool 'tank'
2010-04-23 10:59:31 -07:00
Brian Behlendorf 3ea63f0cdb Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-09 12:31:25 -08:00
Brian Behlendorf 4b2b113239 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-03-09 12:31:18 -08:00
Brian Behlendorf 17a96f44f3 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2010-03-09 12:30:43 -08:00
Brian Behlendorf 573328741b Merge branch 'linux-have-fm' into refs/top-bases/linux-zfs-branch 2010-03-09 12:30:21 -08:00
Brian Behlendorf 8f63d438cd Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-03-09 12:30:18 -08:00
Brian Behlendorf 48e74ed68b Merge branch 'feature-branch' into refs/top-bases/zfs-branch
Conflicts:

	cmd/ztest/ztest.c
2010-03-09 12:30:03 -08:00
Brian Behlendorf 9a3d5378c6 Clean up emulation of kernel threads in userspace.
Updated to use pthread thread specific data rather than keeping
a global list.  This also fixes at least one easily reproducible
crash in ztest
2010-03-09 12:25:28 -08:00
Brian Behlendorf 06d354b4f3 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios
Conflicts:

	cmd/Makefile.am
2010-03-02 10:06:26 -08:00
Brian Behlendorf 44d8092c2c Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-03-02 10:05:09 -08:00
Brian Behlendorf 5455070ca1 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2010-03-02 10:04:12 -08:00
Brian Behlendorf e6d92ae57d Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch
Conflicts:

	cmd/Makefile.am
2010-03-02 10:01:51 -08:00
Brian Behlendorf 7df02c0f57 Split the udev rule from a specific configuration
While I completely agree the udev is the lesser of many possibles
evils when solving the device issue... it is still evil.  After
attempting to craft a single rule which will work for various
versions of udev in various distros.  I've come to the conclusion
the only maintainable way to solve this issue is to split the rule
from any particular configuration.

This commit provides a generic 60-zpool.rules file which use a
small helper util 'zpool_id' to parse a configuration file by
default located in /etc/zfs/zdev.conf.  The helper script maps
a by-path udev name to a more friendly name of <channel><rank>
for large configurations.

As part of this change all of the support scripts why rely on
this udev naming convention have been updated as needed.  Example
zdev.conf files have also been added for 3 different systems by
you will always need to add one for your exact hardware.

Finally, included in these changes are the proper tweaks to the
build system to ensure everything still get's packaged properly
in the rpms and can run in or out of tree.
2010-03-01 16:51:21 -08:00
Brian Behlendorf 2ebee09b55 Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch 2010-01-08 11:40:19 -08:00
Brian Behlendorf efc3e7a375 Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-01-08 11:40:18 -08:00
Brian Behlendorf 60c9121dd2 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-01-08 11:40:14 -08:00
Brian Behlendorf 39d8b611e3 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2010-01-08 11:39:52 -08:00
Brian Behlendorf 889f0e5e30 Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2010-01-08 11:39:32 -08:00
Brian Behlendorf 303d9f010d Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-01-08 11:39:31 -08:00
Brian Behlendorf 710e779a08 Merge commit 'refs/top-bases/feature-pthreads' into feature-pthreads 2010-01-08 11:39:30 -08:00
Brian Behlendorf a240c39095 Merge commit 'refs/top-bases/feature-commit-cb' into feature-commit-cb 2010-01-08 11:39:29 -08:00