[XL] Change in ...nfs-ganesha[next]: pthread resources cleanup (mutex, condition, rwlock etc.)
by Frank Filz (GerritHub)
Frank Filz has uploaded this change for review. ( https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/552214 )
Change subject: pthread resources cleanup (mutex, condition, rwlock etc.)
......................................................................
pthread resources cleanup (mutex, condition, rwlock etc.)
Sorry this is a big one... Unwinding to separate patches after
making incremental changes to make sure all the "i"s are dotted
and "t"s crossed would be a pain.
Normalize so everything uses PTHREAD_MUTEX type macros.
Do not use static INITIALIZER (exception, one use in log.h).
Make sure everything is initialized. Note that Linxu seems to be OK
with NULL/0 initialization. That might not be true for all platforms.
Make sure PTHREAD.*_init is matched with PTHREAD.*_destroy. Note that
Linux uses no resources so missing destroy doesn't cause leaks. BSD
at least does allocate resources so not destroying all objects will
result in memory leaks on at least one platform which is not good for
portability.
Rename a bunch of pthread objects to make auditing easier. No more
everyone uses "mxt" and "cv"...
Added some sub-system destroy/shutdown functions to handle cleanup.
PROXY_V3 and PROXY_V4 are not complete. They require a bit more
complex work that deserves to be in a separate patch.
Change-Id: I3437014c3e74b562c906c947b976192d81e7594d
Signed-off-by: Frank S. Filz <ffilzlnx(a)mindspring.com>
---
M src/FSAL/FSAL_CEPH/handle.c
M src/FSAL/FSAL_CEPH/internal.c
M src/FSAL/FSAL_GLUSTER/export.c
M src/FSAL/FSAL_GLUSTER/gluster_internal.c
M src/FSAL/FSAL_GLUSTER/gluster_internal.h
M src/FSAL/FSAL_GLUSTER/handle.c
M src/FSAL/FSAL_GLUSTER/main.c
M src/FSAL/FSAL_GPFS/export.c
M src/FSAL/FSAL_GPFS/handle.c
M src/FSAL/FSAL_KVSFS/kvsfs_export.c
M src/FSAL/FSAL_KVSFS/kvsfs_handle.c
M src/FSAL/FSAL_LIZARDFS/export.c
M src/FSAL/FSAL_LIZARDFS/handle.c
M src/FSAL/FSAL_LIZARDFS/lzfs_internal.c
M src/FSAL/FSAL_MEM/mem_export.c
M src/FSAL/FSAL_MEM/mem_handle.c
M src/FSAL/FSAL_PROXY_V3/rpc.c
M src/FSAL/FSAL_PROXY_V4/export.c
M src/FSAL/FSAL_PROXY_V4/handle.c
M src/FSAL/FSAL_PROXY_V4/handle_mapping/handle_mapping_db.c
M src/FSAL/FSAL_PROXY_V4/proxyv4_fsal_methods.h
M src/FSAL/FSAL_PSEUDO/handle.c
M src/FSAL/FSAL_RGW/main.c
M src/FSAL/FSAL_VFS/file.c
M src/FSAL/FSAL_VFS/handle.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_export.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_hash.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_hash.h
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_helpers.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_int.h
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_lru.c
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_main.c
M src/FSAL/commonlib.c
M src/FSAL/default_methods.c
M src/FSAL/fsal_destroyer.c
M src/FSAL/fsal_helper.c
M src/FSAL/fsal_manager.c
M src/FSAL/localfs.c
M src/FSAL_UP/fsal_up_top.c
M src/MainNFSD/9p_dispatcher.c
M src/MainNFSD/9p_rdma_callbacks.c
M src/MainNFSD/9p_rdma_dispatcher.c
M src/MainNFSD/libganesha_nfsd.ver
M src/MainNFSD/nfs_admin_thread.c
M src/MainNFSD/nfs_init.c
M src/MainNFSD/nfs_reaper_thread.c
M src/MainNFSD/nfs_rpc_callback.c
M src/MainNFSD/nfs_rpc_callback_simulator.c
M src/Protocols/9P/9p_flush_hook.c
M src/Protocols/9P/9p_read.c
M src/Protocols/9P/9p_write.c
M src/Protocols/NFS/mnt_Export.c
M src/Protocols/NFS/nfs4_Compound.c
M src/Protocols/NFS/nfs4_op_create_session.c
M src/Protocols/NFS/nfs4_op_lookupp.c
M src/Protocols/NFS/nfs4_op_sequence.c
M src/Protocols/NFS/nfs4_pseudo.c
M src/Protocols/NFS/nfs_proto_tools.c
M src/Protocols/NLM/nlm_async.c
M src/Protocols/NLM/nlm_util.c
M src/Protocols/NLM/nsm.c
M src/RPCAL/gss_credcache.c
M src/RPCAL/nfs_dupreq.c
M src/SAL/nfs41_session_id.c
M src/SAL/nfs4_clientid.c
M src/SAL/nfs4_recovery.c
M src/SAL/nfs4_state.c
M src/SAL/nlm_state.c
M src/SAL/recovery/recovery_rados_ng.c
M src/SAL/state_lock.c
M src/SAL/state_misc.c
M src/SAL/state_share.c
M src/config_parsing/conf_url.c
M src/dbus/dbus_server.c
M src/hashtable/hashtable.c
M src/idmapper/idmapper.c
M src/idmapper/idmapper_cache.c
M src/include/9p.h
M src/include/9p_req_queue.h
M src/include/client_mgr.h
M src/include/common_utils.h
M src/include/export_mgr.h
M src/include/fridgethr.h
M src/include/fsal.h
M src/include/fsal_api.h
M src/include/fsal_types.h
M src/include/fsal_up.h
M src/include/gsh_wait_queue.h
M src/include/gss_credcache.h
M src/include/hashtable.h
M src/include/nfs_core.h
M src/include/nfs_dupreq.h
M src/include/nfs_init.h
M src/include/nfs_proto_data.h
M src/include/sal_data.h
M src/include/uid2grp.h
M src/log/log_functions.c
M src/support/client_mgr.c
M src/support/delayed_exec.c
M src/support/ds.c
M src/support/export_mgr.c
M src/support/exports.c
M src/support/fridgethr.c
M src/support/netgroup_cache.c
M src/support/nfs4_acls.c
M src/support/nfs4_fs_locations.c
M src/support/server_stats.c
M src/support/uid2grp.c
M src/support/uid2grp_cache.c
109 files changed, 1,752 insertions(+), 1,036 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/14/552214/1
--
To view, visit https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/552214
To unsubscribe, or for help writing mail filters, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I3437014c3e74b562c906c947b976192d81e7594d
Gerrit-Change-Number: 552214
Gerrit-PatchSet: 1
Gerrit-Owner: Frank Filz <ffilzlnx(a)mindspring.com>
Gerrit-MessageType: newchange