Commit Graph

415 Commits

Author SHA1 Message Date
Brian Behlendorf e1540e9cbb Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-19 15:30:32 -07:00
Brian Behlendorf db3436fafe Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-19 15:29:35 -07:00
Brian Behlendorf 2518c98d9e Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2009-03-19 15:29:34 -07:00
Brian Behlendorf c8c4948d00 Merge branch 'fix-dnode-cons' into refs/top-bases/fix-branch 2009-03-19 15:29:33 -07:00
Brian Behlendorf 60d25f4b93 The patch resolves the extra call to dnode_cons() in dnode_create().
The extra call to the constructor was there to reinitialize the non-
trivial primatives in the dnode (lists, mutexs, condvars, avl tree, etc).
This was safe, although not exactly clean, on Solaris because none of
the primitives allocate memory.  In the Linux port this is not true.
To keep stack usage to a minimum several of the primatives dynamically
allocate memory thus initializing them twice results in a memory leak.

This patch resolves this problem for Solaris and Linux by ensuring all
*_inits are called in the constructor, and all *_destroys are called
in the destructor.  Additionally we ensure that all dnode objects are
properly deconstructed before being freed to the slab, and when the
objects are allocated from the slab all required data members are
explicity initialized to correct values.
2009-03-19 15:22:48 -07:00
Brian Behlendorf fd3db92fe7 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-19 15:08:17 -07:00
Brian Behlendorf 90bbbd109b Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-19 15:07:19 -07:00
Brian Behlendorf f07d61a8c1 Merge branch 'fix-branch' into refs/top-bases/zfs-branch 2009-03-19 15:07:18 -07:00
Brian Behlendorf cc032b6337 Merge branch 'fix-list' into refs/top-bases/fix-branch 2009-03-19 15:07:16 -07:00
Brian Behlendorf 9bbf8f1761 Resolve conflict with fix-dnode-cons 2009-03-19 15:02:05 -07:00
Brian Behlendorf a9b0088f48 Use include missing zfs_config.h and use ZFS_META_VERSION (not VERSION) 2009-03-17 16:02:09 -07:00
Brian Behlendorf 5edabb999f Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-16 16:20:02 -07:00
Brian Behlendorf df985d53db Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-16 16:17:57 -07:00
Brian Behlendorf f86b52a39d Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-03-16 16:17:55 -07:00
Brian Behlendorf 3eebe1bd0e Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2009-03-16 16:17:54 -07:00
Brian Behlendorf 3eb4ba3ebd Add 3 more uninit errors detected by gcc 3.4.0 compiler. 2009-03-16 16:06:50 -07:00
Brian Behlendorf adf984639d Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-13 10:59:14 -07:00
Brian Behlendorf 486df2d11d Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-13 10:57:46 -07:00
Brian Behlendorf 36c46c6031 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-03-13 10:57:45 -07:00
Brian Behlendorf d2910d2415 Merge branch 'gcc-unused' into refs/top-bases/gcc-branch 2009-03-13 10:57:43 -07:00
Brian Behlendorf c98996ded8 Explicitly cast to prevent 'void *' dereference. 2009-03-13 10:51:11 -07:00
Brian Behlendorf 2ff032fd60 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-12 10:38:44 -07:00
Brian Behlendorf b9b399bf04 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-12 10:37:14 -07:00
Brian Behlendorf a03187bb3b Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-03-12 10:37:12 -07:00
Brian Behlendorf f8fe8a76f4 Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2009-03-12 10:37:11 -07:00
Brian Behlendorf cabd4a69c4 Resolve remaining uninitialized variables
Most of these fixes appear to be harmless and should never occur.
However, there were a few cases in this patch which do concern me,
I doubt we're seeing them but they look possible... mainly in the
user tools.
2009-03-12 10:30:41 -07:00
Brian Behlendorf 165b2611d2 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-12 10:01:25 -07:00
Brian Behlendorf dd30dba016 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-12 10:00:04 -07:00
Brian Behlendorf 193ea156e9 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-03-12 10:00:03 -07:00
Brian Behlendorf eceaf813ad Merge branch 'gcc-missing-case' into refs/top-bases/gcc-branch 2009-03-12 10:00:01 -07:00
Brian Behlendorf f2d72af596 Add remaining missing cases (or a default) to all switch statements.
The previous code was not wrong, but this prevents gcc from warning
us about missing cases for these known safe switch statements.  The
-Wno-missing-cases can now be removed to detect places where we
accidentally forgot a case.
2009-03-12 09:53:08 -07:00
Brian Behlendorf dadb99c29a Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-11 22:48:55 -07:00
Brian Behlendorf 909582a95e Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-11 22:47:56 -07:00
Brian Behlendorf 6211d1a370 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-03-11 22:47:54 -07:00
Brian Behlendorf a2dc88da2a Merge branch 'gcc-c90' into refs/top-bases/gcc-branch 2009-03-11 22:47:53 -07:00
Brian Behlendorf 462f864365 Check should be in ASSERT to minimize stack and prevent unused var. 2009-03-11 22:38:16 -07:00
Brian Behlendorf cb75043186 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-11 22:28:31 -07:00
Brian Behlendorf e625efa701 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-11 22:27:15 -07:00
Brian Behlendorf c9daa4fbd2 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-03-11 22:27:14 -07:00
Brian Behlendorf 246cae3509 Merge branch 'gcc-unused' into refs/top-bases/gcc-branch 2009-03-11 22:27:11 -07:00
Brian Behlendorf ecd2dbcb44 Resolve upstream unused variables so we can remove the -Wno-unused
compile option.  In most case the variables are only unused when
debugging is disabled (ASSERT) however they do waste stack if that
case if the compiler doesn't optimize it out (it should).  But more
importantly disabling this warning prevent us from noticing legit
unused variables accidentally left in other place of the code.
2009-03-11 22:07:25 -07:00
Brian Behlendorf b6616bd2c6 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-11 21:01:03 -07:00
Brian Behlendorf 4c042de40b Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-11 20:59:43 -07:00
Brian Behlendorf 60ac8152fe Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-03-11 20:59:42 -07:00
Brian Behlendorf 9915249546 Merge branch 'gcc-missing-braces' into refs/top-bases/gcc-branch 2009-03-11 20:53:11 -07:00
Brian Behlendorf d4dbc7dca8 Resolve all instances of missing braces. 2009-03-11 20:52:21 -07:00
Ricardo M. Correia 8680138968 Add missing EXPORT_SYMBOL() macro.
ZFS consumers such as Lustre should have access to these symbols.
2009-03-11 16:22:11 -07:00
Brian Behlendorf ab760deda7 Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2009-03-11 14:10:39 -07:00
Brian Behlendorf 1ca6578ebc Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2009-03-11 14:08:51 -07:00
Brian Behlendorf 8a3b1a5ff5 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2009-03-11 14:08:50 -07:00