Commit Graph

1177 Commits

Author SHA1 Message Date
Brian Behlendorf aa90238713 Merge branch 'fix-pthreads' into refs/top-bases/fix-branch 2010-06-29 10:12:03 -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 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 d753fa7a12 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-06-28 11:32:55 -07:00
Brian Behlendorf 90fa1ce7d6 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-06-28 11:32:19 -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 01f2707edd Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-06-28 11:31:48 -07:00
Brian Behlendorf fbed3151dd Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-06-28 11:31:17 -07:00
Brian Behlendorf 5b33cbea31 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-06-28 11:30:39 -07:00
Brian Behlendorf 843af873bf Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-06-28 11:30:36 -07:00
Brian Behlendorf 17a1689bd4 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-06-28 11:30:35 -07:00
Brian Behlendorf c2793dd0c7 Merge branch 'gcc-missing-braces' into refs/top-bases/gcc-branch 2010-06-28 11:30:34 -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 5b02d6c084 Zero struct for zdb dump_block_stats
Accidentally dropped the zeroing of this structure in the
gcc-missing-braces topic branch which was causing a fall positive
space leak in ztest.  Ensure the structure is zero'ed before use.
2010-06-28 10:48:24 -07:00
Brian Behlendorf 313e7e2f37 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-06-16 12:21:20 -07:00
Brian Behlendorf 64b81f7c25 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-06-16 12:17:51 -07:00
Brian Behlendorf 2acd3f767a Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-06-16 12:16:14 -07:00
Brian Behlendorf 999ab921b0 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-06-16 12:14:05 -07:00
Brian Behlendorf b8ece25717 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-06-16 12:11:25 -07:00
Brian Behlendorf 9fd12ce4fd Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-06-16 12:11:21 -07:00
Brian Behlendorf 2b71569742 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-06-16 12:11:20 -07:00
Brian Behlendorf 877a37d8bd Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2010-06-16 12:11:18 -07:00
Brian Behlendorf 8a001d8f59 Extra uninit vars flagged by gcc 4.1.2
Newer versions of the compiler are OK with this but for the sake of
older compilers explicitly initialize them.
2010-06-16 11:45:07 -07:00
Brian Behlendorf b5a6742d61 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-06-14 16:29:54 -07:00
Brian Behlendorf 832eb9444f Merge commit 'refs/top-bases/linux-events' into linux-events 2010-06-14 16:29:25 -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 08060ef853 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-06-14 16:25:02 -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 2969945552 Merge branch 'fix-pthreads' into refs/top-bases/fix-branch 2010-06-14 16:22:00 -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 2d29b62621 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-06-14 16:11:10 -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 1b55fad32f Updates to linux-user-disk
The major change is removing the thread pool when importing devices.
This may be reintroduced at some point if needed, but it is added
complexity which has already been handled by blkid on modern Linux
systems.  We only need to fallback to probing everything is /dev/
if you config file is toast and even then it only takes a few seconds.
2010-06-14 15:59:11 -07:00
Brian Behlendorf 71f9f188cf Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-06-14 15:54:00 -07:00
Brian Behlendorf f9e717f642 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-06-14 15:53:31 -07:00
Brian Behlendorf fb6b47d82e Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-06-14 15:53:07 -07:00
Brian Behlendorf 0c0ea412b3 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-06-14 15:52:34 -07:00
Brian Behlendorf fb35fe3bc1 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-06-14 15:51:56 -07:00
Brian Behlendorf 06b5dc883f Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-06-14 15:51:52 -07:00
Brian Behlendorf 953aa00176 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-06-14 15:51:51 -07:00
Brian Behlendorf 5fa2cb516b Merge branch 'gcc-missing-braces' into refs/top-bases/gcc-branch 2010-06-14 15:51:50 -07:00
Brian Behlendorf 696ec7fb61 Update gcc-missing-braces based on structure changes
Almost exclusively this patch handled the addition of another char
array to the zfs_cmd_t structure.  Unfortunately c90 doesn't allow
zero filling the entire struct with the '= { 0 };' shorthand.
2010-06-14 15:44:06 -07:00
Brian Behlendorf 909f2326b5 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-06-14 15:39:21 -07:00
Brian Behlendorf c52a71873a Merge commit 'refs/top-bases/linux-events' into linux-events 2010-06-14 15:38:51 -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 d860bca64c Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-06-14 15:37:52 -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 7eadc495c6 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-06-14 15:37:05 -07:00
Brian Behlendorf b5ba75f385 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-06-14 15:37:03 -07:00
Brian Behlendorf dfe881c0ef Merge branch 'gcc-unused' into refs/top-bases/gcc-branch 2010-06-14 15:37:01 -07:00
Brian Behlendorf 1e7a75049a Merge branch 'gcc-uninit' into refs/top-bases/gcc-branch 2010-06-14 15:37:00 -07:00
Brian Behlendorf d9f910d423 Merge branch 'gcc-missing-case' into refs/top-bases/gcc-branch 2010-06-14 15:36:59 -07:00
Brian Behlendorf 993fa8c15c Merge branch 'gcc-invalid-prototype' into refs/top-bases/gcc-branch 2010-06-14 15:36:59 -07:00
Brian Behlendorf 2c95012288 Merge branch 'gcc-c90' into refs/top-bases/gcc-branch 2010-06-14 15:36:59 -07:00
Brian Behlendorf d8e123dc27 Update gcc-unused
Fix new instances or changes in gcc flagged unused code.  These are
mostly related to variables which are not used when debugging is
disabled and the ASSERTs are compiled out.
2010-06-14 15:29:48 -07:00
Brian Behlendorf b41463f5e8 Update gcc-invalid-prototypes
Fix new invalid prototypes, typically just a missing void arg.
2010-06-14 15:25:49 -07:00
Brian Behlendorf b320a7bb4b Update gcc-unit
Fix new possibly uninitialized variables according to gcc.
2010-06-14 15:24:20 -07:00
Brian Behlendorf 0a8593375e Update gcc-missing-case
Fix new locations of an incomplete case statement.
2010-06-14 15:19:09 -07:00
Brian Behlendorf 48bd88f014 Update gcc-c90
Additional c90 fixes required due to ZFS update, these include fixing new
places c99 specific things have been done and some cleanup of old usage.
2010-06-14 15:15:26 -07:00
Brian Behlendorf 112c20eb8b Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-06-14 14:44:57 -07:00
Brian Behlendorf 6b17084f5f Merge commit 'refs/top-bases/linux-events' into linux-events 2010-06-14 14:44:31 -07:00
Brian Behlendorf 09c1313761 Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-06-14 14:44:09 -07:00
Brian Behlendorf 47e0108ff6 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-06-14 14:43:39 -07:00
Brian Behlendorf 4152507366 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-06-14 14:43:02 -07:00
Brian Behlendorf bdf5763c0a Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-06-14 14:42:58 -07:00
Brian Behlendorf 9f9a451561 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch 2010-06-14 14:42:57 -07:00
Brian Behlendorf fc490c18b6 Merge branch 'gcc-cast' into refs/top-bases/gcc-branch 2010-06-14 14:42:56 -07:00
Brian Behlendorf dd8f6da3da Update gcc-cast
Fix new instances of missing casts or assumed types.
2010-06-14 14:40:10 -07:00
Brian Behlendorf 98c6ae53c8 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-28 22:25:41 -07:00
Brian Behlendorf a054b40984 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch
Conflicts:
	cmd/zpool/zpool_main.c
