Commit Graph

498 Commits

Author SHA1 Message Date
Brian Behlendorf 002809a885 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-05-28 12:42:31 -07:00
Brian Behlendorf 06da6ccf97 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-05-28 12:42:30 -07:00
Brian Behlendorf 818eafca5b Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-05-28 12:42:30 -07:00
Brian Behlendorf c91169c7c5 Merge branch 'gcc-shadow' into refs/top-bases/gcc-branch
Conflicts:
	lib/libzfs/libzfs_util.c
2010-05-28 12:42:27 -07:00
Brian Behlendorf fb72c6ef81 Revert gcc-shadow using -Wno-shadow I can live with
While I would rather fix all the instances where something is shadowed
it complicates tracking the OpenSolaris code where they either don't
seem to care or have different conflicts.  Anyway, this ends up being
more simply gratutous change than I care for.
2010-05-28 12:34:45 -07:00
Brian Behlendorf 37ecc84897 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-27 16:24:01 -07:00
Brian Behlendorf bc51c21ff9 Merge commit 'refs/top-bases/linux-unused' into linux-unused 2010-05-27 16:22:44 -07:00
Brian Behlendorf 88f2b26c8f Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2010-05-27 16:21:51 -07:00
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 4b3317d13f Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-27 13:37:44 -07:00
Brian Behlendorf 87875a5eb3 Merge commit 'refs/top-bases/linux-unused' into linux-unused
Conflicts:
	lib/libzpool/include/sys/zfs_context.h
2010-05-27 13:37:20 -07:00
Brian Behlendorf 9d688fef79 Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2010-05-27 13:35:51 -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 343bcf823f Refresh autogen products with automake 1.11.1 2010-05-21 16:04:53 -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 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 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 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 c63aca4333 Merge commit 'refs/top-bases/linux-unused' into linux-unused 2010-04-29 11:02:25 -07:00
Brian Behlendorf bf68847fd6 Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2010-04-29 11:01:39 -07:00
Brian Behlendorf 208e42ffe6 Merge commit 'refs/top-bases/linux-have-sysevent' into linux-have-sysevent 2010-04-29 11:01:23 -07:00
Brian Behlendorf 76d877a211 Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2010-04-29 11:00:49 -07:00
Brian Behlendorf 4d5d0f9ef5 Include FMA source and headers in build system 2010-04-29 10:55:27 -07:00
Brian Behlendorf 34edbcd956 Refresh autogen products 2010-03-26 15:57:19 -07:00
Brian Behlendorf ddb2e7a5c5 Refresh autogen products 2010-03-22 17:01:13 -07:00
Brian Behlendorf 03f51d86b2 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-03-10 12:09:35 -08:00
Brian Behlendorf c7c19c1259 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2010-03-10 12:09:32 -08:00
Ricardo M. Correia 2c79a2fa6a Fix a few zdb bugs when trying to open a pool
Specifically, the following bugs are fixed in this patch:

1) zdb wasn't getting the correct device size when the vdev is a
block device.  In Solaris, fstat64() returns the device size but
in Linux an ioctl() is needed.

2) We were opening block devices with O_DIRECT, which caused pread64()
to fail with EINVAL due to memory alignment issues.  This was fixed by
the previous umem cache alignment fix in stub implementation to align
objects correctly.  But we still needed to add a check for the error here.

3) We also make sure that we don't try to open a block device in write
mode in userspace.  This shouldn't happen, because zdb opens devices
in read-only mode, and ztest only uses files.
2010-03-10 12:03:48 -08:00
Brian Behlendorf 6663e28c0b Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-03-10 09:59:54 -08:00
Brian Behlendorf b47f6b7691 Merge commit 'refs/top-bases/linux-unused' into linux-unused 2010-03-10 09:59:35 -08:00
Brian Behlendorf 1186ea3781 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-03-10 09:59:14 -08:00
Brian Behlendorf eb99e5706b Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2010-03-10 09:58:52 -08:00
Brian Behlendorf 724a450233 Merge commit 'refs/top-bases/linux-have-sysevent' into linux-have-sysevent 2010-03-10 09:58:38 -08:00
Brian Behlendorf a97cedc2df Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2010-03-10 09:58:07 -08:00
Brian Behlendorf 7223b8df33 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-03-10 09:58:04 -08:00
Brian Behlendorf 54cf7ab2bc Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-03-10 09:58:03 -08:00
Brian Behlendorf 166355dcf0 Merge branch 'fix-error-handling' into refs/top-bases/fix-branch 2010-03-10 09:54:43 -08:00
Ricardo M. Correia 62a0ac8f22 Fix some incorrect error handling.
In vn_open(), if fstat64() returned an error, the real errno
was being obscured by calling close().

