Commit Graph

228 Commits

Author SHA1 Message Date
Brian Behlendorf f412e32773 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-08-12 21:28:04 -07:00
Brian Behlendorf 13eca9436e Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-08-12 21:28:00 -07:00
Brian Behlendorf a2a77e48ab Merge branch 'gcc-unused' into refs/top-bases/gcc-branch 2010-08-12 21:27:59 -07:00
Brian Behlendorf eed31a5029 Move unused function warning to gcc-unused topic branch
See commit 123b6b2f49.
2010-08-12 21:17:01 -07:00
Brian Behlendorf eaae9055a7 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2010-08-12 21:13:15 -07:00
Brian Behlendorf 123b6b2f49 Move unused function warning to gcc-unused topic branch
The ztest_pattern_match() function is only called from an ASSERT
and needs only to be defined when debugging is enabled.  This
change is to silence a gcc warning and belong with the other
gcc issues.  I'm moving it to the gcc-unused topic branch.
2010-08-12 21:05:24 -07:00
Brian Behlendorf e2f8f607ec Honor spa_config_path for ztest '-f' option
See commit d24fbedd01.
2010-08-12 21:04:29 -07:00
Brian Behlendorf 087782198b Merge branch 'linux-ztest' into refs/top-bases/linux-zfs-branch 2010-08-12 16:45:24 -07:00
Brian Behlendorf d24fbedd01 Honor spa_config_path for ztest '-f' option
The new spa_config_path string was lost from ztest_run_zdb() during
the onnv_141 merge.  This commit puts it back in place so the '-f'
option is properly honored.

Additionally this function had been tweaked so ztest could be run
in-tree but that broke running it when installed as a package.  I've
updated that chunk to detect where it's running and try to do the
right thing in both cases.

Closes #49
2010-08-12 16:40:16 -07:00
Brian Behlendorf a41008fceb Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-08-12 15:43:26 -07:00
Brian Behlendorf 37ed92aa16 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-08-12 15:42:54 -07:00
Brian Behlendorf 62e9e03ada Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-08-12 15:42:15 -07:00
Brian Behlendorf de99114352 Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-08-12 15:42:11 -07:00
Brian Behlendorf a1c9fee0c9 Merge branch 'fix-commit-callback' into refs/top-bases/fix-branch
Conflicts:

	cmd/ztest/ztest.c
2010-08-12 15:37:51 -07:00
Ricardo M. Correia 8af0664652 Fix upstream commit callback
The upstream commit cb code had a few bugs:

1) The arguments of the list_move_tail() call in txg_dispatch_callbacks()
were reversed by mistake. This caused the commit callbacks to not be
called at all.

2) ztest had a bug in ztest_dmu_commit_callbacks() where "error" was not
initialized correctly. This seems to have caused the test to always take
the simulated error code path, which made ztest unable to detect whether
commit cbs were being called for transactions that successfuly complete.

3) ztest had another bug in ztest_dmu_commit_callbacks() where the commit
cb threshold was not being compared correctly.

4) The commit cb taskq was using 'max_ncpus * 2' as the maxalloc argument
of taskq_create(), which could have caused unnecessary delays in the txg
sync thread.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-08-12 15:34:29 -07:00
Brian Behlendorf 640f5d9bdd Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-08-02 13:54:12 -07:00
Brian Behlendorf e34cd4b934 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-08-02 13:53:39 -07:00
Brian Behlendorf ec04ed0fbb Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-08-02 13:53:00 -07:00
Brian Behlendorf 5d145c70f1 Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-08-02 13:52:56 -07:00
Ned Bass bb20b03060 Move ztest_od_t structures to the heap
A number of ztest functions create one or more 312B ztest_od_t data
structures.  To conserve stack usage, this commit moves all of these data
structures to the heap.  However, I am still seeing ztest segfaults due
to heavy stack usage of the dbuf_findbp() -> dbuf_hold_impl() recursion.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-08-02 13:42:25 -07:00
Brian Behlendorf 16d31bf2ee Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-07-01 10:43:26 -07:00
Brian Behlendorf 7febafe089 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-07-01 10:42:50 -07:00
Brian Behlendorf a20538168a Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-07-01 10:42:04 -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 049a26b800 Merge branch 'gcc-fortify-source' into refs/top-bases/gcc-branch 2010-07-01 10:41:59 -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 fe14b6802a Merge branch 'linux-ztest' into refs/top-bases/linux-zfs-branch 2010-06-29 13:43:26 -07:00
Brian Behlendorf 82360d2362 Move local variables to heap
We were already modifing this function so it would run in the
local development environment, so let's just do the stack fixes
here are well.  It's all simple enough.
2010-06-29 13:09:51 -07:00
Brian Behlendorf 43088d22ad Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-06-29 11:35:56 -07:00
Brian Behlendorf 36ef3e92c2 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-06-29 11:35:22 -07:00
Brian Behlendorf 8af57a28ce Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-06-29 11:34:42 -07:00
Brian Behlendorf a0796cadf7 Merge branch 'fix-branch' into refs/top-bases/zfs-branch
Conflicts:

	cmd/ztest/ztest.c