2010-05-28 22:20:07 -07:00
Brian Behlendorf b41143632b Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch
Conflicts:
	cmd/zpool/zpool_main.c
	cmd/zpool/zpool_vdev.c
	cmd/ztest/ztest.c
	lib/libzfs/libzfs_dataset.c
	lib/libzfs/libzfs_import.c
	lib/libzfs/libzfs_mount.c
	lib/libzfs/libzfs_pool.c
	lib/libzfs/libzfs_sendrecv.c
	lib/libzpool/include/sys/zfs_context.h
	module/zcommon/include/sys/fs/zfs.h
	module/zcommon/zfs_comutil.c
	module/zfs/arc.c
	module/zfs/dmu.c
	module/zfs/dmu_objset.c
	module/zfs/dmu_send.c
	module/zfs/dmu_tx.c
	module/zfs/dsl_dataset.c
	module/zfs/dsl_dir.c
	module/zfs/dsl_scrub.c
	module/zfs/fm.c
	module/zfs/include/sys/dmu.h
	module/zfs/include/sys/fm/fs/zfs.h
	module/zfs/include/sys/fm/protocol.h
	module/zfs/include/sys/spa.h
	module/zfs/include/sys/zfs_context.h
	module/zfs/include/sys/zfs_ioctl.h
	module/zfs/include/sys/zvol.h
	module/zfs/spa.c
	module/zfs/spa_boot.c
	module/zfs/spa_history.c
	module/zfs/spa_misc.c
	module/zfs/txg.c
	module/zfs/vdev.c
	module/zfs/zfs_fm.c
	module/zfs/zfs_ioctl.c
	module/zfs/zfs_replay.c
	module/zfs/zfs_znode.c
	module/zfs/zil.c
	module/zfs/zio.c
