FreeBSD src
Go to file
Brian Behlendorf c25b8f99f8 Simplify threads, mutexs, cvs and rwlocks
* Simplify threads, mutexs, cvs and rwlocks

* Update the zk_thread_create() function to use the same trick
  as Illumos.  Specifically, cast the new pthread_t to a void
  pointer and return that as the kthread_t *.  This avoids the
  issues associated with managing a wrapper structure and is
  safe as long as the callers never attempt to dereference it.

* Update all function prototypes passed to pthread_create() to
  match the expected prototype.  We were getting away this with
  before since the function were explicitly cast.

* Replaced direct zk_thread_create() calls with thread_create()
  for code consistency.  All consumers of libzpool now use the
  proper wrappers.

* The mutex_held() calls were converted to MUTEX_HELD().

* Removed all mutex_owner() calls and retired the interface.
  Instead use MUTEX_HELD() which provides the same information
  and allows the implementation details to be hidden.  In this
  case the use of the pthread_equals() function.

* The kthread_t, kmutex_t, krwlock_t, and krwlock_t types had
  any non essential fields removed.  In the case of kthread_t
  and kcondvar_t they could be directly typedef'd to pthread_t
  and pthread_cond_t respectively.

* Removed all extra ASSERTS from the thread, mutex, rwlock, and
  cv wrapper functions.  In practice, pthreads already provides
  the vast majority of checks as long as we check the return
  code.  Removing this code from our wrappers help readability.

* Added TS_JOINABLE state flag to pass to request a joinable rather
  than detached thread.  This isn't a standard thread_create() state
  but it's the least invasive way to pass this information and is
  only used by ztest.

TEST_ZTEST_TIMEOUT=3600

Chunwei Chen <tuxoko@gmail.com>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4547 
Closes #5503 
Closes #5523 
Closes #6377 
Closes #6495
2017-08-11 08:51:44 -07:00
.github Provide links to info about ZFS Buildbot options 2017-06-15 17:52:18 -07:00
cmd Simplify threads, mutexs, cvs and rwlocks 2017-08-11 08:51:44 -07:00
config Fix autoconf detection of super_setup_bdi_name 2017-07-25 10:30:20 -07:00
contrib dracut: Install commands required for vdev_id 2017-08-04 11:14:48 -07:00
etc zpool iostat/status -c improvements 2017-06-05 10:52:15 -07:00
include Simplify threads, mutexs, cvs and rwlocks 2017-08-11 08:51:44 -07:00
lib Simplify threads, mutexs, cvs and rwlocks 2017-08-11 08:51:44 -07:00
man Man page fixes 2017-08-10 15:45:25 -07:00
module Simplify threads, mutexs, cvs and rwlocks 2017-08-11 08:51:44 -07:00
rpm Fix aarch64 build 2017-07-29 13:25:53 -07:00
scripts Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
tests Disable rsend_024_pos 2017-08-10 07:53:10 -07:00
udev Fix spelling 2017-01-03 11:31:18 -06:00
.gitignore Improve gitignore 2017-05-25 10:14:13 -07:00
.gitmodules Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
AUTHORS Add a missing > to AUTHORS 2014-09-02 14:18:53 -07:00
autogen.sh build: do not call boilerplate ourself 2013-04-02 10:55:20 -07:00
configure.ac Add libtpool (thread pools) 2017-08-09 15:31:08 -07:00
copy-builtin Allow c99 when building ZFS in the kernel tree 2017-03-27 12:31:15 -07:00
COPYRIGHT Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
DISCLAIMER Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
Makefile.am Prebaked scripts for zpool status/iostat -c 2017-04-21 09:27:04 -07:00
META Tag zfs-0.7.0 2017-07-26 10:13:25 -07:00
OPENSOLARIS.LICENSE
README.markdown Add CONTRIBUTING information and templates 2016-12-09 12:48:12 -07:00
TEST Retire filebench testing 2017-06-01 06:24:28 -07:00
zfs-script-config.sh.in zpool iostat/status -c improvements 2017-06-05 10:52:15 -07:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

ZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the Illumos community.

ZFS on Linux, which is also known as ZoL, is currently feature complete. It includes fully functional and stable SPA, DMU, ZVOL, and ZPL layers. And it's native!

Official Resources

Installation

Full documentation for installing ZoL on your favorite Linux distribution can be found at our site.

Contribute & Develop

We have a separate document with contribution guidelines.