Commit Graph

3750 Commits

Author SHA1 Message Date
Brian Behlendorf e348a9d4ad Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-08-12 15:55:53 -07:00
Brian Behlendorf 2e26d243e2 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-12 15:53:52 -07:00
Brian Behlendorf 775b428dfb Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-08-12 15:53:51 -07:00
Brian Behlendorf ef3c90de33 Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-08-12 15:53:50 -07:00
Brian Behlendorf afd34c561c Merge branch 'fix-taskq' into refs/top-bases/fix-branch 2010-08-12 15:53:49 -07:00
Brian Behlendorf abb4708772 Revert "Use inline version of __zio_execute"
This reverts commit 49177b6ab7.
2010-08-12 15:49:31 -07:00
Brian Behlendorf 8fc629997e Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-08-12 15:44:14 -07:00
Brian Behlendorf 7ded72a08d Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-12 15:42:12 -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 47b9bf778f Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-08-12 15:42:10 -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
Brian Behlendorf eca561bddb New TopGit dependency: fix-commit-callback 2010-08-12 15:36:24 -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 7b97c6b097 Add fix-commit-callback topic branch 2010-08-12 15:33:57 -07:00
Brian Behlendorf b8bc4c2cf6 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-08-12 15:25:09 -07:00
Brian Behlendorf 8cc3da98d0 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-12 15:23:10 -07:00
Brian Behlendorf baac50219c Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-08-12 15:23:10 -07:00
Brian Behlendorf 644830d967 Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-08-12 15:23:09 -07:00
Brian Behlendorf 6821ba2bbc Merge branch 'fix-taskq' into refs/top-bases/fix-branch 2010-08-12 15:23:08 -07:00
Ned Bass 49177b6ab7 Use inline version of __zio_execute
Explicitly call to inline version to minimize stack usage.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-08-12 15:18:43 -07:00
Brian Behlendorf 5c53d8becc Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-08-10 11:08:25 -07:00
Brian Behlendorf 8023513a30 Add zvol snapshot and clone tests
Add two additional basic sanity tests to confirm zvol snapshots
and clones work.  The snapshot test is basically the same as the
example provided in the wiki.  The clone test goes one step father
and clones the snapshot then modifies it to match the original
modified volume.  It them compares them to ensure everything was
modified as expected.

These are just meant to be sanity tests to catch obvious breakage
before tagging a release.  They are still not a substitute for a
full regression test suite.
2010-08-10 10:59:58 -07:00
Brian Behlendorf 049e6e8c03 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-08-09 16:53:28 -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 d5168aa089 Insert small delay for udev
While the zfs utilities do block until the expected device appears
they can only do this for full devices, not partitions.  This means
that once as device appears it still may take a little bit of time
before the kernel rescans the partition table, updates sysfs, udev
is notified and the partition devices are created.  The test case
itself could block briefly waiting for the partition beause it knows
what to expect.  But for now the simpler thing to do is just delay.
2010-08-09 16:43:54 -07:00
Brian Behlendorf 6478a7f847 Remove /zvol/ path component from zconfig.sh
See previous commit for details.  But the gist is with the removal of
the zvol path component the regression tests must be updated to use
the correct path name.
2010-08-09 16:43:33 -07:00
Brian Behlendorf b03dc3b357 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-08-06 10:55:16 -07:00
Brian Behlendorf 9e3e35dc3f Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-06 10:52:35 -07:00
Brian Behlendorf 8f8d2b66aa Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-08-06 10:52:34 -07:00
Brian Behlendorf 86b29c0b9c Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-08-06 10:47:03 -07:00
Brian Behlendorf 2e982255da Merge branch 'fix-zfs_ioc_objset_stats' into refs/top-bases/fix-branch 2010-08-06 10:47:02 -07:00
Brian Behlendorf 46e9b0989d New TopGit dependency: fix-zfs_ioc_objset_stats 2010-08-06 10:46:58 -07:00
Brian Behlendorf 89f0abf9b5 Add missing zfs_ioc_objset_stats() error handling
Interestingly this looks like an upstream bug as well.  If for some
reason we are unable to get a zvols statistics, because perhaps the
zpool is hopelessly corrupt, we would trigger the VERIFY.  This
commit adds the proper error handling just to propagate the error
back to user space.  Now the user space tools still must handle this
properly but in the worst case the tool will crash or perhaps have
some missing output.  That's far far better than crashing the host.

