Commit Graph

3756 Commits

Author SHA1 Message Date
Brian Behlendorf 0fee5e7ac8 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-02 13:21:53 -07:00
Brian Behlendorf 7b8a233029 Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-08-02 13:21:52 -07:00
Brian Behlendorf bb064e0220 Merge branch 'fix-taskq' into refs/top-bases/fix-branch 2010-08-02 13:21:51 -07:00
Brian Behlendorf c90ad869ca Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-08-02 13:21:51 -07:00
Brian Behlendorf 5545adeadf Use sparse files for loopback+file configurations
Using sparse files for the test configurations had atleast three
significant advantages.

1) Actually test sparse files to ensure they work.
2) Drastically reduce required disk space for the regression test
   suite.  This turns out to be fairly important when running the
   test suite in a virtualized environment.
3) Significantly speed of the test suite.  Run time of zconfig.sh
   dropped from 2m:56s to 1m:00s on my test system, zpios-sanity.sh
   nows runs in only 0m:26s.
2010-08-02 13:16:41 -07:00
Brian Behlendorf 858985a46e Update zconfig.sh
This change updates zconfig.sh to reference /dev/zvol/ instead
of simply /dev/.  It also extends the texts to verify correct
minor device creation for import/export and module load/unload.
2010-08-02 13:15:00 -07:00
Ricardo M. Correia 4ca4dfe9bb Fix taskq_dispatch() call in zio_taskq_dispatch().
The feature branch 'fix-taskq' in Linux's ZFS tree changes the taskq_dispatch()
flag from TQ_SLEEP to TQ_NOSLEEP to avoid sleeping in some circumstances.

However, this has the side effect that taskq_dispatch() now may fail, and since
the return code was not even being checked, it could lead to zio's not being
scheduled to execute.

I'm fixing this in a simplistic but not very elegant way, by just looping until
taskq_dispatch() succeeds.

Signed-off-by: Ricardo M. Correia <ricardo.correia@oracle.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-08-02 13:12:54 -07:00
Brian Behlendorf 2abf4b2f95 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-28 16:54:05 -07:00
Brian Behlendorf 1510a95acd Add splat module to zfs.sh script
The splat module is only needed for the spl regression tests.
But if we add it to MODULES then 'zfs.sh -u' will be able to
unload it if needed,  The downside if 'zfs.sh' will always
load it but it's overhead is minimal and in a production
setting you'll always be doing a 'modprobe zfs' anyway so
this is really just for testing.
2010-07-28 16:47:30 -07:00
Brian Behlendorf 9662934bd9 Add uninstall Makefile targets
Extend the Makefiles with an uninstall target to cleanly
remove a package which was installed with 'make install'.

Additionally, ensure a 'depmod -a' is run as part of the
install to update the module dependency information.
2010-07-28 16:47:26 -07:00
Brian Behlendorf d442e095ae Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-28 16:40:43 -07:00
Brian Behlendorf 26e61dd074 Generate common.sh with paths from configure
The common.sh script assumed that it was either being run from
in-tree or was installed under /usr/libexec/zfs.  If this was
not the case, because of say the default --prefix=/usr/local,
then the paths would be wrong.  To fix this common.sh is now
generated from common.sh.in with the correct path information
provided at configure time.
2010-07-28 16:30:45 -07:00
Brian Behlendorf fb937722a8 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-28 09:42:37 -07:00
Brian Behlendorf 0f237a4379 Add Debian and Slackware style packaging via alien
The long term fix for Debian and Slackware style packaging is
to add native support for building these packages.  Unfortunately,
that is a large chunk of work I don't have time for right now.
That said it would be nice to have at least basic packages for
these distributions.

As a quick short/medium term solution I've settled on using alien
to convert the RPM packages to DEB or TGZ style packages.  The
build system has been updated with the following build targets
which will first build RPM packages and then convert them as
needed to the target package type:

  make rpm: Create .rpm packages
  make deb: Create .deb packages
  make tgz: Create .tgz packages
  make pkg: Create the right package type for your distribution