2010-05-28 22:14:39 -07:00
Brian Behlendorf d78690fcd9 Merge commit 'refs/top-bases/linux-ztest' into linux-ztest
Conflicts:
	cmd/ztest/ztest.c
2010-05-28 21:44:27 -07:00
Brian Behlendorf 8c67d72771 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk
Conflicts:
	cmd/zpool/zpool_main.c
	cmd/zpool/zpool_vdev.c
	lib/libzfs/libzfs_dataset.c
	lib/libzfs/libzfs_import.c
	lib/libzfs/libzfs_mount.c
	lib/libzfs/libzfs_pool.c
2010-05-28 21:41:17 -07:00
Brian Behlendorf 7008960b9e Merge commit 'refs/top-bases/linux-events' into linux-events
Conflicts:
	lib/libzpool/include/sys/zfs_context.h
	module/zcommon/include/sys/fs/zfs.h
	module/zfs/dsl_scrub.c
	module/zfs/fm.c
	module/zfs/include/sys/fm/fs/zfs.h
	module/zfs/include/sys/fm/protocol.h
	module/zfs/include/sys/spa.h
	module/zfs/include/sys/zfs_context.h
	module/zfs/spa.c
	module/zfs/spa_misc.c
	module/zfs/vdev.c
	module/zfs/zfs_fm.c
2010-05-28 16:42:29 -07:00
Brian Behlendorf 812761eac5 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch
Conflicts:
	cmd/ztest/ztest.c
2010-05-28 15:46:10 -07:00
Brian Behlendorf e27754d9e8 Merge branch 'gcc-branch' into refs/top-bases/zfs-branch
Conflicts:
	cmd/ztest/ztest.c
	lib/libzfs/libzfs_sendrecv.c
	module/zfs/dmu_objset.c
	module/zfs/dnode.c
	module/zfs/dnode_sync.c
	module/zfs/dsl_dataset.c
	module/zfs/include/sys/dmu_tx.h
	module/zfs/include/sys/txg.h
	module/zfs/spa_history.c
2010-05-28 15:45:38 -07:00
Brian Behlendorf d8f9623833 Merge branch 'gcc-invalid-prototype' into refs/top-bases/gcc-branch
Conflicts:
	cmd/zdb/zdb_il.c
2010-05-28 15:38:05 -07:00
Brian Behlendorf 97352d5103 Merge branch 'gcc-cast' into refs/top-bases/gcc-branch
Conflicts:
	cmd/zpool/zpool_main.c
	cmd/ztest/ztest.c