Closes #45
2010-08-06 10:46:39 -07:00
Brian Behlendorf 384b10ad9c Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-08-05 11:33:11 -07:00
Brian Behlendorf a6644f49a5 Add cleanup option -c to zconfig.sh
Several folks have now remarked that when the regression tests
fail they leave a mess behind.  This was done intentionally at
the time to facilitate debugging the wreckage.

However, this also means that you may need to do some manual
cleanup such as removing the loopback devices before re-running
the tests.  To simplify this proceedure I've added the '-c'
option to zconfig.sh which will attempt to cleanup the mess
from a previous test before starting.

This is somewhat dangerous because it must guess as to which
loopback devices you were using.  But this risk is fairly minimal
because devices which are currently still is use can not be
cleaned up.  And because only devices with 'zpool' in the name
are considered for removal.  That said if your running parallel
copies of say zconfig.sh this may cause you some trouble.
2010-08-05 11:24:04 -07:00
Brian Behlendorf 019953e0b7 Update zconfig to check partitions
Update the zconfig.sh test script to verify not only that volumes,
snapshots, and clones are created and removed properly.  But also
verify that the partition information for each of these types of
devices is properly enumerated by the kernel.

Tests 4 and 5 now also create two partitions on the original volume
and these partitions are expected to also exist on the snapshot and
the clone.  Correctness is verified after import/export, module
load/unload, dataset creation, and pool destruction.

Additionally, the code to create a partition table was refactored
in to a small helper function to simplify the test cases.  And
finally all of the function variables were flagged 'local' to ensure
their scope is limited.  This should have been done a while ago.
2010-08-05 11:22:33 -07:00
Brian Behlendorf 8c051ed3f4 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-08-03 16:04:24 -07:00
Brian Behlendorf 63a645c3c8 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-03 16:02:21 -07:00
Brian Behlendorf 1b9fd31ada Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-08-03 16:02:20 -07:00
Brian Behlendorf 2cb5528450 Merge branch 'fix-bpobj_close' into refs/top-bases/fix-branch 2010-08-03 15:56:53 -07:00
Brian Behlendorf 670b33090f Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-08-03 15:56:53 -07:00
Brian Behlendorf 84eae057e7 New TopGit dependency: fix-bpobj_close 2010-08-03 15:56:49 -07:00
Brian Behlendorf 3253b39fa6 Set bpo->bpo_object = 0 on close to allow retry
During spa_load the spl->spa_deferred_bpobj maybe be opened and closed
multiple times.  It's critical that when the object is closed the
bpo->bpo_object is set to zero to indicate the object is closed.
If it's not during spl_load_retry the spl->spa_deferred_bpobj can
be closes twice resulting in a NULL deref.

This appears to have been fixed upstream the same way.
2010-08-03 15:56:29 -07:00
Brian Behlendorf 6efff5aac6 Merge commit 'refs/top-bases/linux-sha2' into linux-sha2 2010-08-02 15:31:34 -07:00
Brian Behlendorf 8481c9b7bb Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-02 15:29:28 -07:00
Brian Behlendorf 7e9bdac1a8 Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-08-02 15:29:27 -07:00
Brian Behlendorf 8bf0a4e79c Merge branch 'fix-stack-inline' into refs/top-bases/fix-branch 2010-08-02 15:29:25 -07:00
Brian Behlendorf 78798f0ea5 Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-08-02 15:29:25 -07:00
Brian Behlendorf 45c00bf359 Fix spa_load_impl() prototype
Both the forward declaration of spa_load_impl() and the actual
function declaration must match.
2010-08-02 15:24:33 -07:00
Brian Behlendorf 52c23142d4 Revert "Inline zio_execute() to reduce stack use"
This reverts commit 411dd65af1.

gcc version 4.1.2 does not like having differing prototypes
for zio_execute, one version in the .c with inline and one
version in the .h without.  Thus I'm reverting this change
and we'll see how critical this particular stack reduction is.
2010-08-02 15:22:11 -07:00