The solution comes with lot of caveats and your mileage may vary.
But basically the big limitations are that the resulting packages:

  1) Will not have the correct dependency information.
  2) Will not include the kernel version in the release.
  3) Will not handle all differences between distributions.

But the resulting packages should be easy to install and remove
from your system and take care of running 'depmod -a' and such.
As I said at the top this is not the right long term solution.
If any of the upstream distribution maintainers want to jump in
and help do this right for their distribution I'd love the help.
2010-07-28 09:37:04 -07:00
Brian Behlendorf 641bfb323a Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-23 11:44:06 -07:00
Brian Behlendorf 758275af4f Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-07-23 11:42:23 -07:00
Brian Behlendorf 2eee7b0ee5 Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-07-23 11:42:22 -07:00
Brian Behlendorf 4471454be8 Merge branch 'fix-stack-ztest' into refs/top-bases/fix-branch 2010-07-23 11:42:21 -07:00
Brian Behlendorf d43294230a Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-07-23 11:42:21 -07:00
Brian Behlendorf 085c18fa55 Merge commit 'refs/top-bases/fix-stack-ztest' into fix-stack-ztest 2010-07-23 11:42:20 -07:00
Ned Bass be92edb218 Add extra guard space if needed
Some buggy NPTL threading implementations include the guard area within
the stack size allocations.  In this case we need to allocate an extra
page to account for the guard area since we only have two pages of usable
stack on Linux.  Added an autoconf test that detects such implementations
by running a test program designed to segfault if the bug is present.
Set a flag NPTL_GUARD_WITHIN_STACK that is tested to decide if extra
stack space must be allocated for the guard area.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-07-23 11:38:00 -07:00
Ned Bass 16a9f68137 Autoconf check for buggy stack guard region
Some buggy NPTL threading implementations include the guard area within
the stack size allocations.  In this case we need to allocate an extra
page to account for the guard area since we only have two pages of usable
stack on Linux.  Added an autoconf test that detects such implementations
by running a test program designed to segfault if the bug is present.
Set a flag NPTL_GUARD_WITHIN_STACK that is tested to decide if extra
stack space must be allocated for the guard area.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-07-23 11:35:20 -07:00
Brian Behlendorf e1a29e4329 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-23 10:45:40 -07:00
Brian Behlendorf 7fa6f8b93a Restrict usage of -fstack-check option
The stack check implementation in older versions of gcc has
a fairly low default limit on STACK_CHECK_MAX_FRAME_SIZE of
roughly 4096.  This results in numerous warning when it is
used with code which was designed to run in user space and
thus may be relatively stack heavy.  The avoid these warnings,
which are fatal with -Werror, this patch targets the use of
-fstack-check to libraries which are compiled in both user
space and kernel space.  The only utility which uses this
flag is ztest which is designed to simulate running in the
kernel and must meet the -fstack-check requirements.  All
other user space utilities do not use -fstack-check.

  warning: frame size too large for reliable stack checking
  warning: try reducing the number of local variables