2010-05-28 15:37:31 -07:00
Brian Behlendorf 3e2be634a5 Merge branch 'gcc-c90' into refs/top-bases/gcc-branch
Conflicts:
	cmd/zdb/zdb.c
	cmd/zdb/zdb_il.c
	cmd/zfs/zfs_main.c
	cmd/zfs/zfs_util.h
	cmd/zinject/zinject.h
	cmd/zpool/zpool_main.c
	cmd/zpool/zpool_util.c
	cmd/ztest/ztest.c
	lib/libnvpair/include/libnvpair.h
	lib/libnvpair/libnvpair.c
	lib/libzfs/libzfs_changelist.c
	lib/libzfs/libzfs_config.c
	lib/libzfs/libzfs_dataset.c
	lib/libzfs/libzfs_import.c
	lib/libzfs/libzfs_mount.c
	lib/libzfs/libzfs_pool.c
	lib/libzfs/libzfs_sendrecv.c
	module/avl/avl.c
	module/avl/include/sys/avl.h
	module/nvpair/include/sys/nvpair.h
	module/nvpair/nvpair.c
	module/zcommon/include/zfs_comutil.h
	module/zcommon/include/zfs_prop.h
	module/zcommon/zfs_comutil.c
	module/zfs/arc.c
	module/zfs/dbuf.c
	module/zfs/dmu.c
	module/zfs/dmu_objset.c
	module/zfs/dmu_zfetch.c
	module/zfs/dnode_sync.c
	module/zfs/dsl_dataset.c
	module/zfs/dsl_pool.c
	module/zfs/dsl_prop.c
	module/zfs/dsl_synctask.c
	module/zfs/include/sys/dmu_tx.h
	module/zfs/include/sys/dmu_zfetch.h
	module/zfs/include/sys/dsl_synctask.h
	module/zfs/include/sys/refcount.h
	module/zfs/include/sys/txg.h
	module/zfs/include/sys/uberblock.h
	module/zfs/include/sys/zap_leaf.h
	module/zfs/include/sys/zfs_debug.h
	module/zfs/include/sys/zfs_znode.h
	module/zfs/include/sys/zio_compress.h
	module/zfs/include/sys/zvol.h
	module/zfs/lzjb.c
	module/zfs/metaslab.c
	module/zfs/refcount.c
	module/zfs/sha256.c
	module/zfs/spa.c
	module/zfs/spa_boot.c
	module/zfs/uberblock.c
	module/zfs/vdev.c
	module/zfs/zap_micro.c
	module/zfs/zfs_ioctl.c
	module/zfs/zfs_replay.c
	module/zfs/zio.c
	module/zfs/zio_compress.c
2010-05-28 15:34:57 -07:00
Brian Behlendorf d60fc5ca30 Merge commit 'refs/top-bases/gcc-unused' into gcc-unused
Conflicts:
	module/zfs/dbuf.c
	module/zfs/dmu.c
	module/zfs/dmu_objset.c
	module/zfs/dnode_sync.c
	module/zfs/dsl_dataset.c
	module/zfs/dsl_prop.c
	module/zfs/metaslab.c
	module/zfs/spa.c
	module/zfs/vdev.c
	module/zfs/zap_micro.c
2010-05-28 15:07:36 -07:00
Brian Behlendorf cd47feb3c8 Merge commit 'refs/top-bases/gcc-uninit' into gcc-uninit
Conflicts:
	cmd/zpool/zpool_main.c
	cmd/ztest/ztest.c
	module/zfs/arc.c
2010-05-28 14:56:00 -07:00
Brian Behlendorf abfb2a3e1d Merge commit 'refs/top-bases/gcc-missing-case' into gcc-missing-case
Conflicts:
	lib/libzfs/libzfs_changelist.c
	module/zfs/spa.c
	module/zfs/zfs_ioctl.c
2010-05-28 14:49:40 -07:00
Brian Behlendorf 3571832262 Merge commit 'refs/top-bases/gcc-missing-braces' into gcc-missing-braces
Conflicts:
	cmd/zdb/zdb.c
	cmd/ztest/ztest.c
	lib/libzfs/libzfs_dataset.c
	lib/libzfs/libzfs_pool.c
	lib/libzfs/libzfs_sendrecv.c
2010-05-28 14:46:39 -07:00
Brian Behlendorf 2591cac812 Merge commit 'refs/top-bases/gcc-invalid-prototype' into gcc-invalid-prototype
Conflicts:
	cmd/zdb/zdb_il.c
	cmd/ztest/ztest.c
	lib/libzfs/libzfs_mount.c
2010-05-28 14:42:40 -07:00
Brian Behlendorf 1be88bcba0 Merge commit 'refs/top-bases/gcc-fortify-source' into gcc-fortify-source
Conflicts:
	cmd/zdb/zdb.c
