diff options
Diffstat (limited to 'libglusterfs/src')
| -rw-r--r-- | libglusterfs/src/mem-types.h | 275 | ||||
| -rw-r--r-- | libglusterfs/src/syncop.c | 16 | 
2 files changed, 147 insertions, 144 deletions
diff --git a/libglusterfs/src/mem-types.h b/libglusterfs/src/mem-types.h index a77998e8a63..84949c61487 100644 --- a/libglusterfs/src/mem-types.h +++ b/libglusterfs/src/mem-types.h @@ -13,145 +13,148 @@  enum gf_common_mem_types_ { -        gf_common_mt_call_stub_t          = 0, -        gf_common_mt_dnscache6            = 1, -        gf_common_mt_data_pair_t          = 2, -        gf_common_mt_data_t               = 3, -        gf_common_mt_dict_t               = 4, -        gf_common_mt_event_pool           = 5, -        gf_common_mt_reg                  = 6, -        gf_common_mt_pollfd               = 7, -        gf_common_mt_epoll_event          = 8, -        gf_common_mt_fdentry_t            = 9, -        gf_common_mt_fdtable_t            = 10, -        gf_common_mt_fd_t                 = 11, -        gf_common_mt_fd_ctx               = 12, -        gf_common_mt_gf_dirent_t          = 13, -        gf_common_mt_glusterfs_ctx_t      = 14, -        gf_common_mt_dentry_t             = 15, -        gf_common_mt_inode_t              = 16, -        gf_common_mt_inode_ctx            = 17, -        gf_common_mt_list_head            = 18, -        gf_common_mt_inode_table_t        = 19, -        gf_common_mt_xlator_t             = 20, -        gf_common_mt_xlator_list_t        = 21, -        gf_common_mt_log_msg              = 22, -        gf_common_mt_client_log           = 23, -        gf_common_mt_volume_opt_list_t    = 24, -        gf_common_mt_gf_hdr_common_t      = 25, -        gf_common_mt_call_frame_t         = 26, -        gf_common_mt_call_stack_t         = 27, -        gf_common_mt_gf_timer_t           = 28, -        gf_common_mt_gf_timer_registry_t  = 29, -        gf_common_mt_transport            = 30, -        gf_common_mt_transport_msg        = 31, -        gf_common_mt_auth_handle_t        = 32, -        gf_common_mt_iobuf                = 33, -        gf_common_mt_iobuf_arena          = 34, -        gf_common_mt_iobref               = 35, -        gf_common_mt_iobuf_pool           = 36, -        gf_common_mt_iovec                = 37, -        gf_common_mt_memdup               = 38, -        gf_common_mt_asprintf             = 39, -        gf_common_mt_strdup               = 40, -        gf_common_mt_socket_private_t     = 41, -        gf_common_mt_ioq                  = 42, -        gf_common_mt_transport_t          = 43, -        gf_common_mt_socket_local_t       = 44, -        gf_common_mt_char                 = 45, -        gf_common_mt_rbthash_table_t      = 46, -        gf_common_mt_rbthash_bucket       = 47, -        gf_common_mt_mem_pool             = 48, -        gf_common_mt_long                 = 49, -        gf_common_mt_rpcsvc_auth_list     = 50, -        gf_common_mt_rpcsvc_t             = 51, -        gf_common_mt_rpcsvc_conn_t        = 52, -        gf_common_mt_rpcsvc_program_t     = 53, -        gf_common_mt_rpcsvc_listener_t    = 54, -        gf_common_mt_rpcsvc_wrapper_t     = 55, -        gf_common_mt_rpcsvc_stage_t       = 56, -        gf_common_mt_rpcclnt_t            = 57, -        gf_common_mt_rpcclnt_savedframe_t = 58, -        gf_common_mt_rpc_trans_t          = 59, -        gf_common_mt_rpc_trans_pollin_t   = 60, -        gf_common_mt_rpc_trans_handover_t = 61, -        gf_common_mt_rpc_trans_reqinfo_t  = 62, -        gf_common_mt_rpc_trans_rsp_t      = 63, -        gf_common_mt_glusterfs_graph_t    = 64, -        gf_common_mt_rdma_private_t       = 65, -        gf_common_mt_rdma_ioq_t           = 66, -        gf_common_mt_rpc_transport_t      = 67, -        gf_common_mt_rdma_local_t         = 68, -        gf_common_mt_rdma_post_t          = 69, -        gf_common_mt_qpent                = 70, -        gf_common_mt_rdma_device_t        = 71, -        gf_common_mt_rdma_context_t       = 72, -        gf_common_mt_sge                  = 73, -        gf_common_mt_rpcclnt_cb_program_t = 74, -        gf_common_mt_libxl_marker_local   = 75, -        gf_common_mt_graph_buf            = 76, -        gf_common_mt_trie_trie            = 77, -        gf_common_mt_trie_data            = 78, -        gf_common_mt_trie_node            = 79, -        gf_common_mt_trie_buf             = 80, -        gf_common_mt_trie_end             = 81, -        gf_common_mt_run_argv             = 82, -        gf_common_mt_run_logbuf           = 83, -        gf_common_mt_fd_lk_ctx_t          = 84, -        gf_common_mt_fd_lk_ctx_node_t     = 85, -        gf_common_mt_buffer_t             = 86, -        gf_common_mt_circular_buffer_t    = 87, -        gf_common_mt_eh_t                 = 88, -        gf_common_mt_store_handle_t       = 89, -        gf_common_mt_store_iter_t         = 90, -        gf_common_mt_drc_client_t         = 91, -        gf_common_mt_drc_globals_t        = 92, -        gf_common_mt_drc_rbtree_node_t    = 93, -        gf_common_mt_iov_base_t           = 94, -        gf_common_mt_groups_t             = 95, -        gf_common_mt_cliententry_t        = 96, -        gf_common_mt_clienttable_t        = 97, -        gf_common_mt_client_t             = 98, -        gf_common_mt_client_ctx           = 99, -        gf_common_mt_lock_table           = 100, -        gf_common_mt_locker               = 101, -        gf_common_mt_auxgids              = 102, -        gf_common_mt_syncopctx            = 103, -        gf_common_mt_iobrefs              = 104, -        gf_common_mt_gsync_status_t       = 105, -        gf_common_mt_uuid_t               = 106, -        gf_common_mt_mgmt_v3_lock_obj_t   = 107, -        gf_common_mt_txn_opinfo_obj_t     = 108, -	gf_common_mt_strfd_t              = 109, -	gf_common_mt_strfd_data_t         = 110, -        gf_common_mt_regex_t              = 111, -        gf_common_mt_ereg                 = 112, -        gf_common_mt_wr                   = 113, -        gf_common_mt_rdma_arena_mr        = 114, -        gf_common_mt_parser_t             = 115, -        gf_common_quota_meta_t            = 116, +        gf_common_mt_call_stub_t, +        gf_common_mt_dnscache6, +        gf_common_mt_data_pair_t, +        gf_common_mt_data_t, +        gf_common_mt_dict_t, +        gf_common_mt_event_pool, +        gf_common_mt_reg, +        gf_common_mt_pollfd, +        gf_common_mt_epoll_event, +        gf_common_mt_fdentry_t, +        gf_common_mt_fdtable_t, +        gf_common_mt_fd_t, +        gf_common_mt_fd_ctx, +        gf_common_mt_gf_dirent_t, +        gf_common_mt_glusterfs_ctx_t, +        gf_common_mt_dentry_t, +        gf_common_mt_inode_t, +        gf_common_mt_inode_ctx, +        gf_common_mt_list_head, +        gf_common_mt_inode_table_t, +        gf_common_mt_xlator_t, +        gf_common_mt_xlator_list_t, +        gf_common_mt_log_msg, +        gf_common_mt_client_log, +        gf_common_mt_volume_opt_list_t, +        gf_common_mt_gf_hdr_common_t, +        gf_common_mt_call_frame_t, +        gf_common_mt_call_stack_t, +        gf_common_mt_gf_timer_t, +        gf_common_mt_gf_timer_registry_t, +        gf_common_mt_transport, +        gf_common_mt_transport_msg, +        gf_common_mt_auth_handle_t, +        gf_common_mt_iobuf, +        gf_common_mt_iobuf_arena, +        gf_common_mt_iobref, +        gf_common_mt_iobuf_pool, +        gf_common_mt_iovec, +        gf_common_mt_memdup, +        gf_common_mt_asprintf, +        gf_common_mt_strdup, +        gf_common_mt_socket_private_t, +        gf_common_mt_ioq, +        gf_common_mt_transport_t, +        gf_common_mt_socket_local_t, +        gf_common_mt_char, +        gf_common_mt_rbthash_table_t, +        gf_common_mt_rbthash_bucket, +        gf_common_mt_mem_pool, +        gf_common_mt_long, +        gf_common_mt_rpcsvc_auth_list, +        gf_common_mt_rpcsvc_t, +        gf_common_mt_rpcsvc_conn_t, +        gf_common_mt_rpcsvc_program_t, +        gf_common_mt_rpcsvc_listener_t, +        gf_common_mt_rpcsvc_wrapper_t, +        gf_common_mt_rpcsvc_stage_t, +        gf_common_mt_rpcclnt_t, +        gf_common_mt_rpcclnt_savedframe_t, +        gf_common_mt_rpc_trans_t, +        gf_common_mt_rpc_trans_pollin_t, +        gf_common_mt_rpc_trans_handover_t, +        gf_common_mt_rpc_trans_reqinfo_t, +        gf_common_mt_rpc_trans_rsp_t, +        gf_common_mt_glusterfs_graph_t, +        gf_common_mt_rdma_private_t, +        gf_common_mt_rdma_ioq_t, +        gf_common_mt_rpc_transport_t, +        gf_common_mt_rdma_local_t, +        gf_common_mt_rdma_post_t, +        gf_common_mt_qpent, +        gf_common_mt_rdma_device_t, +        gf_common_mt_rdma_context_t, +        gf_common_mt_sge, +        gf_common_mt_rpcclnt_cb_program_t, +        gf_common_mt_libxl_marker_local, +        gf_common_mt_graph_buf, +        gf_common_mt_trie_trie, +        gf_common_mt_trie_data, +        gf_common_mt_trie_node, +        gf_common_mt_trie_buf, +        gf_common_mt_trie_end, +        gf_common_mt_run_argv, +        gf_common_mt_run_logbuf, +        gf_common_mt_fd_lk_ctx_t, +        gf_common_mt_fd_lk_ctx_node_t, +        gf_common_mt_buffer_t, +        gf_common_mt_circular_buffer_t, +        gf_common_mt_eh_t, +        gf_common_mt_store_handle_t, +        gf_common_mt_store_iter_t, +        gf_common_mt_drc_client_t, +        gf_common_mt_drc_globals_t, +        gf_common_mt_drc_rbtree_node_t, +        gf_common_mt_iov_base_t, +        gf_common_mt_groups_t, +        gf_common_mt_cliententry_t, +        gf_common_mt_clienttable_t, +        gf_common_mt_client_t, +        gf_common_mt_client_ctx, +        gf_common_mt_lock_table, +        gf_common_mt_locker, +        gf_common_mt_auxgids, +        gf_common_mt_syncopctx, +        gf_common_mt_iobrefs, +        gf_common_mt_gsync_status_t, +        gf_common_mt_uuid_t, +        gf_common_mt_mgmt_v3_lock_obj_t, +        gf_common_mt_txn_opinfo_obj_t, +	gf_common_mt_strfd_t, +	gf_common_mt_strfd_data_t, +        gf_common_mt_regex_t, +        gf_common_mt_ereg, +        gf_common_mt_wr, +        gf_common_mt_rdma_arena_mr, +        gf_common_mt_parser_t, +        gf_common_quota_meta_t,          /*related to gfdb library*/ -        gfdb_mt_time_t                    = 117, -        gf_mt_sql_cbk_args_t              = 118, -        gf_mt_gfdb_query_record_t         = 119, -        gf_mt_gfdb_link_info_t            = 120, -        gf_mt_gfdb_db_operations_t        = 121, -        gf_mt_sql_connection_t            = 122, -        gf_mt_sql_conn_node_t             = 123, -        gf_mt_db_conn_node_t              = 124, -        gf_mt_db_connection_t             = 125, -        gfdb_mt_db_record_t               = 126, +        gfdb_mt_time_t, +        gf_mt_sql_cbk_args_t, +        gf_mt_gfdb_query_record_t, +        gf_mt_gfdb_link_info_t, +        gf_mt_gfdb_db_operations_t, +        gf_mt_sql_connection_t, +        gf_mt_sql_conn_node_t, +        gf_mt_db_conn_node_t, +        gf_mt_db_connection_t, +        gfdb_mt_db_record_t,          /*related to gfdb library*/ -        gf_common_mt_rbuf_t               = 127, -        gf_common_mt_rlist_t              = 128, -        gf_common_mt_rvec_t               = 129, +        gf_common_mt_rbuf_t, +        gf_common_mt_rlist_t, +        gf_common_mt_rvec_t,          /* glusterd can load the nfs-xlator dynamically and needs these two */ -        gf_common_mt_nfs_netgroups        = 130, -        gf_common_mt_nfs_exports          = 131, -        gf_common_mt_gf_brick_spec_t      = 132, -        gf_common_mt_gf_timer_entry_t     = 133, -        gf_common_mt_int                  = 134, -        gf_common_mt_pointer              = 135, +        gf_common_mt_nfs_netgroups, +        gf_common_mt_nfs_exports, +        gf_common_mt_gf_brick_spec_t, +        gf_common_mt_gf_timer_entry_t, +        gf_common_mt_int, +        gf_common_mt_pointer, +        gf_common_mt_synctask, +        gf_common_mt_syncstack, +        gf_common_mt_syncenv,          gf_common_mt_end  };  #endif diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index a7a31e492c5..695f04b2a31 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -389,7 +389,7 @@ synctask_destroy (struct synctask *task)          if (!task)                  return; -        FREE (task->stack); +        GF_FREE (task->stack);          if (task->opframe)                  STACK_DESTROY (task->opframe->root); @@ -399,7 +399,7 @@ synctask_destroy (struct synctask *task)                 pthread_cond_destroy (&task->cond);          } -        FREE (task); +        GF_FREE (task);  } @@ -461,7 +461,7 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk,          if (destroymode)                  return NULL; -        newtask = CALLOC (1, sizeof (*newtask)); +        newtask = GF_CALLOC (1, sizeof (*newtask), gf_common_mt_synctask);          if (!newtask)                  return NULL; @@ -495,7 +495,7 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk,                  goto err;          } -        newtask->stack = CALLOC (1, env->stacksize); +        newtask->stack = GF_CALLOC (1, env->stacksize, gf_common_mt_syncstack);          if (!newtask->stack) {                  goto err;          } @@ -525,10 +525,10 @@ synctask_create (struct syncenv *env, synctask_fn_t fn, synctask_cbk_t cbk,  	return newtask;  err:          if (newtask) { -                FREE (newtask->stack); +                GF_FREE (newtask->stack);                  if (newtask->opframe)                          STACK_DESTROY (newtask->opframe->root); -                FREE (newtask); +                GF_FREE (newtask);          }          return NULL; @@ -771,7 +771,7 @@ syncenv_destroy (struct syncenv *env)          pthread_mutex_destroy (&env->mutex);          pthread_cond_destroy (&env->cond); -        FREE (env); +        GF_FREE (env);          return;  } @@ -792,7 +792,7 @@ syncenv_new (size_t stacksize, int procmin, int procmax)  	if (procmin > procmax)  		return NULL; -        newenv = CALLOC (1, sizeof (*newenv)); +        newenv = GF_CALLOC (1, sizeof (*newenv), gf_common_mt_syncenv);          if (!newenv)                  return NULL;  | 