Add error handling for both pwrite64() calls in vn_rdwr().
2010-03-10 09:53:53 -08:00
Brian Behlendorf c3240ea0d8 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-03-09 12:31:56 -08:00
Brian Behlendorf ceba75045d Merge commit 'refs/top-bases/linux-unused' into linux-unused 2010-03-09 12:31:39 -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 eda82c813d Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2010-03-09 12:30:57 -08:00
Brian Behlendorf feac56bf5a Merge commit 'refs/top-bases/linux-have-sysevent' into linux-have-sysevent 2010-03-09 12:30:44 -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 02d15b4e4f Refresh autogen products 2010-03-08 10:57:16 -08:00
Brian Behlendorf 9b473082fa Refresh autogen products 2009-12-23 14:53:51 -08:00
Brian Behlendorf 840aa5356d Refresh autogen products 2009-11-20 12:14:59 -08:00
Brian Behlendorf 81c56431ae Refresh autogen products 2009-11-16 10:42:39 -08:00
Brian Behlendorf 75b67634af Refresh autogen products. 2009-11-12 12:57:46 -08:00
Brian Behlendorf f11e5e26e2 Refresh autogen products 2009-10-23 12:34:20 -07:00
Brian Behlendorf 69c211131d Refresh autogen products 2009-10-15 16:46:45 -07:00
Brian Behlendorf d1e18d0e3b Refresh autogen products 2009-10-14 16:00:33 -07:00
Brian Behlendorf 00c6a706a5 Refresh autogen products 2009-10-09 16:46:19 -07:00
Brian Behlendorf 1f8a43f7a2 Refresh autogen products 2009-08-17 21:58:33 -07:00
Brian Behlendorf 5ad5798f92 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2009-08-04 15:59:15 -07:00
Brian Behlendorf 628a3cb70d Merge commit 'refs/top-bases/linux-unused' into linux-unused 2009-08-04 15:58:25 -07:00
Brian Behlendorf 4eae170dc5 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2009-08-04 15:57:44 -07:00
Brian Behlendorf 4b1d370e4f Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2009-08-04 15:57:03 -07:00
Brian Behlendorf a7a6539d95 Merge commit 'refs/top-bases/linux-have-sysevent' into linux-have-sysevent 2009-08-04 15:55:57 -07:00
Brian Behlendorf 72fc3eca7e Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2009-08-04 15:54:25 -07:00
Brian Behlendorf f88cbd6535 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-08-04 15:54:21 -07:00
Brian Behlendorf 8c28ed9bff Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2009-08-04 15:54:19 -07:00
Brian Behlendorf 7069d048a0 Revert kthreads based on pthread thread specific data due to failure.
With this patch applied I get the following failure 100% of the time,
I'd prefer to debug it and keep moving forward but I do not have the
time right now so I'm reverting the patch to the version which worked.
Ricardo please fix.

(gdb) bt
0  ztest_dmu_write_parallel (za=0x2aaaac898960) at
../../cmd/ztest/ztest.c:2566
1  0x0000000000405a79 in ztest_thread (arg=<value optimized out>)
    at ../../cmd/ztest/ztest.c:3862
2  0x00002b2e6a7a841d in zk_thread_helper (arg=<value optimized out>)
    at ../../lib/libzpool/kernel.c:131
3  0x000000379be06367 in start_thread (arg=<value optimized out>)
    at pthread_create.c:297
4  0x000000379b2d30ad in clone () from /lib64/libc.so.6
2009-08-04 15:42:24 -07:00
Brian Behlendorf 3d8212e5de Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2009-08-04 14:44:03 -07:00
Brian Behlendorf 2f81fca007 Merge commit 'refs/top-bases/linux-unused' into linux-unused 2009-08-04 14:43:14 -07:00
Brian Behlendorf 94fd6b5326 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2009-08-04 14:42:33 -07:00
Brian Behlendorf b324dc7fd5 Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2009-08-04 14:41:52 -07:00
Brian Behlendorf 37f263f244 Merge commit 'refs/top-bases/linux-have-sysevent' into linux-have-sysevent 2009-08-04 14:40:50 -07:00
Brian Behlendorf 139ca4655e Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2009-08-04 14:39:11 -07:00
Brian Behlendorf 3e5388907b Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-08-04 14:39:07 -07:00
Brian Behlendorf 9aedfd95f6 Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2009-08-04 14:39:06 -07:00
Ricardo M. Correia c0ce3b40f2 Reimplement user kthreads based on pthread thread specific data.
This resolves previous scalabily concerns about the cost of calling
curthread which previously required a list walk.  The kthread address
is now tracked as thread specific data which can be quickly returned.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2009-08-04 13:55:15 -07:00
Brian Behlendorf 535dab57d2 Refresh autogen products. 2009-07-29 17:54:49 -07:00
Brian Behlendorf 40cad03c51 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2009-07-24 11:18:03 -07:00
Brian Behlendorf cab31f3317 Merge commit 'refs/top-bases/linux-unused' into linux-unused 2009-07-24 11:17:19 -07:00
Brian Behlendorf 278a36455f Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2009-07-24 11:15:55 -07:00
Brian Behlendorf 5d9870a0e9 Merge commit 'refs/top-bases/linux-kernel-mem' into linux-kernel-mem 2009-07-24 11:15:19 -07:00
Brian Behlendorf 03eba682e0 Merge commit 'refs/top-bases/linux-have-sysevent' into linux-have-sysevent 2009-07-24 11:14:24 -07:00
Brian Behlendorf 430d6004e5 Merge branch 'linux-arc' into refs/top-bases/linux-zfs-branch
Conflicts:

	scripts/Makefile.am
2009-07-24 11:10:21 -07:00
Brian Behlendorf db3967ba86 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-07-24 11:08:43 -07:00
Brian Behlendorf 9a2275c1c5 Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2009-07-24 11:08:42 -07:00
Ricardo M. Correia 51760e3c7e Change VERIFY() into VERIFY3U() when creating threads in ztest, so that we can see the return code when it fails.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2009-07-24 11:00:23 -07:00
Brian Behlendorf 8feebe7d65 Refresh autogen products 2009-07-16 10:29:59 -07:00