From 5d43cc9a59d61aea37a1236e9d28628856030947 Mon Sep 17 00:00:00 2001 From: Matt Ahrens Date: Mon, 1 Oct 2018 15:13:12 -0700 Subject: OpenZFS 9689 - zfs range lock code should not be zpl-specific The ZFS range locking code in zfs_rlock.c/h depends on ZPL-specific data structures, specifically znode_t. However, it's also used by the ZVOL code, which uses a "dummy" znode_t to pass to the range locking code. We should clean this up so that the range locking code is generic and can be used equally by ZPL and ZVOL, and also can be used by future consumers that may need to run in userland (libzpool) as well as the kernel. Porting notes: * Added missing sys/avl.h include to sys/zfs_rlock.h. * Removed 'dbuf is within the locked range' ASSERTs from dmu_sync(). This was needed because ztest does not yet use a locked_range_t. * Removed "Approved by:" tag requirement from OpenZFS commit check to prevent needless warnings when integrating changes which has not been merged to illumos. * Reverted free_list range lock changes which were originally needed to defer the cv_destroy() which was called immediately after cv_broadcast(). With d2733258 this should be safe but if not we may need to reintroduce this logic. * Reverts: The following two commits were reverted and squashed in to this change in order to make it easier to apply OpenZFS 9689. - d88895a0, which removed the dummy znode from zvol_state - e3a07cd0, which updated ztest to use range locks * Preserved optimized rangelock comparison function. Preserved the rangelock free list. The cv_destroy() function will block waiting for all processes in cv_wait() to be scheduled and drop their reference. This is done to ensure it's safe to free the condition variable. However, blocking while holding the rl->rl_lock mutex can result in a deadlock on Linux. A free list is introduced to defer the cv_destroy() and kmem_free() until after the mutex is released. Authored by: Matthew Ahrens Reviewed by: Brian Behlendorf Reviewed by: Serapheim Dimitropoulos Reviewed by: George Wilson Reviewed by: Brad Lewis Ported-by: Brian Behlendorf OpenZFS-issue: https://illumos.org/issues/9689 OpenZFS-commit: https://github.com/openzfs/openzfs/pull/680 External-issue: DLPX-58662 Closes #7980 --- scripts/commitcheck.sh | 5 ----- 1 file changed, 5 deletions(-) (limited to 'scripts/commitcheck.sh') diff --git a/scripts/commitcheck.sh b/scripts/commitcheck.sh index 4d37b3a3c..f377bb912 100755 --- a/scripts/commitcheck.sh +++ b/scripts/commitcheck.sh @@ -121,11 +121,6 @@ function openzfs_port_commit() error=1 fi - # need a approved by line - if ! check_tagged_line "Approved by" ; then - error=1 - fi - # need ported by line if ! check_tagged_line "Ported-by" ; then error=1 -- cgit v1.2.3