Commit Graph

240 Commits

Author SHA1 Message Date
Brian Behlendorf 7b66ddcd84 Refresh autogen.sh products 2010-08-09 16:59:53 -07:00
Brian Behlendorf 1fcf8bdb82 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-08-09 16:54:01 -07:00
Brian Behlendorf 9cb44812a4 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-08-09 16:51:06 -07:00
Brian Behlendorf dfc166d174 Limit sysfs name to KOBJ_NAME_LEN
It appears that in earlier kernels the maximum name length of a
kobject was KOBJ_NAME_LEN (20) bytes.  This was later extended to
dynamically allocate enough memory if it was over KOBJ_NAME_LEN,
and finally it was always made dynamic.  Unfortunately, util this
last step happened it doesn't look like it always safe to use
names larger than KOBJ_NAME_LEN.  For example, under the RHEL5
2.6.18 kernel if the kobject name length exceeds KOBJ_NAME_LEN
a NULL dereference is tripped.

To avoid this issue the build system has been update to check
to see if KOBJ_NAME_LEN is defined.  If it is we have to assume
the maximum kobject name length is only 20 bytes.  This 20 byte
name must minimally include the following components.

  <zpool>/<dataset>[@snapshot[partition]]
2010-08-09 16:44:41 -07:00
Brian Behlendorf 62788ec38a Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-28 16:54:48 -07:00
Brian Behlendorf 1f1212fc5f Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-28 16:52:22 -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 d825659880 Refresh autogen products 2010-07-28 09:49:38 -07:00
Brian Behlendorf 2fa808f6f4 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-28 09:43:20 -07:00
Brian Behlendorf 17d3c1b73f Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-28 09:40:58 -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 641f300534 Refresh autogen products 2010-07-23 11:50:26 -07:00
Brian Behlendorf b00509d4b3 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-23 11:44:49 -07:00
Brian Behlendorf 2deb475123 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-23 11:42:26 -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 3992d0811c Refresh autogen products 2010-07-23 10:48:54 -07:00
Brian Behlendorf f202496925 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-23 10:46:27 -07:00
Brian Behlendorf 9f24ae6b22 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-23 10:43:58 -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 4a1b926a81 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-14 12:50:57 -07:00
Brian Behlendorf 2e646504f1 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-14 12:48:45 -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 7f41f96626 Refresh autogen products 2010-07-14 10:51:41 -07:00
Brian Behlendorf 9794f54c0f Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-14 10:45:07 -07:00
Brian Behlendorf fdaac6be54 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-14 10:42:28 -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 995c4e789d Update config.guess to recognize additional distros
The following distros were added: redhat, fedora, debian,
ubuntu, sles, slackware, and gentoo.
2010-07-02 14:46:11 -07:00
Brian Behlendorf eb85f6d7e8 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-02 14:05:04 -07:00
Brian Behlendorf 2fe7754343 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-02 14:02:28 -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 ddfa136302 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-07-01 20:48:17 -07:00
Brian Behlendorf 8728219d6a Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-01 20:45:43 -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 e5a5693222 Refresh autogen.sh products 2010-06-29 17:05:00 -07:00
Brian Behlendorf b4fa1a9544 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-06-29 17:00:20 -07:00
Brian Behlendorf 9c4837d5da Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-06-29 16:57:45 -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 1097607827 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-06-29 11:02:24 -07:00
Brian Behlendorf b8229898ab Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-06-29 10:59:58 -07:00
Brian Behlendorf 9af7aa53eb Set stack frame limit
For all module/library functions ensure so stack frame exceeds 1024
bytes.  Ideally this should be set lower to say 512 bytes but there
are still numerous functions which exceed even this limit.  For now
this is set to 1024 to ensure we catch the worst offenders.

Additionally, set the limit for ztest to 1024 bytes since the idea
here is to catch stack issues in user space before we find them by
overrunning a kernel stack.  This should also be reduced to 512
bytes as soon as all the trouble makes are fixed.

Finally, add -fstack-check to gcc build options when --enable-debug
is specified at configure time.  This ensures that each page on the
stack will be touched and we will generate a segfault on stack
overflow.

Over time we can gradually fix the following functions:

536 zfs:dsl_deadlist_regenerate
536 zfs:dsl_load_sets
536 zfs:zil_parse
544 zfs:zfs_ioc_recv
552 zfs:dsl_deadlist_insert_bpobj
552 zfs:vdev_dtl_sync
584 zfs:copy_create_perms
608 zfs:ddt_class_contains
608 zfs:ddt_prefetch
608 zfs:__dprintf
616 zfs:ddt_lookup
648 zfs:dsl_scan_ddt
696 zfs:dsl_deadlist_merge
736 zfs:ddt_zap_walk
744 zfs:dsl_prop_get_all_impl
872 zfs:dnode_evict_dbufs
2010-06-29 10:08:48 -07:00
Brian Behlendorf 343bcf823f Refresh autogen products with automake 1.11.1 2010-05-21 16:04:53 -07:00
Brian Behlendorf 89375ef80b Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-20 10:29:55 -07:00
Brian Behlendorf c6ea865e3a Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-05-20 10:24:05 -07:00
Brian Behlendorf b974e4bf4d Fix error message to reference the new libuuid package.
It used to be the case that libuuid was part of e2fsprogs.  However,
since other projects unrelated to e2fsprogs make use of that library
it was getting aukward to have that dependency.  The package was
split from e2fsprogs and moved to its own devel package in the
util-linux-ng project.  Anyway, I'm just updating the error message
to reflect the new upstream reality.
2010-05-20 10:00:03 -07:00
Brian Behlendorf d5c0441641 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-18 15:13:53 -07:00
Brian Behlendorf ccbfbcd223 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-05-18 15:11:35 -07:00
Brian Behlendorf 4e7fd8ff9d Move build system and core script changes to correct zfs-branch. 2010-05-18 15:05:44 -07:00
Brian Behlendorf ecb8603d26 Revert changes which don't belong on linux-configure-branch. 2010-05-18 15:04:19 -07:00
Brian Behlendorf 13ad721a84 Move user-arch.m4 change from linux-libspl to zfs-branch. 2010-05-18 12:26:48 -07:00