aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
Commit message (Collapse)AuthorAgeFilesLines
* Add initial autoconf productsBrian Behlendorf2010-08-319-0/+5757
| | | | | | | Add the initial products from autogen.sh. These products will be updated incrementally after this point as development occurs. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux ztest supportBrian Behlendorf2010-08-311-24/+25
| | | | | | | | Minor changes to ztest for this environment. These including updating ztest to run in the local development tree, as well as relocating some local variables in this function to the heap. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux zpios supportBrian Behlendorf2010-08-316-1/+1218
| | | | | | Linux kernel implementation of PIOS test app. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux user util supportBrian Behlendorf2010-08-314-36/+29
| | | | | | | This topic branch contains required changes to the user space utilities to allow them to integrate cleanly with Linux. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux user disk supportBrian Behlendorf2010-08-315-254/+384
| | | | | | | | | This topic branch contains all the changes needed to integrate the user side zfs tools with Linux style devices. Primarily this includes fixing up the Solaris libefi library to be Linux friendly, and integrating with the libblkid library which is provided by e2fsprogs. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux eventsBrian Behlendorf2010-08-311-0/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Brian Behlendorf <[email protected]>
* Add build systemBrian Behlendorf2010-08-3110-0/+355
| | | | | | Add autoconf style build infrastructure to the ZFS tree. This includes autogen.sh, configure.ac, m4 macros, some scripts/*, and makefiles for all the core ZFS components.
* Fix stack ztestBrian Behlendorf2010-08-311-87/+205
| | | | | | | | | | | | While ztest does run in user space we run it with the same stack restrictions it would have in kernel space. This ensures that any stack related issues which would be hit in the kernel can be caught and debugged in user space instead. This patch is a first pass to limit the stack usage of every ztest function to 1024 bytes. Subsequent updates can further reduce this. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix Solaris thread dependency by using pthreadsBrian Behlendorf2010-08-311-116/+123
| | | | | | | | | | | This is a portability change which removes the dependence of the Solaris thread library. All locations where Solaris thread API was used before have been replaced with equivilant Solaris kernel style thread calls. In user space the kernel style threading API is implemented in term of the portable pthreads library. This includes all threads, mutexs, condition variables, reader/writer locks, and taskqs. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix deadcodeBrian Behlendorf2010-08-311-27/+0
| | | | | | | | Remove deadcode. It's possible the code should be in use somewhere, but as the source code is laid out it currently is not. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix commit callbacksRicardo M. Correia2010-08-311-15/+32
| | | | | | | | | | | | | | | | | | | | | | The upstream commit cb code had a few bugs: 1) The arguments of the list_move_tail() call in txg_dispatch_callbacks() were reversed by mistake. This caused the commit callbacks to not be called at all. 2) ztest had a bug in ztest_dmu_commit_callbacks() where "error" was not initialized correctly. This seems to have caused the test to always take the simulated error code path, which made ztest unable to detect whether commit cbs were being called for transactions that successfuly complete. 3) ztest had another bug in ztest_dmu_commit_callbacks() where the commit cb threshold was not being compared correctly. 4) The commit cb taskq was using 'max_ncpus * 2' as the maxalloc argument of taskq_create(), which could have caused unnecessary delays in the txg sync thread. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc uninitialized variable warningsBrian Behlendorf2010-08-314-6/+8
| | | | | | Gcc -Wall warn: 'uninitialized variable' Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc unused variable warningsBrian Behlendorf2010-08-312-2/+4
| | | | | | Gcc -Wall warn: 'unused variable' Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc missing parenthesis warningsBrian Behlendorf2010-08-312-3/+3
| | | | | | Gcc -Wall warn: 'missing parenthesis' Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc missing case warningsBrian Behlendorf2010-08-272-0/+8
| | | | | | Gcc ASSERT() missing cases are impossible Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc missing braces warningsBrian Behlendorf2010-08-271-3/+7
| | | | | | Resolve compiler warnings concerning missing braces. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc invalid prototype warningsBrian Behlendorf2010-08-273-46/+46
| | | | | | Gcc -Wall warn: 'invalid prototype' Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc ident pragma warningsRicardo M. Correia2010-08-271-1/+1
| | | | | | Remove all ident pragmas which are unknown to gcc. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc fortify source warningsBrian Behlendorf2010-08-272-5/+6
| | | | | | | | | | | | | | Resolve issues uncovered by -D_FORTIFY_SOURCE=2, the default redhat macro's file adds this option to the cflags. This causes warnings of the following type designed to keep the developer honest: warning: ignoring return value of 'foo', declared with attribute warn_unused_result The short term fix is to wrap these calls in VERIFY() to check the return code. The code was already assusing these would never fail. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc cast warningsBrian Behlendorf2010-08-274-27/+37
| | | | | | | Gcc -Wall warn: 'lacks a cast' Gcc -Wall warn: 'comparison between pointer and integer' Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc c90 compliance warningsBrian Behlendorf2010-08-273-44/+80
| | | | | | | | Fix non-c90 compliant code, for the most part these changes simply deal with where a particular variable is declared. Under c90 it must alway be done at the very start of a block. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc 64-bit constant warningsRicardo M. Correia2010-08-261-1/+1
| | | | | | Add 'ull' suffix to 64-bit constants. Signed-off-by: Brian Behlendorf <[email protected]>
* Update to onnv_147Brian Behlendorf2010-08-266-373/+446
| | | | | This is the last official OpenSolaris tag before the public development tree was closed.
* Update core ZFS code from build 121 to build 141.Brian Behlendorf2010-05-2814-3120/+5898
|
* Add .gitignore files to exclude build productsBrian Behlendorf2010-01-085-0/+5
|
* Rebase master to b121Brian Behlendorf2009-08-186-44/+211
|
* Rebase master to b117Brian Behlendorf2009-07-028-746/+1331
|
* Rebase master to b108Brian Behlendorf2009-02-182-5/+9
|
* Rebase master to b105Brian Behlendorf2009-01-154-123/+171
|
* Remove zdump, it's an unrelateds command which I added simply due to the z* ↵Brian Behlendorf2009-01-051-664/+0
| | | | command convention
* Move the world out of /zfs/ and seperate out module build treeBrian Behlendorf2008-12-1116-0/+18759