Go to file
Brian Behlendorf 51a727e90f Set cwd to '/' for the process executing insmod.
Ricardo has pointed out that under Solaris the cwd is set to '/'
during module load, while under Linux it is set to the callers cwd.
To handle this cleanly I've reworked the module *_init()/_exit()
macros so they call a *_setup()/_cleanup() function when any SPL
dependent module is loaded or unloaded.  This gives us a chance to
perform any needed modification of the process, in this case changing
the cwd.  It also handily provides a way to avoid creating wrapper
init()/exit() functions because the Solaris and Linux prototypes
differ slightly.  All dependent modules should now call the spl
helper macros spl_module_{init,exit}() instead of the native linux
versions.

Unfortunately, it appears that under Linux there has been no consistent
API in the kernel to set the cwd in a module.  Because of this I have
had to add more autoconf magic than I'd like.  However, what I have
done is correct and has been tested on RHEL5, SLES11, FC11, and CHAOS
kernels.

In addition, I have change the rootdir type from a 'void *' to the
correct 'vnode_t *' type.  And I've set rootdir to a non-NULL value.
2009-10-01 16:06:15 -07:00
cmd Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
config Set cwd to '/' for the process executing insmod. 2009-10-01 16:06:15 -07:00
include Set cwd to '/' for the process executing insmod. 2009-10-01 16:06:15 -07:00
lib Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
module Set cwd to '/' for the process executing insmod. 2009-10-01 16:06:15 -07:00
patches Reimplement rwlocks for Linux lock profiling/analysis. 2009-09-18 16:09:47 -07:00
scripts Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
AUTHORS Prep for spl-0.4.3 tag. 2009-03-20 14:48:30 -07:00
autogen.sh Packaging improvements for RHEL and SLES 2009-06-16 10:44:59 -07:00
ChangeLog Tag spl-0.4.5. 2009-08-04 12:22:33 -07:00
configure Set cwd to '/' for the process executing insmod. 2009-10-01 16:06:15 -07:00
configure.ac Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
COPYING Go through and add a header with the proper UCRL number. 2008-05-26 04:38:26 +00:00
DISCLAIMER Go through and add a header with the proper UCRL number. 2008-05-26 04:38:26 +00:00
INSTALL Trivial commit to remove whitespace 2008-07-09 19:11:29 +00:00
Makefile.am Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
Makefile.in Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00
META Tag spl-0.4.5. 2009-08-04 12:22:33 -07:00
spl_config.h.in Set cwd to '/' for the process executing insmod. 2009-10-01 16:06:15 -07:00
spl_unconfig.h Allow spl_config.h to be included by dependant packages 2009-03-17 14:55:59 -07:00
spl-modules.spec.in Various spec file tweaks to handle rpm building of several distros. 2009-08-14 14:09:16 -07:00
spl.spec.in Simplify rpm build rules, added config/rpm.am. 2009-07-01 14:37:44 -07:00