Commit Graph

4150 Commits

Author SHA1 Message Date
Brian Behlendorf db9877dcb0 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-16 21:12:05 -07:00
Brian Behlendorf 204ed75462 Cleanly handle partitions in zpool_layout
I knew I'd forget something in the first version of this script.
It turns out what I forgot was partition handling, this commit
ensures duplicate entries are not created in the zdev.conf file.
This previously could occur due to partition entires in the by-path
directory.  This is not needed the existing udev rules will ensure
the partitions are created in /dev/disk/zpool/.
2010-08-16 20:58:43 -07:00
Brian Behlendorf bfefda9ef9 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-16 16:43:51 -07:00
Sebastian Pipping e69bd526c1 Make interlibrary dependencies explicit
Under the latest Gentoo (2.6.34-gentoo-r2) the interlibrary
dependencies must be made explicit.  This is likely due to
the --as-needed linker option which is commonly used under
Gentoo.  This option requires that the linker only include
the minimum set of symbols required by the binary.  Without
the full dependency tree the linker would need to bring in
all the symbols from dependent libraries.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-08-16 16:24:36 -07:00
Brian Behlendorf b406fe1831 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-16 16:16:37 -07:00
Brian Behlendorf 7f939f28eb Add zpool_layout command
The zpool_layout command is designed to automatically scan the
udev /dev/disk/by-path directory and generate a /etc/zfs/zdev.conf
file.  It does this by enumerating the disks attached to the
specified buses/ports and sequentially mapping them to short
<channel><rank> names in /dev/disk/zpool/.  This tool should only
be run after all the available disks have been discovered.  And
the resulting config file does not need to be regenerated unless
your backend configuration changes.
2010-08-16 15:54:06 -07:00
Brian Behlendorf f5f31392a3 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-13 11:01:35 -07:00
Brian Behlendorf 96c653a09b Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-13 11:01:26 -07:00
Brian Behlendorf 946cb083b2 Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2010-08-13 11:01:25 -07:00
Brian Behlendorf 2d6e416f05 Merge commit 'refs/top-bases/fix-branch' into fix-branch 2010-08-13 10:56:52 -07:00
Brian Behlendorf c3e541b62c Merge branch 'fix-stack-zio_execute' into refs/top-bases/fix-branch 2010-08-13 10:56:51 -07:00
Brian Behlendorf e47d393490 New TopGit dependency: fix-stack-zio_execute 2010-08-13 10:56:48 -07:00
Brian Behlendorf 4264b20440 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-13 09:45:08 -07:00
Brian Behlendorf c134b523ac Prep for zfs-0.5.0 tag 2010-08-13 09:39:09 -07:00
Brian Behlendorf 08f890c8d8 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-12 21:28:10 -07:00
Brian Behlendorf 5bbc3e2a68 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-08-12 21:28:01 -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 380ce7b8eb Merge commit 'refs/top-bases/gcc-branch' into gcc-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 a1f90df3db Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2010-08-12 21:27:59 -07:00
Brian Behlendorf 2b89d86fff Initialize resid variable
Properly initialize the variable resid for the error case where
vn_rdwr() returns an error with setting *resid.  In practice
this is harmless because the contents of resid don't matter
when vn_rdwr() returns an error.  But the code does check the
result which means we may or may not end up having the check
zio->io_error.  This makes gcc unhappy and having a completely
deterministic code path here is a good thing.

Closes #51
2010-08-12 21:19:01 -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 7a44418dfc Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-12 15:54:00 -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 b53d834575 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-12 15:42:21 -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 cc5f8ceccf Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-12 15:23:19 -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
Ned Bass 2e3c7a06c2 Wrap zio_execute() to enable inlining
Implement zio_execute() as a wrapper around the static function
__zio_execute() so that we can force  __zio_execute() to be inlined.
This reduces stack overhead which is important because __zio_execute()
is called recursively in several zio code paths.  zio_execute() itself
cannot be inlined because it is externally visible.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2010-08-12 15:18:18 -07:00
Brian Behlendorf 1f147a2f54 Add fix-stack-zio_execute topic branch 2010-08-12 15:16:55 -07:00
Brian Behlendorf 6b655f7852 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-10 11:06:02 -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 bbcc7cba51 Merge commit 'refs/top-bases/linux-have-spl-debug' into linux-have-spl-debug 2010-08-09 16:51:13 -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