2010-06-29 11:34:31 -07:00
Brian Behlendorf ef01098ef4 Reduce stack used by ztest
While ztest does run in user space we run it with the same stack
restrictions it would have in kernel space.  This ensures that any
stack related issues which would be hit in the kernel can be caught
and debugged in user space instead.

This patch is a first pass to limit the stack usage of every ztest
function to 1024 bytes.  Subsequent updates can further reduce this
2010-06-29 11:25:08 -07:00
Brian Behlendorf e6bcb5c246 Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-06-29 11:01:11 -07:00
Brian Behlendorf bc9ce64c43 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-06-29 11:00:38 -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 ffeafc898e Merge branch 'fix-branch' into refs/top-bases/zfs-branch
Conflicts:

	cmd/ztest/ztest.c
2010-06-29 10:55:38 -07:00
Brian Behlendorf 6fe1e37a5e Additional pthread related fixes for ztest
There are 3 fixes in thie commit.  First, update ztest_run() to store
the thread id and not the address of the kthread_t.  This will be freed
on thread exit and is not safe to use.  This is pretty close to how
things were done in the original ztest code before I got there.

Second, for extra paranoia update thread_exit() to return a special
TS_MAGIC value via pthread_exit().  This value is then verified in
pthread_join() to ensure the thread exited cleanly.  This can be
done cleanly because the kthread doesn't provide a return code
mechanism we need to worry about.

Third, replace the ztest deadman thread with a signal handler.  We
cannot use the previous approach because the correct behavior for
pthreads is to wait for all threads to exit before terminating the
process.  Since the deadman thread won't call exit by design we
end up hanging in kernel_exit().  To avoid this we just setup a
SIGALRM signal handle and register a deadman alarm.  IMHO this
is simpler and cleaner anyway.
2010-06-29 10:06:09 -07:00
Brian Behlendorf f44dd08b58 Merge branch 'linux-ztest' into refs/top-bases/linux-zfs-branch 2010-06-28 11:31:50 -07:00
Brian Behlendorf 882ec504ea Minor ztest fixes
Move create/destroy function to correct places.  I'm not sure why
this wasn't caught upstream it should have been, regardless let's
just fix it here.

Personally I find it handy to be able to enable full debugging in
zfs with the 'debug=' command line option so I'm enabled that as
well.
2010-06-28 11:23:50 -07:00
Brian Behlendorf ec2aedc3f3 Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-06-14 16:29:00 -07:00
Brian Behlendorf 5331e9f1f8 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-06-14 16:28:28 -07:00
Brian Behlendorf 1aeae83705 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-06-14 16:27:50 -07:00
Brian Behlendorf eb894076a4 Merge branch 'fix-branch' into refs/top-bases/zfs-branch
Conflicts:

	cmd/ztest/ztest.c
2010-06-14 16:24:45 -07:00
Brian Behlendorf f9f342c5f2 Add fix-pthreads topic branch
This is a portability change which removes the dependence of the Solaris
thread library.  All locations where Solaris thread API was used before
have been replaced with equivilant Solaris kernel style thread calls.
In user space the kernel style threading API is implemented in term of
the portable pthreads library.  This includes all threads, mutexs,
condition variables, reader/writer locks, and taskqs.
2010-06-14 16:20:44 -07:00
Brian Behlendorf 9193fdea7e Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2010-06-14 16:10:54 -07:00
Brian Behlendorf 302238d84f Update linux-user-disk
Minor updates to handle changes in the user side of ZFS, utils and such.
2010-06-14 16:03:02 -07:00
Brian Behlendorf 0e2926b142 Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-06-14 15:38:26 -07:00
Brian Behlendorf e796e2a03e Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-06-14 15:37:10 -07:00
Brian Behlendorf d9f910d423 Merge branch 'gcc-missing-case' into refs/top-bases/gcc-branch 2010-06-14 15:36:59 -07:00