-
NeilBrown authored
Most objects with a lustre_handle have a refcount. The exception is mdt_mfd which uses locking (med_open_lock) to manage its lifetime. The lustre_handles code currently needs a call-out to increment its refcount. To simplify things, move the refcount into the lustre_hanle (which will be largely ignored by mdt_mfd) and discard the call-out. To avoid warnings when refcount debugging is enabled the refcount of mdt_mfd is initialized to 1, and decremeneted after any class_handle2object() call which would have incremented it. In order to preserve the same debug messages, we store an object type name in the portals_handle_ops, and use that in a CDEBUG() when incrementing the ref count. Change-Id: I1920330b2aeffd4b865cb9b249997aa28b209c33 Signed-off-by:
NeilBrown <neilb@suse.com> Reviewed-on: https://review.whamcloud.com/35794 Reviewed-by:
Neil Brown <neilb@suse.de> Tested-by:
jenkins <devops@whamcloud.com> Tested-by:
Maloo <maloo@whamcloud.com> Reviewed-by:
Andreas Dilger <adilger@whamcloud.com> Reviewed-by:
Shaun Tancheff <stancheff@cray.com> Reviewed-by:
Oleg Drokin <green@whamcloud.com>
ae22814b