2010-05-28 14:37:39 -07:00
Brian Behlendorf 475bf41d1c Merge commit 'refs/top-bases/gcc-cast' into gcc-cast
Conflicts:
	cmd/zfs/zfs_main.c
	cmd/zpool/zpool_main.c
	cmd/ztest/ztest.c
2010-05-28 14:36:18 -07:00
Brian Behlendorf 957b7b41d4 Merge commit 'refs/top-bases/gcc-c90' into gcc-c90
Conflicts:
	cmd/zdb/zdb.c
	cmd/ztest/ztest.c
	module/zfs/dbuf.c
	module/zfs/dsl_dataset.c
	module/zfs/dsl_scrub.c
	module/zfs/spa.c
	module/zfs/vdev.c
	module/zfs/zio.c
2010-05-28 14:19:22 -07:00
Brian Behlendorf 31630287ca Merge branch 'fix-dbuf_dirty_record_t' into refs/top-bases/fix-branch
Conflicts:
	lib/libzfs/libzfs_sendrecv.c
	module/zfs/dmu_objset.c
	module/zfs/dnode.c
	module/zfs/dsl_dataset.c
	module/zfs/spa_history.c
2010-05-28 13:51:29 -07:00
Brian Behlendorf 428870ff73 Update core ZFS code from build 121 to build 141. 2010-05-28 13:45:14 -07:00
Brian Behlendorf 37ecc84897 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-27 16:24:01 -07:00
Brian Behlendorf 4c03b2d914 Merge commit 'refs/top-bases/linux-events' into linux-events 2010-05-27 16:23:26 -07:00
Brian Behlendorf 0d354b53b6 Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-05-27 16:22:55 -07:00
Brian Behlendorf b23468df87 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-05-27 16:22:13 -07:00
Brian Behlendorf a08f4edee7 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-05-27 16:21:20 -07:00
Brian Behlendorf ea431b4dc6 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-05-27 16:14:04 -07:00
Brian Behlendorf 319f69734b Merge branch 'feature-branch' into refs/top-bases/zfs-branch
Conflicts:
	cmd/ztest/ztest.c
2010-05-27 16:13:19 -07:00
Brian Behlendorf 390995db28 Revert all remaining changes. 2010-05-27 14:25:06 -07:00
Brian Behlendorf 4e00654d55 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-27 13:53:16 -07:00
Brian Behlendorf fd3ff8f53e Merge commit 'refs/top-bases/linux-events' into linux-events 2010-05-27 13:52:09 -07:00
Brian Behlendorf 64c35deecd Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-05-27 13:52:02 -07:00
Brian Behlendorf 9a6d4c547a Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-05-27 13:51:51 -07:00
Brian Behlendorf 5cad1e175d Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch
Conflicts:
	module/zfs/dmu_tx.c
	module/zfs/txg.c
2010-05-27 13:48:54 -07:00
Brian Behlendorf d8e5eb56b8 Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2010-05-27 13:42:00 -07:00
Brian Behlendorf 028e42b692 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-05-27 13:42:00 -07:00
Brian Behlendorf cde6e6fec8 Merge commit 'refs/top-bases/feature-branch' into feature-branch 2010-05-27 13:40:15 -07:00
Brian Behlendorf 1e32b3c781 Revert feature-commit-cb feature upstream
We can drop this feature and we will pick up the lastest version
during the b141 update.
2010-05-27 13:39:17 -07:00
Brian Behlendorf 4b3317d13f Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-27 13:37:44 -07:00
Brian Behlendorf 48ef5ee10e Merge commit 'refs/top-bases/linux-events' into linux-events 2010-05-27 13:37:35 -07:00
Brian Behlendorf c886f405ea Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-05-27 13:37:28 -07:00
Brian Behlendorf 9f83c4b546 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk
Conflicts:
	lib/libzpool/kernel.c
2010-05-27 13:36:18 -07:00
Brian Behlendorf 95885a2f68 Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch
Conflicts:
	lib/libzpool/include/sys/zfs_context.h
	lib/libzpool/kernel.c
