mirror_zfs/module/splat
Brian Behlendorf a6ae97caed Add rw_tryupgrade()
This implementation of rw_tryupgrade() behaves slightly differently
from its counterparts on other platforms.  It drops the RW_READER lock
and then acquires the RW_WRITER lock leaving a small window where no
lock is held.  On other platforms the lock is never released during
the upgrade process.  This is necessary under Linux because the kernel
does not provide an upgrade function.

There are currently no callers in the ZFS code where this change in
behavior is a problem.  In fact, in most cases the code is already
written such that if the upgrade fails the RW_READER lock is dropped
and the caller blocks waiting to acquire the lock as RW_WRITER.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
Closes zfsonlinux/zfs#4388
Closes #534
2016-03-10 13:05:25 -08:00
..
Makefile.in Support parallel build trees (VPATH builds) 2015-07-17 12:53:11 -07:00
splat-atomic.c Add defclsyspri macro 2015-07-23 13:25:49 -07:00
splat-condvar.c Don't hold mutex until release cv in cv_wait 2016-01-12 15:18:44 -08:00
splat-cred.c splat cred:groupmember: Fix false positives 2014-04-08 12:44:41 -07:00
splat-ctl.c Linux 4.2 compat: misc_deregister() 2015-09-01 09:20:45 -07:00
splat-generic.c Remove compat includes from sys/types.h 2014-11-19 10:35:12 -08:00
splat-internal.h Linux 4.2 compat: vfs_rename() 2015-08-19 16:03:29 -07:00
splat-kmem.c Limit maximum object size in kmem tests 2015-11-16 15:02:24 -08:00
splat-kobj.c Refresh links to web site 2013-03-04 19:09:34 -08:00
splat-linux.c Remove compat includes from sys/types.h 2014-11-19 10:35:12 -08:00
splat-list.c Refresh links to web site 2013-03-04 19:09:34 -08:00
splat-mutex.c Add defclsyspri macro 2015-07-23 13:25:49 -07:00
splat-random.c Refresh links to web site 2013-03-04 19:09:34 -08:00
splat-rwlock.c Add rw_tryupgrade() 2016-03-10 13:05:25 -08:00
splat-taskq.c Add defclsyspri macro 2015-07-23 13:25:49 -07:00
splat-thread.c Add defclsyspri macro 2015-07-23 13:25:49 -07:00
splat-time.c Remove compat includes from sys/types.h 2014-11-19 10:35:12 -08:00
splat-vnode.c Linux 4.2 compat: vfs_rename() 2015-08-19 16:03:29 -07:00
splat-zlib.c Refactor existing code 2015-01-16 13:55:08 -08:00