2010-07-23 10:38:07 -07:00
Brian Behlendorf 1a493a9555 Add vdev_state to common post info
This was done because there are now lots of resource.fs.zfs.statechange
events being posted but they do not include the state.  For the moment
the state must always be healthy but there's no harm in making this
explicit.
2010-07-21 12:51:14 -07:00
Brian Behlendorf f275e82de9 Add FM_EREPORT_TIME when event is posted
Previously I was adding the FM_EREPORT_TIME time when the nvlist
was constructed.  However, with the update to onnv_141 these
ereport nvlists are now constructed in several places and it
doesn't make sense for each of them to have to add this common
bit of info.  To handle this the FM_EREPORT_TIME is now only
added once when the event is posted.
2010-07-21 12:51:11 -07:00
Brian Behlendorf 5951864035 Minor formatting fix to align columns
$ sudo ./cmd/zpool/zpool events
TIME                           CLASS
Jul 21 2010 11:36:14.682122000 resource.fs.zfs.statechange
Jul 21 2010 11:36:14.705809000 resource.fs.zfs.statechange
2010-07-21 12:51:07 -07:00
Brian Behlendorf b37d279269 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-21 10:10:05 -07:00
Brian Behlendorf acd6237623 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-07-21 10:08:25 -07:00
Brian Behlendorf f39882ec1f Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-07-21 10:08:24 -07:00
Brian Behlendorf e16508d660 Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-07-21 10:08:23 -07:00
Brian Behlendorf a2cf158872 Merge branch 'fix-stack-ztest' into refs/top-bases/fix-branch 2010-07-21 10:08:22 -07:00
Brian Behlendorf 8d6a2d0626 Merge commit 'refs/top-bases/fix-stack-ztest' into fix-stack-ztest 2010-07-21 10:08:22 -07:00
Ned Bass 75d868af70 Fixed typo that set thread STACK_SIZE to 24k instead of 8k
__linux__ was mispelled as _linux_ so #ifdef was always
selecting the Solaris STACK_SIZE value.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-07-21 10:04:21 -07:00
Brian Behlendorf 6d72cb7326 Fix pthread stack size on 32-bit platforms
For some reason which remains mysterious to me the shared library
which calls pthread_create() must be linked with -pthread.  If this
is not done on 32-bit system the default ulimit stack size is used.
Surprisingly, on a 64-bit system the stack limit specified by the
pthread_attr is honored even when -pthread is not passed when linking
the shared library.
2010-07-21 09:59:39 -07:00
Brian Behlendorf 3042984811 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-17 16:05:53 -07:00
Ned Bass 84f737b448 Only try to unload modules whose use count is 0
This avoids errors from zfs.sh -u when, for example, zlib_deflate is in
use by btrfs.
2010-07-17 16:00:54 -07:00
Brian Behlendorf d05d40cbcd Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-14 12:50:23 -07:00
Brian Behlendorf 548c9c6829 Use $target_cpu instead of `arch`
We should not be using arch for a few reasons.  First off it might
not be installed on their system, and secondly they may be trying
to cross-compile.
2010-07-14 12:44:42 -07:00
Brian Behlendorf d81440c8ab Check sourcelink is set before passing to readlink
When no source was found in any of the expected paths treat
this as fatal and provide the user with a hint as to what
they should do.
2010-07-14 12:44:37 -07:00
Brian Behlendorf 56d160bcd2 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-14 10:44:25 -07:00
Brian Behlendorf dccff58e11 Only make compiler warnings fatal with --enable-debug
While in theory I like the idea of compiler warnings always being
fatal.  In practice this causes problems when small harmless errors
cause build failures for end users.  To handle this I've updated
the build system such that -Werror is only used when --enable-debug
is passed to configure.  This is how I always build when developing
so I'll catch all build warnings and end users will not get stuck
by minor issues.
2010-07-14 10:41:48 -07:00
Brian Behlendorf 99ffebbafd Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-12 10:25:05 -07:00
Brian Behlendorf 99694a2e81 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-07-12 10:23:05 -07:00
Brian Behlendorf 4b576456c7 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-07-12 10:23:04 -07:00
Brian Behlendorf 930b48bd2c Merge commit 'refs/top-bases/gcc-branch' into gcc-branch 2010-07-12 10:23:03 -07:00
Brian Behlendorf b1ac2755a0 Merge branch 'gcc-fortify-source' into refs/top-bases/gcc-branch 2010-07-12 10:23:03 -07:00
Brian Behlendorf d134105bba Linux 2.6.34 compat: add_range() symbol collision
The prototype for an add_range() function was added to the kernel
header include/linux/range.h which conflicts with the static
add_range() defined in zfs_fm.c.  To resolve the conflict all
range functions in zfs_fm.c have been prefixed with zei which
is short for the zfs_ecksum_info struct since all of these
functions operate on that base structure.
2010-07-12 10:13:07 -07:00
Brian Behlendorf 007b891fc7 Fix -Werror=format-security compiler option
Noticed under Ubuntu kernel builds, there were two instances where
printf() was not called with a "%s" and instread directly printed
the string.  This can potentially result in a crash and is considered
bad form by gcc.  It has been fixed by adding the needed "%s".
2010-07-12 10:11:48 -07:00
Brian Behlendorf bf89df82e4 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-07-02 14:04:23 -07:00