aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add linux unused code trackingBrian Behlendorf2010-08-313-77/+0
| | | | | | | Track various large hunks which have been dropped simply because they are not relevant to this port. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux topology supportBrian Behlendorf2010-08-312-0/+21
| | | | | | | | | | Solaris recently introduced the idea of drive topology because where a drive is located does matter. I have already handled this with udev/blkid integration under Linux so I'm hopeful this case can simply be removed but for now I've just stubbed out what is needed in libspl and commented out the rest here. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux compatibilityBrian Behlendorf2010-08-311-0/+4
| | | | | | Resolve minor Linux compatibility issues. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux sha2 supportBrian Behlendorf2010-08-311-6/+4
| | | | | | | | | | | | | The upstream ZFS code has correctly moved to a faster native sha2 implementation. Unfortunately, under Linux that's going to be a little problematic so we revert the code to the more portable version contained in earlier ZFS releases. Using the native sha2 implementation in Linux is possible but the API is slightly different in kernel version user space depending on which libraries are used. Ideally, we need a fast implementation of SHA256 which builds as part of ZFS this shouldn't be that hard to do but it will take some effort. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux libspl supportBrian Behlendorf2010-08-31102-1/+10112
| | | | | | | | All changes needed for the libspl layer. This includes modifications to files directly copied from OpenSolaris and the addition of new files needed to fill in the gaps. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux kernel memory supportBrian Behlendorf2010-08-312-13/+20
| | | | | | Required kmem/vmem changes Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux kernel device supportBrian Behlendorf2010-08-312-3/+3
| | | | | | | | | | | | | | | | 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. This patch also adds the onexit infrastructure needed to track some minimal state between ioctls. Under Linux it would be easy to do this simply using the file->private_data. But under Solaris they apparent need to pass the file descriptor as part of the ioctl data and then perform a lookup in the kernel. Once again to keep code change to a minimum I've implemented the Solaris solution. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux mntent supportBrian Behlendorf2010-08-311-0/+8
| | | | | | Use mount entry if HAVE_SETMNTENT defined Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux mlslabel supportBrian Behlendorf2010-08-311-1/+12
| | | | | | | | | | The ZFS update to onnv_141 brought with it support for a security label attribute called mlslabel. This feature depends on zones to work correctly and thus I am disabling it under Linux. Equivilant functionality could be added at some point in the future. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux idmap supportBrian Behlendorf2010-08-311-0/+12
| | | | | | Use idmap service if available. Signed-off-by: Brian Behlendorf <[email protected]>
* Add linux eventsBrian Behlendorf2010-08-313-3/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-319-0/+298
| | | | | | 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 vn_open()Brian Behlendorf2010-08-311-6/+17
| | | | | | | | We should not put a 4k maxpathlen buffer on the stack, instead locate it to the heap. Even in user space we run ztest with 8K stacks to verify correctness Signed-off-by: Brian Behlendorf <[email protected]>
* Fix stack noinlineBrian Behlendorf2010-08-311-0/+6
| | | | | | | | | Certain function must never be automatically inlined by gcc because they are stack heavy or called recursively. This patch flags all such functions I've found as 'noinline' to prevent gcc from making the optimization. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix Solaris thread dependency by using pthreadsBrian Behlendorf2010-08-314-135/+357
| | | | | | | | | | | 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 strncat usageBrian Behlendorf2010-08-311-1/+1
| | | | | | | | This look like a typo. The intention was to use strlcat() however strncat() was used instead accidentally this may lead to a buffer overflow. This was caught by gcc -D_FORTIFY_SOURCE=2. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix zmod.h usage in userspaceBrian Behlendorf2010-08-311-26/+0
| | | | | | | | | | | Do not use zmod.h in userspace. This has also been filed with the ZFS team. It makes the userspace libzpool code use the zlib API, instead of the Solaris-only and non-standard zmod.h. The zlib API is almost identical and is a de facto standard, so this is a no-brainer. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix vn_open/vn_rdwr error handlingRicardo M. Correia2010-08-311-9/+17
| | | | | | | | | | 1) In vn_open(), if fstat64() returned an error, the real errno was being obscured by calling close(). 2) Add error handling for both pwrite64() calls in vn_rdwr(). Signed-off-by: Ricardo M. Correia <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
* Fix deadcodeBrian Behlendorf2010-08-311-43/+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 minor acl issueBrian Behlendorf2010-08-311-1/+1
| | | | | | Minor fixes for newly introduced acl support. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc uninitialized variable warningsBrian Behlendorf2010-08-313-6/+7
| | | | | | Gcc -Wall warn: 'uninitialized variable' Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc missing parenthesis warningsBrian Behlendorf2010-08-313-6/+6
| | | | | | Gcc -Wall warn: 'missing parenthesis' Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc missing case warningsBrian Behlendorf2010-08-273-1/+22
| | | | | | Gcc ASSERT() missing cases are impossible Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc missing braces warningsBrian Behlendorf2010-08-277-66/+66
| | | | | | Resolve compiler warnings concerning missing braces. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc init pragma warningsBrian Behlendorf2010-08-272-1/+11
| | | | | | | | | Use constructor attribute on non-Solaris platforms. The #pragma init/fini ->__attribute__((constructor/destructor)) conversions, these should go upstream. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc ident pragma warningsRicardo M. Correia2010-08-2712-14/+16
| | | | | | Remove all ident pragmas which are unknown to gcc. Signed-off-by: Brian Behlendorf <[email protected]>
* Fix gcc fortify source warningsBrian Behlendorf2010-08-271-1/+1
| | | | | | | | | | | | | | 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-277-29/+32
| | | | | | | 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-272-1/+7
| | | | | | | | 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]>
* Update to onnv_147Brian Behlendorf2010-08-2619-492/+2229
| | | | | 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-2818-1459/+3794
|
* Script update-zfs.sh updated to include libefi libraryBrian Behlendorf2009-10-093-0/+1552
|
* Rebase master to b121Brian Behlendorf2009-08-186-50/+212
|
* Rebase master to b117Brian Behlendorf2009-07-0210-983/+908
|
* Rebase master to b108Brian Behlendorf2009-02-187-23/+58
|
* Rebase master to b105Brian Behlendorf2009-01-156-122/+337
|
* Moving lib/libspl to linux-libspl branchBrian Behlendorf2008-12-118-2870/+0
|
* Script updatesBrian Behlendorf2008-12-111-0/+48
|
* Move library files to libBrian Behlendorf2008-12-112-0/+682
|
* Fix libspl move to the wrong placeBrian Behlendorf2008-12-118-0/+0
|
* Add a few missing filesBrian Behlendorf2008-12-111-0/+547
|
* Move the world out of /zfs/ and seperate out module build treeBrian Behlendorf2008-12-1135-0/+23576
|
* Remove stray stub kernel files which should be brought in my ↵Brian Behlendorf2008-12-024-16/+0
| | | | linux-kernel-module patch
* Initial Linux ZFS GIT RepoBrian Behlendorf2008-11-204-0/+16