summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove LINUXINCLUDE from autoconf wrapper, breaks 2.6.28+ kernels.Brian Behlendorf2009-07-272-47/+47
| | | | | | | Modern kernel build systems at least post 2.6.16 will set this properly so we should not. In fact post 2.6.28 the include headers have moved under arch so the guess we make here is completely wrong. Letting the kernel build system set this ensure it will be correct.
* Positive Solaris ioctl return codes need to be negated for use by libcBrian Behlendorf2009-07-231-2/+9
|
* Allow kmem or vmem based slab for slab_lock and slab_overcommit tests.Brian Behlendorf2009-07-231-1/+1
| | | | | | | | | | | The slab_overcommit test case could hang on a system with fragmented memory because it was creating a kmem based slab with 256K objects. To avoid this I've removed the KMC_KMEM flag which allows the slab to decide if it should be kmem or vmem backed based on the object side. The slab_lock test shares this code and will also be effected. But the point of these two tests is to stress cache locking and memory overcommit, the type of slab is not critical. In fact, allowing the slab to do the default smart thing is preferable.
* The HAVE_PATH_IN_NAMEIDATA compat macros should have been used here.Brian Behlendorf2009-07-221-3/+3
|
* Check arch/default/ path when detecting kernel objects on SLESBrian Behlendorf2009-07-222-3/+9
| | | | | We still preferentially use arch/arch looking for a native version but if that fails it is acceptable to use default.
* Register a basic compat ioctl handler (32 vs 64 bit compat)Brian Behlendorf2009-07-211-3/+17
| | | | | | | | | | | Simply pass the ioctl on to the normal handler. If the ioctl helper macros are used correctly this should be safe as they will handle the packing/unpacking of the data encoded in the ioctl command. And actually, if the caller does not use the IO* macros at all, and just passes small values, it will probably be OK as well. We only get in to trouble if they try and use the upper 32-bits. Endianness is not really a concern here, we we are pretty much assumed they user and kernel will match.
* Fixed NULL dereference by tcd_for_each() when the kmalloc() call in ↵Ricardo M. Correia2009-07-141-1/+1
| | | | | | module/spl/spl-debug.c:1163 returns NULL. Signed-off-by: Brian Behlendorf <[email protected]>
* Prevent integer overflow after ~164 days of uptime.Ricardo M. Correia2009-07-141-1/+1
| | | | Signed-off-by: Brian Behlendorf <[email protected]>
* Add a little paranoia here to ensure endianess is set correctly.Brian Behlendorf2009-07-141-1/+5
|
* Add basic groupmember() function, not sup groups.Brian Behlendorf2009-07-101-0/+12
|
* Add ddi_copyin/ddi_copyout support for fake kernel originated ioctls.Brian Behlendorf2009-07-102-0/+30
|
* Define ACE_ALL_PERMS for use by ACLsBrian Behlendorf2009-07-091-0/+6
|
* Define FKIOCTL which is used on Solaris to mark an in-kernel ioctl.Brian Behlendorf2009-07-091-0/+2
|
* Add ASSERTV macro to simplify removing variables (the V in ASSERTV)Brian Behlendorf2009-07-091-0/+2
| | | | which are only used in ASSERT().
* Add basic support for TASKQ_THREADS_CPU_PCT taskq flag which isBrian Behlendorf2009-07-092-0/+10
| | | | | | used to scale the number of threads based on the number of online CPUs. As CPUs are added/removed we should rescale the thread count appropriately, but currently this is only done at create.
* Update ChangeLogBrian Behlendorf2009-07-021-1/+22
|
* Cleanly handle --with-linux=NONE option when used to generate sourceBrian Behlendorf2009-07-022-9/+24
| | | | | | | rpms. These should not be fatal because we actually don't need them until we build the source rpm. When doing mock builds this is important because these dependent rpms will only be installed if they are specificed in the source rpms spec file.
* Simplify rpm build rules, added config/rpm.am.Brian Behlendorf2009-07-0112-328/+2992
| | | | Distro friendly changes such that the kernel modules are packaged seperately.
* Add spl.release to spl-devel to simply dependent package version check.Brian Behlendorf2009-06-292-0/+2
|
* Install spl-devel products in /usr/src/spl-SPL_VERSION/LINUX_VERSION/Brian Behlendorf2009-06-264-6/+8
| | | | Remove the spl symlink, it's just confusing
* Use do_div on older kernel where do_div64 doesn't exist.Brian Behlendorf2009-06-261-1/+1
|
* Additional tuning to get the BuildRequires right for all cases.Brian Behlendorf2009-06-261-10/+9
| | | | pl.spec~
* Simplify the kernel depenency logicBrian Behlendorf2009-06-261-20/+15
|
* Spec file update, for some reason the following shorthand syntaxBrian Behlendorf2009-06-261-17/+38
| | | | | | | | | | | | was failing so it was replaced with the longer %if version. %{!?foo: %define foo bar} changed to %if %{undefined foo} %define foo bar %endif
* SRPM build farm / mock itergrationBrian Behlendorf2009-06-261-15/+20
|
* Build farm integration to ensure BuildRequires are correctBrian Behlendorf2009-06-251-3/+3
|
* Packaging FixesBrian Behlendorf2009-06-252-53/+73
| | | | | | | | - Kernel modules should be built using the LINUX_OBJ Makefiles and not the LINUX Makefiles to ensure the proper install paths are used. - Install modules in to addon/spl/ - Ensure no additional kernel module build products are packaged. - Simplified spl.spec.in which supports RHEL, CHAOS, SLES, FEDORA.
* Update ChangeLog with a high level summary of the changes fromBrian Behlendorf2009-06-222-1/+81
| | | | | 0.4.3 to 0.4.4 prior to tagging. Full details can be found in the git commit history.
* Packaging improvements for RHEL and SLES (part 2)Brian Behlendorf2009-06-1610-40/+100
| | | | | | | - Allow checking for exported symbols in both Module.symvers and Module.symvers. My stock SLES kernel ships an objects directory with Module.symvers, yet produces a Module.symvers in the local build directory.
* Packaging improvements for RHEL and SLESBrian Behlendorf2009-06-169-29/+69
| | | | | | | | | | | | | | | - Properly honor --prefix in build system and rpm spec file. - Add '--define require_kdir' to spec file to support building rpms against kernel sources installed in non-default locations. - Add '--define require_kobj' to spec file to support building rpms against kernel object installed in non-default locations. - Stop suppressing errors in autogen.sh script. - Improved logic to detect missing kernel objects when they are not located with the source. This is the common case for SLES as well as in-tree chaos kernel builds and is done to simply support for multiple arches. - Moved spl-devel build products to /usr/src/spl-<version>, a spl symlink is created to reference the last installed version.
* SLES10 Fixes (part 9)Brian Behlendorf2009-05-2116-85/+64
| | | | | | | | | | | - Proper ioctl() 32/64-bit binary compatibility. We need to ensure the ioctl data itself is always packed the same for 32/64-bit binaries. Additionally, the correct thing to do is encode this size in bytes as part of the command using _IOC_SIZE(). - Minor formatting changes to respect the 80 character limit. - Move all SPLAT_SUBSYSTEM_* defines in to splat-ctl.h. - Increase SPLAT_SUBSYSTEM_UNKNOWN because we were getting close to accidentally using it for a real registered subsystem.
* SLES10 Fixes (part 8)Brian Behlendorf2009-05-201-7/+19
| | | | | | | | - Add compat_ioctl() handler, by default 64-bit SLES systems build 32-bit ELF binaries. For the 32-bit binaries to pass ioctl information to a 64-bit kernel a compatibility handler needs to be registered. In our case no additional conversions are needed to convert 32-bit ioctl() commands to 64-bit commands so we can just call the default handler.
* SLES10 Fixes (part 7)Brian Behlendorf2009-05-204-5/+5
| | | | | | | | | | | - Initial SLES testing uncovered a long standing bug in the debug tracing. The tcd_for_each() macro expected a NULL to terminate the trace_data[i] array but this was only ever true due to luck. All trace_data[] iterators are now properly capped by TCD_TYPE_MAX. - SPLAT_MAJOR 229 conflicted with a 'hvc' device on my SLES system. Since this was always an arbitrary choice I picked something else. - The HAVE_PGDAT_LIST case should set pgdat_list_addr to the value stored at the address of the memory location returned by kallsyms_lookup_name().
* SLES10 Fixes (part 6)Brian Behlendorf2009-05-206-23/+157
| | | | | | | | | - Prior to 2.6.17 there were no *_pgdat helper functions in mm/mmzone.c. Instead for_each_zone() operated directly on pgdat_list which may or may not have been exported depending on how your kernel was compiled. Now new configure checks determine if you have the helpers or not, and if the needed symbols are exported. If they are not exported then they are dynamically aquired at runtime by kallsyms_lookup_name().
* Powerpc Fixes (part 1):Brian Behlendorf2009-05-203-7/+30
| | | | | | | - Enable builds for powerpc ISA type. - Add DIV_ROUND_UP and roundup macros if unavailable. - Cast 64-bit values for %lld format string to (long long) to quiet compile warning.
* SLES10 Fixes (part 5):Brian Behlendorf2009-05-201-3/+3
| | | | | - Fix incorrect mapping for spl_device_create()->class_device_create() which is the prefered API for 2.6.13 to 2.6.17 based kernels.
* SLES10 Fixes (part 4):Brian Behlendorf2009-05-205-5/+188
| | | | | | | - Configure check for SLES specific API change to vfs_unlink() and vfs_rename() which added a 'struct vfsmount *' argument. This was for something called the linux-security-module, but it appears that it was never adopted upstream.
* SLES10 Fixes (part 3):Brian Behlendorf2009-05-206-0/+107
| | | | | | - Configure check for mutex_lock_nested(). This function was introduced as part of the mutex validator in 2.6.18, but if it's unavailable then it's safe to fallback to a plain mutex_lock().
* SLES10 Fixes (part 2):Brian Behlendorf2009-05-2011-94/+217
| | | | | | | | | | | | | | | | - Configure check, the div64_64() function was renamed to div64_u64() as of 2.6.26. - Configure check, the global_page_state() fuction was introduced in 2.6.18 kernels. The earlier 2.6.16 based SLES10 must not try and use it, thankfully get_zone_counts() is still available. - To simplify debugging poison all symbols aquired dynamically using spl_kallsyms_lookup_name() with SYMBOL_POISON. - Add console messages when the user mode helpers fail. - spl_kmem_init_globals() use bit shifts instead of division. - When the monotonic clock is unavailable __gethrtime() must perform the HZ division as an 'unsigned long long' because the SPL only implements __udivdi3(), and not __divdi3() for 'long long' division on 32-bit arches.
* SLES10 Fixes (part 1):Brian Behlendorf2009-05-192-27/+37
| | | | | | | | - Exclude -obj when detecting installed kernel source. - Detect -obj directory for out of tree kernel builds. - Allow kernel build system to set CC to ensure -m64 is set properly. This is an issue on 64-bit SLES systems which by default always build 32-bit binaries (unlike RHEL/Fedora which default to 64-bit)
* Prep for spl-0.4.3 tag.Brian Behlendorf2009-03-203-2/+59
|
* Add list_move_tail() function.Brian Behlendorf2009-03-191-0/+8
|
* Remove useless EOL white space padding from `splat -l` command.Brian Behlendorf2009-03-181-4/+3
|
* Fix vmem leak in kmem_cache_test (missing splat_kmem_cache_test_kcp_free())Brian Behlendorf2009-03-181-0/+1
|
* Allow spl_config.h to be included by dependant packagesBrian Behlendorf2009-03-1712-63/+57
| | | | | | | | | | | | | | | | We need dependent packages to be able to include spl_config.h so they can leverage the configure checks the SPL has done. This is important because several of the spl headers need the results of these checks to work properly. Unfortunately, the autoheader build product is always private to a particular build and defined certain common things. (PACKAGE, VERSION, etc). This prevents other packages which also use autoheader from being include because the definitions conflict. To avoid this problem the SPL build system leverage AH_BOTTOM to include a spl_unconfig.h at the botton of the autoheader build product. This custom include undefs all known shared symbols to prevent the confict. This does however mean that those definition are also not availble to the SPL package either. The SPL package therefore uses the equivilant SPL_META_* definitions.
* FC10/i686 Compatibility Update (2.6.27.19-170.2.35.fc10.i686)Brian Behlendorf2009-03-177-31/+278
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the interests of portability I have added a FC10/i686 box to my list of development platforms. The hope is this will allow me to keep current with upstream kernel API changes, and at the same time ensure I don't accidentally break x86 support. This patch resolves all remaining issues observed under that environment. 1) SPL_AC_ZONE_STAT_ITEM_FIA autoconf check added. As of 2.6.21 the kernel added a clean API for modules to get the global count for free, inactive, and active pages. The SPL attempts to detect if this API is available and directly map spl_global_page_state() to global_page_state(). If the full API is not available then spl_global_page_state() is implemented as a thin layer to get these values via get_zone_counts() if that symbol is available. 2) New kmem:vmem_size regression test added to validate correct vmem_size() functionality. The test case acquires the current global vmem state, allocates from the vmem region, then verifies the allocation is correctly reflected in the vmem_size() stats. 3) Change splat_kmem_cache_thread_test() to always use KMC_KMEM based memory. On x86 systems with limited virtual address space failures resulted due to exhaustig the address space. The tests really need to problem exhausting all memory on the system thus we need to use the physical address space. 4) Change kmem:slab_lock to cap it's memory usage at availrmem instead of using the native linux nr_free_pages(). This provides additional test coverage of the SPL Linux VM integration. 5) Change kmem:slab_overcommit to perform allocation of 256K instead of 1M. On x86 based systems it is not possible to create a kmem backed slab with entires of that size. To compensate for this the number of allocations performed in increased by 4x. 6) Additional autoconf documentation for proposed upstream API changes to make additional symbols available to modules. 7) Console error messages added when spl_kallsyms_lookup_name() fails to locate an expected symbol. This causes the module to fail to load and we need to know exactly which symbol was not available.
* Fix taskq_wait() not waiting bugBrian Behlendorf2009-03-153-12/+96
| | | | | | | | | | | | | | | | | I'm very surprised this has not surfaced until now. But the taskq_wait() implementation work only wait successfully the first time it was called. Subsequent usage of taskq_wait() on the taskq would not wait. The issue was caused by tq->tq_lowest_id being set to MAX_INT after the first wait completed. This caused subsequent waits which check that the waiting id is less than the lowest taskq id to always succeed. The fix is to ensure that tq->tq_lowest_id is never set larger than tq->tq_next.id. Additional fixes which were added to this patch include: 1) Fix a race by placing the taskq_wait_check() in the tq->tq_lock spinlock. 2) taskq_wait() should wait for the largest outstanding id. 3) Multiple spelling corrections. 4) Added taskq wait regression test to validate correct behavior.
* Mutex tests updated to use task queues instead of work queues.Brian Behlendorf2009-03-151-59/+77
| | | | | | | | | | | | Mainly for portability reasons I have rebased the mutex tests on Solaris taskqs instead of linux work queues. The linux workqueue API changed post 2.6.18 kernels and using task queues avoids having to conditionally detect which workqueue API to use. Additionally, this is basically free additional testing for the task queues. Much to my surprise after updating these test cases they did expose a long standing bug in the taskq_wait() implementation. This patch does not address that issue but the followup patch does.
* Added SPL_AC_5ARGS_DEVICE_CREATE autoconf configure checkBrian Behlendorf2009-03-135-1/+102
| | | | | | | As of 2.6.27 kernels the device_create() API changed to include a private data argument. This check detects which version of device_create() function the kernel has and properly defines spl_device_create() to use the correct prototype.
* Fix off-by-1 truncation of hw_serial when converting from integer to string, ↵Ricardo M. Correia2009-03-121-9/+10
| | | | | | | | | | | | when writing to /proc/sys/kernel/spl/spl_hostid. Fixes hostid mismatch which leads to assertion failure when the hostid/hw_serial is a 10-character decimal number: $ zpool status pool: lustre state: ONLINE lt-zpool: zpool_main.c:3176: status_callback: Assertion `reason == ZPOOL_STATUS_OK' failed. zsh: 5262 abort zpool status