2010-05-27 13:35:09 -07:00
Brian Behlendorf c17d3e05eb Merge branch 'feature-branch' into refs/top-bases/zfs-branch 2010-05-27 13:32:58 -07:00
Brian Behlendorf 51536ea5f4 Merge commit 'refs/top-bases/zfs-branch' into zfs-branch 2010-05-27 13:32:58 -07:00
Brian Behlendorf a082023842 Merge commit 'refs/top-bases/feature-branch' into feature-branch
Conflicts:
	cmd/ztest/ztest.c
	lib/libzpool/include/sys/zfs_context.h
	lib/libzpool/kernel.c
	lib/libzpool/taskq.c
2010-05-27 13:30:48 -07:00
Brian Behlendorf 099e8e493a Remove feature-pthreads prior to b141 update.
The pthreads change will need to be reworked and reapplied.
This will be easier to do from scratch rather than sort out
the merge.
2010-05-27 13:23:58 -07:00
Brian Behlendorf 343bcf823f Refresh autogen products with automake 1.11.1 2010-05-21 16:04:53 -07:00
Brian Behlendorf e3a272f273 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-21 15:37:10 -07:00
Brian Behlendorf 542052314e Merge branch 'linux-events' into refs/top-bases/linux-zfs-branch 2010-05-21 15:35:53 -07:00
Brian Behlendorf 1573fc9932 Cast to (const time_t *) to fix compiler type warning. 2010-05-21 15:06:25 -07:00
Brian Behlendorf 3193647679 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-21 10:51:52 -07:00
Brian Behlendorf 14152c7b2c Merge branch 'linux-user-util' into refs/top-bases/linux-zfs-branch 2010-05-21 10:49:47 -07:00
Brian Behlendorf 868e5de066 Add linux-user-util topic branch.
This topic branch contains required changes to the user space
utilities to allow them to integrate cleanly with Linux.
2010-05-21 10:47:59 -07:00
Brian Behlendorf 13ed2ef931 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-21 10:44:31 -07:00
Brian Behlendorf 3b79eba6d7 Merge branch 'linux-debug-zerocopy' into refs/top-bases/linux-zfs-branch 2010-05-21 10:44:28 -07:00
Brian Behlendorf a876892309 Revert user space changes from linux-kernel-module topic branch.
These changes do not belong on linux-kernel-module since they
are tweaks to user space utilities.  I'm reverting them from
this topic branch and will be moving them to a new topic branch
which can be used for just this sort of thing.
2010-05-21 10:40:09 -07:00
Brian Behlendorf 8f44115907 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-18 14:23:10 -07:00
Brian Behlendorf 630ce17804 Merge branch 'linux-zpios' into refs/top-bases/linux-zfs-branch 2010-05-18 14:23:08 -07:00
Brian Behlendorf 86f961b310 Update all zpios related headers for consistency and correctness. 2010-05-18 14:18:09 -07:00
Brian Behlendorf 6e06d537fe Refresh autogen products 2010-05-14 13:36:31 -07:00
Brian Behlendorf d6f1f21cae Merge commit 'refs/top-bases/linux-kernel-module' into linux-kernel-module 2010-05-14 13:31:27 -07:00
Brian Behlendorf 66c45ef1f4 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-05-14 12:59:08 -07:00
Brian Behlendorf feb723fa7d Merge branch 'linux-events' into refs/top-bases/linux-zfs-branch 2010-05-14 12:55:10 -07:00
Brian Behlendorf 474981ffac Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-05-14 12:54:50 -07:00
Brian Behlendorf bbfb1eeb4c Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-05-14 12:54:23 -07:00
Brian Behlendorf 9d8124099b Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-05-14 12:54:14 -07:00
Brian Behlendorf 7d30d5032a Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2010-05-14 12:53:12 -07:00
Brian Behlendorf 97d19a5e45 Add linux-events topic branch for zevent handling.
This topic branch leverages the Solaris style FMA call points
in ZFS to create a user space visible event notification system
under Linux.  This new system is called zevent and it unifies
all previous Solaris style ereports and sysevent notifications.

Under this Linux specific scheme when a sysevent or ereport event
occurs an nvlist describing the event is created which looks almost
exactly like a Solaris ereport.  These events are queued up in the
kernel when they occur and conditionally logged to the console.
It is then up to a user space application to consume the events
and do whatever it likes with them.

To make this possible the existing /dev/zfs ABI has been extended
with two new ioctls which behave as follows.

