Commit Graph

3750 Commits

Author SHA1 Message Date
Brian Behlendorf d807ad0467 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-23 11:44:21 -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 07ff81417b Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-23 10:45:56 -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 a124e00e39 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-21 10:10:20 -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 76c6e9ad7f Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-17 16:06:08 -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 69cb20bf9c Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-14 12:50:38 -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 ca1edcca9e Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-14 10:44:43 -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 4f9e6024c5 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-12 10:25:22 -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 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 5ab7e5e0e0 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-02 14:04:40 -07:00
Lars Johannsen 77f748fd1c Allow config/build to work with autoconf-2.65
As of autoconf-2.65 the AC_LANG_SOURCE source macro no longer
includes the confdef.h results when expanded.  To handle this
simply explicitly include confdef.h in conftest.c.  This will
cause two copies to of confdef.h to be added to the test for
earlier autoconf versions but this is not harmful.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-07-02 13:56:00 -07:00
Brian Behlendorf 8174d852b8 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-01 20:47:54 -07:00
Brian Behlendorf 61119d3f5b Linux-2.6.33 compat, check <generated/utsrelease.h> for UTS_RELEASE
It seems the upstream community moved the definition of UTS_RELEASE
yet again as of linux-2.6.33.  Update the build system to check in
all three possible locations where your kernel version may be defined.

    $kernelbuild/include/linux/version.h
    $kernelbuild/include/linux/utsrelease.h
    $kernelbuild/include/generated/utsrelease.h
2010-07-01 20:43:36 -07:00
Brian Behlendorf 3cafb6a2f7 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-07-01 10:44:27 -07:00
Brian Behlendorf 7f54d558c9 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-07-01 10:42:01 -07:00
Brian Behlendorf 428d8d8a9b Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-07-01 10:42:00 -07:00
Brian Behlendorf 6de663ff06 Merge commit 'refs/top-bases/gcc-branch' into gcc-branch 2010-07-01 10:41:59 -07:00
Brian Behlendorf 049a26b800 Merge branch 'gcc-fortify-source' into refs/top-bases/gcc-branch 2010-07-01 10:41:59 -07:00
Brian Behlendorf 8db31e251d Update zfs.spec.in to reference updated README.markdown file
The spec file references the README by the previous name which
has changed to make it github friendly.  This results in an
rpm build failure.
2010-07-01 10:36:00 -07:00
Brian Behlendorf 3b54f5030e Use VERIFY() for asprintf due to rpm -D_FORTIFY_SOURCE=2
This check is part of ztest and a memory failure here is unlikely.
However, if this does occur simply exiting is an perfectly valid
way to handle the issue and it resulves the compiler warning.

        ztest.c:5522: error: ignoring return value of 'asprintf',
        declared with attribute warn_unused_result
2010-07-01 10:35:11 -07:00
Brian Behlendorf db40127ff5 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-06-29 16:59:57 -07:00
Brian Behlendorf 5387c446cf Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-06-29 16:57:41 -07:00
Brian Behlendorf f28ca65b92 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-06-29 16:57:41 -07:00
Brian Behlendorf 1a58b78499 Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-06-29 16:57:39 -07:00
Brian Behlendorf 015677660a Merge branch 'fix-stack-traverse_visitbp' into refs/top-bases/fix-branch 2010-06-29 16:57:39 -07:00
Brian Behlendorf 6f1eda0629 Add configure check for -Wframe-larger-than=<size>
It turns out the gcc option -Wframe-larger-than=<size> which I recently
added to the build system is not supported in older versions of gcc.
Since this is just a flag to ensure I keep stack usage under control
I've added a configure check to detect if gcc supports it.  If it's
available we use it in the proper places, if it's not we don't.
2010-06-29 16:53:02 -07:00
Brian Behlendorf f20301b41b Minor fix to ensure tv_depth is there when debugging is disabled. 2010-06-29 16:52:42 -07:00
Brian Behlendorf b7a39f014b Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-06-29 14:43:52 -07:00