LU-3430 nrs: Fix a race condition in the ORR policy
Checking the atomic oo_ref in nrs_orr_hop_put_free() and then
taking the bucket lock leaves a race window open, by which a
second thread can attempt to free an already-freed
nrs_orr_object. Fix this, and change the hash bucket lock type
from an rwlock to a spinlock, as there are now as many calls on
the write path, as there are on the read path. Rehashing is not
used on the hashes, so libcfs_hash API usage can also be
simplified.
Lusrtr-commit:
548b8ea916625b3697b0e0d0abfc330b4c954633
Lustre-change: http://review.whamcloud.com/7623
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
Xyratex-bug-id: MRP-1294
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Change-Id: I08365b9888d781cb2bcbf871bf74d089bcf7ba9f
Reviewed-on: http://review.whamcloud.com/8162
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>