* ZFS_IOC_EVENTS_NEXT
Get the next pending event.  The kernel will keep track of the last
event consumed by the file descriptor and provide the next one if
available.  If no new events are available the ioctl() will block
waiting for the next event.  This ioctl may also be called in a
non-blocking mode by setting zc.zc_guid = ZEVENT_NONBLOCK.  In the
non-blocking case if no events are available ENOENT will be returned.
It is possible that ESHUTDOWN will be returned if the ioctl() is
called while module unloading is in progress.  And finally ENOMEM
may occur if the provided nvlist buffer is not large enough to
contain the entire event.

* ZFS_IOC_EVENTS_CLEAR
Clear are events queued by the kernel.  The kernel will keep a fairly
large number of recent events queued, use this ioctl to clear the
in kernel list.  This will effect all user space processes consuming
events.

The zpool command has been extended to use this events ABI with the
'events' subcommand.  You may run 'zpool events -v' to output a
verbose log of all recent events.  This is very similar to the
Solaris 'fmdump -ev' command with the key difference being it also
includes what would be considered sysevents under Solaris.  You
may also run in follow mode with the '-f' option.  To clear the
in kernel event queue use the '-c' option.

$ sudo cmd/zpool/zpool events -fv
TIME                        CLASS
May 13 2010 16:31:15.777711000 ereport.fs.zfs.config.sync
        class = "ereport.fs.zfs.config.sync"
        ena = 0x40982b7897700001
        detector = (embedded nvlist)
                version = 0x0
                scheme = "zfs"
                pool = 0xed976600de75dfa6
        (end detector)

        time = 0x4bec8bc3 0x2e5aed98
        pool = "zpios"
        pool_guid = 0xed976600de75dfa6
        pool_context = 0x0

While the 'zpool events' command is handy for interactive debugging
it is not expected to be the primary consumer of zevents.  This ABI
was primarily added to facilitate the addition of a user space
monitoring daemon.  This daemon would consume all events posted by
the kernel and based on the type of event perform an action.  For
most events simply forwarding them on to syslog is likely enough.
But this interface also cleanly allows for more sophisticated
actions to be taken such as generating an email for a failed drive
2010-05-14 12:40:44 -07:00
Brian Behlendorf 98d5d8bd50 Add missing include path for FMA aware zpool command. 2010-05-14 11:57:48 -07:00
Brian Behlendorf 7b34c839f9 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-04-23 11:09:04 -07:00
Brian Behlendorf 66b756d253 Merge branch 'linux-user-disk' into refs/top-bases/linux-zfs-branch 2010-04-23 11:09:00 -07:00
Brian Behlendorf aafdbe5d6e Check all partitions with check_file() even when no libblkid is found
When creating a new pool on a block device we need to check all the
partitions even if we don't have liblkdid support.  In this case
we can't consult the blkid cache but we still can call check_file()
and attempt to read a valid label from each partition.

Additionally, the O_EXCL flag was removed because the device will
be opened multiple times and this was causing the check the file.
The device is only opened read-only anyway so this is still safe.

$ sudo zpool create tank /dev/sdz
invalid vdev specification
use '-f' to override the following errors:
/dev/sdz1 is part of potentially active pool 'tank'
2010-04-23 10:59:31 -07:00
Brian Behlendorf 34edbcd956 Refresh autogen products 2010-03-26 15:57:19 -07:00
Brian Behlendorf ddb2e7a5c5 Refresh autogen products 2010-03-22 17:01:13 -07:00
Brian Behlendorf c3240ea0d8 Merge commit 'refs/top-bases/linux-configure-branch' into linux-configure-branch 2010-03-09 12:31:56 -08:00
Brian Behlendorf 41844740dc Merge commit 'refs/top-bases/linux-ztest' into linux-ztest 2010-03-09 12:31:46 -08:00
Brian Behlendorf 3ea63f0cdb Merge commit 'refs/top-bases/linux-zpios' into linux-zpios 2010-03-09 12:31:25 -08:00
Brian Behlendorf 4b2b113239 Merge commit 'refs/top-bases/linux-user-disk' into linux-user-disk 2010-03-09 12:31:18 -08:00