BUG(),BUG_ON(),panic() in OCFS2
source code version:ocfs2-1.2.6-6
BUG(),BUG_ON()
module load
1. panic() Loading the ocfs2 node manager module. quorum.c line 81 function: o2quo_fence_self()
- module_init(init_o2nm) #ocfs2_nodemanager module.
-> init_o2nm(void)
-> o2net_init(void)
2. BUG() Loading the ocfs2 node manager module. dir.c line 580 function: link_group
- module_init(init_o2nm)
-> init_o2nm()
-> configfs_register_subsystem()
-> link_group()# if there is no parent_group->cg_subsys and parent_group is not root
-> BUG()
mount & unmount
1. BUG() Initializing a super_block structure.
- ocfs2_fs_type.get_sb=ocfs2_get_sb
-> ocfs2_get_sb()
-> get_sb_bdev(fs_type, flags, dev_name, data, ocfs2_fill_super);
-> ocfs2_fill_super() see below
2. BUG() Mounting a volume need write some blocks to disk.
- ocfs2_fill_super()
-> ocfs2_initialize_super() super.c line:1299 function:ocfs2_initialize_super().
-> if blksize_bits(sector_size) return 0,then BUG(). That's mean can't get valid sector_size.
-> ocfs2_init_global_system_inodes()
-> ocfs2_iget() see below
-> ocfs2_max_file_offset()
-> BUG_ON(sizeof(sector_t) != 8);super.c line:361.
-> ocfs2_init_global_system_inodes()
-> ocfs2_iget() see below
-> ocfs2_setup_osb_uuid()
-> BUG_ON(uuid_bytes != OCFS2_VOL_UUID_LEN);super.c line:1246.
-> o2hb_check_local_node_heartbeating()
-> o2hb_check_node_heartbeating()
-> o2hb_fill_node_map()
-> o2hb_fill_node_map_from_callback()
-> BUG_ON(bytes < (BITS_TO_LONGS(O2NM_MAX_NODES) *sizeof(unsigned long )));fs/ocfs2/cluster/heartbeat.c line:1155
-> ocfs2_dismount_volume() see below
-> ocfs2_mount_volume()
-> ocfs2_dlm_init()
-> dlm_register_domain()
-> dlm_alloc_ctxt()
-> kref_init(&dlm->dlm_refs, dlm_ctxt_release); see below
-> ocfs2_find_slot()
-> _ _ocfs2_fill_slot()
-> BUG_ON(slot_num == OCFS2_INVALID_SLOT);fs/ocfs2/slot_map.c line:154
-> BUG_ON(slot_num >= si->si_num_slots);fs/ocfs2/slot_map.c line:155
-> BUG_ON((node_num != O2NM_INVALID_NODE_NUM) &&(node_num >= O2NM_MAX_NODES));fs/ocfs2/slot_map.c line:156
-> ocfs2_update_disk_slots()
-> ocfs2_write_block() see above
-> ocfs2_write_blocks()
-> ocfs2_populate_mounted_map()
-> ocfs2_node_map_set_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:234
-> ocfs2_check_volume()
-> ocfs2_journal_init()
-> ocfs2_meta_lock_full()
-> BUG_ON(!journal);fs/ocfs2/journal.c line:522
-> ocfs2_mark_dead_nodes()
-> ocfs2_trylock_journal()
-> ocfs2_meta_lock_full()
-> ocfs2_is_empty_slot()
-> BUG_ON(slot_num == OCFS2_INVALID_SLOT);fs/ocfs2/slot_map.h line:60
-> ocfs2_journal_load() or ocfs2_journal_wipe()
-> if (!journal) BUG(); #checking parameter.fs/ocfs2/journal.c line:661 674 function:ocfs2_journal_load()
-> ocfs2_journal_toggle_dirty()
-> ocfs2_write_block()
-> ocfs2_write_blocks()
-> BUG() buffer_head_io.c line:92 function:ocfs2_write_blocks().
-> ocfs2_request_mount_vote()
-> ocfs2_new_vote_request()
-> BUG_ON(!ocfs2_is_valid_vote_request(type));fs/ocfs2/vote.c line:768
-> ocfs2_do_request_vote()
-> ocfs2_broadcast_vote()
-> ocfs2_node_map_set_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:234
-> ocfs2_request_vote()
-> ocfs2_node_map_is_only()
-> _ _ocfs2_node_map_dup()
-> BUG_ON(from->num_nodes == 0);fs/ocfs2/heartbeat.c line:296
-> _ _ocfs2_node_map_set()
-> BUG_ON(target->num_nodes != from->num_nodes);fs/ocfs2/heartbeat.c line:323
-> BUG_ON(target->num_nodes == 0);fs/ocfs2/heartbeat.c line:324
-> ocfs2_super_lock_res_init()
-> ocfs2_lock_res_init_common()
-> ocfs2_build_lock_name()
-> BUG_ON(type >= OCFS2_NUM_LOCK_TYPES);fs/ocfs2/dlmglue.c line:209
-> BUG_ON(len != (OCFS2_LOCK_ID_MAX_LEN - 1));fs/ocfs2/dlmglue.c line:215
-> ocfs2_rename_lock_res_init()
-> ocfs2_lock_res_init_common() see above
- ocfs2_begin_local_alloc_recovery()
-> ocfs2_write_block() see above
-> ocfs2_write_blocks()
- ocfs2_put_super()# mount failed or other reasons cause release of the super_block structure
-> ocfs2_dismount_volume()
-> BUG_ON(!sb);fs/ocfs2/super.c line:1166
-> BUG_ON(!osb);fs/ocfs2/super.c line:1168
-> ocfs2_dlm_shutdown()
-> ocfs2_drop_osb_locks()
-> ocfs2_drop_lock()
-> _ _ocfs2_drop_lock()
-> if(dlmunlock() != DLM_NORMAL) BUG() ; fs/ocfs2/dlmglue.c line:2154 function: _ _ocfs2_drop_lock()
-> BUG_ON(lockres->l_action != OCFS2_AST_INVALID); fs/ocfs2/dlmglue.c line:2136
-> ocfs2_mark_lockres_freeing()
-> lockres_add_flag_callback()
-> BUG_ON(!list_empty(&fcb->fc_lockres_item)); fs/ocfs2/dlmglue.c line:837
-> BUG_ON(fcb->fc_cb == NULL); fs/ocfs2/dlmglue.c line:838
-> dlm_unregister_domain()
-> BUG_ON(dlm->dlm_state != DLM_CTXT_JOINED);fs/ocfs2/dlm/dlmdomain.c line:617
-> BUG_ON(!dlm->num_joins);fs/ocfs2/dlm/dlmdomain.c line:618
-> dlm_migrate_all_locks()
-> dlm_empty_lockres()
-> if a lockres still have local lock then BUG();fs/ocfs2/dlm/dlmmaster.c line:2781 function:dlm_empty_lockres()
-> dlm_migrate_lockres()
-> 4 BUG_ON()s fs/ocfs2/dlm/dlmmaster.c line:2845-2890
-> dlm_add_migration_mle()
-> BUG() fs/ocfs2/dlm/dlmmaster.c line:3191
-> dlm_send_one_lockres()
[-> dlm_add_dummy_lock()]
-> dlm_add_lock_to_array()
->BUG();fs/ocfs2/dlm/dlmrecovery.c line:1203
-> BUG_ON() & BUG() fs/ocfs2/dlm/dlmrecovery.c line:1309 function:dlm_send_one_lockres()
-> dlm_send_mig_lockres_msg()
-> BUG()fs/ocfs2/dlm/dlmrecovery.c line:1148
-> BUG_ON(mres->num_locks > DLM_MAX_MIGRATABLE_LOCKS);fs/ocfs2/dlm/dlmrecovery.c line:1114
-> BUG_ON(total_locks > mres_total_locks);fs/ocfs2/dlm/dlmrecovery.c line:1123
-> BUG_ON(!(flags &(DLM_MRES_RECOVERY|DLM_MRES_MIGRATION)));fs/ocfs2/dlm/dlmrecovery.c line:1255
-> _ _dlm_lockres_unused()
-> BUG_ON(res->inflight_locks != 0);fs/ocfs2/dlm/dlmthread.c line: 107
-> ocfs2_truncate_log_shutdown()
-> ocfs2_flush_truncate_log()
-> _ _ocfs2_flush_truncate_log()
-> BUG_ON(mutex_trylock(&tl_inode->i_mutex));fs/ocfs2/alloc.c line:1124
-> ocfs2_replay_truncate_records()
-> ocfs2_extend_trans()
-> BUG_ON(!handle);fs/ocfs2/journal.c line:336
-> BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED));fs/ocfs2/journal.c line:337
-> BUG_ON(!nblocks);fs/ocfs2/journal.c line:338
-> ocfs2_free_clusters()
-> ocfs2_block_to_cluster_group()
-> ocfs2_which_cluster_group()
-> BUG_ON(!ocfs2_is_cluster_bitmap(inode));fs/ocfs2/suballoc.c line:1369
-> BUG_ON(!ocfs2_is_cluster_bitmap(inode));fs/ocfs2/suballoc.c line:1388
-> ocfs2_free_suballoc_bits()
-> BUG_ON((count + start_bit) > ocfs2_bits_per_group(cl));fs/ocfs2/suballoc.c line:1554
-> BUG_ON((count + start_bit) > le16_to_cpu(group->bg_bits));fs/ocfs2/suballoc.c line:1574
-> BUG_ON(start_blk != ocfs2_clusters_to_blocks(bitmap_inode->i_sb,ocfs2_blocks_to_clusters(bitmap_inode->i_sb,start_blk)));
-> ocfs2_journal_shutdown()
-> ocfs2_journal_toggle_dirty()
-> ocfs2_write_block()
-> BUG()# buffer_head_io.c line:92 function:ocfs2_write_blocks().
-> if (!osb) BUG(); fs/ocfs2/journal.c line:661 674 function:ocfs2_journal_shutdown()
-> if (!igrab(inode)) BUG(); fs/ocfs2/journal.c line:661 674 function:ocfs2_journal_shutdown()
-> ocfs2_handle_add_inode()
-> BUG_ON(!handle);fs/ocfs2/journal.c line:213
-> BUG_ON(!inode);fs/ocfs2/journal.c line:214
-> BUG_ON(OCFS2_I(inode)->ip_handle);fs/ocfs2/journal.c line:222
-> BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list));fs/ocfs2/journal.c line:223
-> ocfs2_request_umount_vote()
-> ocfs2_new_vote_request()
-> BUG_ON(!ocfs2_is_valid_vote_request(type));fs/ocfs2/vote.c line:768
-> ocfs2_do_request_vote()
-> ocfs2_broadcast_vote()
-> ocfs2_node_map_set_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:234
-> ocfs2_request_vote()
-> ocfs2_node_map_is_only()
-> _ _ocfs2_node_map_dup()
-> BUG_ON(from->num_nodes == 0);fs/ocfs2/heartbeat.c line:296
-> _ _ocfs2_node_map_set()
-> BUG_ON(target->num_nodes != from->num_nodes);fs/ocfs2/heartbeat.c line:323
-> BUG_ON(target->num_nodes == 0);fs/ocfs2/heartbeat.c line:324
-> ocfs2_put_slot()
-> _ _ocfs2_fill_slot()
-> BUG_ON(slot_num == OCFS2_INVALID_SLOT);fs/ocfs2/slot_map.c line:154
-> BUG_ON(slot_num >= si->si_num_slots);fs/ocfs2/slot_map.c line:155
-> BUG_ON((node_num != O2NM_INVALID_NODE_NUM) &&(node_num >= O2NM_MAX_NODES));fs/ocfs2/slot_map.c line:156
-> ocfs2_shutdown_local_alloc()
-> ocfs2_sync_local_to_main()
-> ocfs2_free_clusters() see above
5. BUG_ON() Creating an attribute file for an item fs/ocfs2/aio.c line:63 function:okp_teardown()
INIT_WORK(&osb->osb_okp_teardown_work, okp_teardown_from_list, osb);# sync with this work queue (and sb ref) on unmount
-> okp_teardown_from_list()
-> okp_teardown()
-> BUG_ON(okp->kp_inode == NULL);
-> ocfs2_unlock_buffer_inodes()
-> BUG_ON(in_interrupt());fs/ocfs2/mmap.c line:415
dlm register
1. BUG_ON()
- dlmfs_ops.clear_inode=dlmfs_clear_inode()
-> user_dlm_unregister_context()
-> dlm_unregister_domain()
-> BUG_ON(dlm->dlm_state != DLM_CTXT_JOINED);BUG_ON(!dlm->num_joins);fs/ocfs2/dlm/dlmdomain.c line: 617 618
[-> dlm_migrate_all_locks()]
-> dlm_empty_lockres()
-> _ _dlm_lockres_unused()
-> BUG_ON(res->inflight_locks != 0);fs/ocfs2/dlm/dlmthread.c line: 107
heartbeat
1. BUG_ON()
- o2hb_thread()
-> o2hb_do_disk_heartbeat()
-> o2hb_read_slots()
-> o2hb_bio_wait_dec()
-> BUG_ON(num > 0);fs/ocfs2/cluster/heartbeat.c line:308
-> o2hb_check_slot()
-> o2hb_run_event_list()
-> BUG_ON(IS_ERR(hbcall));fs/ocfs2/cluster/heartbeat.c line:709
-> o2hb_shutdown_slot()
-> o2hb_run_event_list()
-> BUG_ON(IS_ERR(hbcall));fs/ocfs2/cluster/heartbeat.c line:709
- o2hb_thread()
[-> o2hb_do_disk_heartbeat()]
-> o2hb_issue_node_write()
-> o2hb_setup_one_bio()
-> bio->bi_end_io = o2hb_bio_end_io()
-> o2hb_bio_end_io()
-> o2hb_bio_wait_dec()
-> BUG_ON(num > 0);fs/ocfs2/cluster/heartbeat.c line:308
- o2hb_region_attr_dev.store=o2hb_region_dev_write()
-> o2hb_populate_slot_data()
-> o2hb_read_slots()
-> o2hb_bio_wait_dec()
-> BUG_ON(num > 0);fs/ocfs2/cluster/heartbeat.c line:308
-> o2hb_map_slot_data()
-> BUG_ON((j + last_slot) >= reg->hr_blocks);fs/ocfs2/cluster/heartbeat.c line:1406
o2hb_read_slots()see above
-> o2hb_bio_wait_dec()
-> BUG_ON(num > 0);fs/ocfs2/cluster/heartbeat.c line:308
2. BUG_ON() fs/ocfs2/cluster/heartbeat.c line:1155 function:o2hb_fill_node_map_from_callback()
- dlmfs_mkdir()
-> user_dlm_register_context()
-> dlm_register_domain()
-> o2hb_check_local_node_heartbeating() see above
-> o2hb_check_node_heartbeating()
-> o2hb_fill_node_map()
-> o2hb_fill_node_map_from_callback()
-> BUG_ON(bytes < (BITS_TO_LONGS(O2NM_MAX_NODES) *sizeof(unsigned long )));
-> dlm_alloc_ctxt()
-> kref_init(&dlm->dlm_refs, dlm_ctxt_release);
-> dlm_ctxt_release()
-> BUG_ON(dlm->num_joins);fs/ocfs2/dlm/dlmdomain.c line:282
-> BUG_ON(dlm->dlm_state == DLM_CTXT_JOINED);fs/ocfs2/dlm/dlmdomain.c line:283
dlm_register_domain()see above path a.
-> dlm_join_domain()
-> dlm_try_to_join_domain()
-> o2hb_fill_node_map() see first path
-> BUG_ON(!dlm);fs/ocfs2/dlm/dlmdomain.c line:1254 function:dlm_register_domain()
- EXPORT_SYMBOL_GPL(o2hb_check_local_node_heartbeating_from_callback()) or
- handler of a workqueue:
->o2net_accept_many()
-> o2net_accept_one()
-> o2hb_check_node_heartbeating_from_callback()
-> o2net_register_callbacks()
-> BUG_ON(sk->sk_user_data != NULL);fs/ocfs2/cluster/tcp.c line:553
-> BUG_ON(sock == NULL);fs/ocfs2/cluster/tcp.c line:1705
- handler of a workqueue:
3. BUG_ON()
- o2net_register_hb_callbacks() or dlm_register_domain_handlers() or ocfs2_register_hb_callbacks()
-> o2hb_register_callback
-> BUG_ON(hc->hc_magic != O2HB_CB_MAGIC);fs/ocfs2/cluster/heartbeat.c line:1784
-> BUG_ON(!list_empty(&hc->hc_item));fs/ocfs2/cluster/heartbeat.c line:1785
-> o2hb_unregister_callback
-> BUG_ON(hc->hc_magic != O2HB_CB_MAGIC);fs/ocfs2/cluster/heartbeat.c line:1816
4. BUG_ON()
- o2hb_thread()
-> o2hb_do_disk_heartbeat()
-> o2nm_configured_node_map()
-> BUG_ON(bytes < (sizeof(cluster->cl_nodes_bitmap)));fs/ocfs2/cluster/nodemanager.c line:124
5. BUG_ON()
- o2nm_cluster_group_group_ops.drop_item=o2nm_cluster_group_drop_item()
-> o2nm_cluster_group_drop_item()
-> BUG_ON(o2nm_single_cluster != cluster);fs/ocfs2/cluster/nodemanager.c line:124
6. BUG_ON() find an unknown error.
- o2net_send_message() or dlm_send_proxy_ast_msg() or dlm_send_remote_convert_request() or dlm_send_remote_unlock_request()
-> o2net_send_message_vec()
-> o2net_sys_err_to_errno()
-> BUG_ON(err >= O2NET_ERR_MAX);fs/ocfs2/cluster/tcp.c line:175
-> BUG_ON(err != O2NET_ERR_NONE && trans == 0);fs/ocfs2/cluster/tcp.c line:179
7. BUG_ON() get o2net_node structure by index of the structure array or contrary.
o2net_nn_from_num ->BUG_ON(node_num >= ARRAY_SIZE(o2net_nodes));fs/ocfs2/cluster/tcp.c line:185
o2net_num_from_nn ->BUG_ON(nn == NULL);fs/ocfs2/cluster/tcp.c line:191
8. BUG_ON()
kref_put(&sc->sc_kref, sc_kref_release);
kref_init(&sc->sc_kref, sc_kref_release);
-> sc_kref_release
-> BUG_ON(timer_pending(&sc->sc_idle_timeout));fs/ocfs2/cluster/tcp.c line:295
9. BUG_ON()
- XXX
-> o2net_set_nn_state()
-> BUG_ON(sc && nn->nn_sc && nn->nn_sc != sc);fs/ocfs2/cluster/tcp.c line:410
10. BUG_ON()
- o2net_start_connect()
-> o2net_register_callbacks()
-> BUG_ON(sk->sk_user_data != NULL);fs/ocfs2/cluster/tcp.c line:533
11. BUG_ON()
- o2net_rx_until_empty()
-> o2net_advance_rx()
-> o2net_process_message()
-> o2net_send_status_magic()
-> BUG_ON(syserr >= O2NET_ERR_MAX);fs/ocfs2/cluster/tcp.c line:1054
-> BUG_ON(ret_data != NULL && nmh->nh_post_func == NULL);fs/ocfs2/cluster/tcp.c line:1141
12. BUG_ON() A call back function for the O2HB_NODE_DOWN_CB message.
- o2net_hb_node_down_cb()
-> BUG_ON(atomic_read(&o2net_connected_peers) < 0);fs/ocfs2/cluster/tcp.c line:1612
13. BUG_ON() called from node manager when we should bring up our network listening socket.
- o2nm_node_attr_local.store=o2nm_node_local_write()
-> o2net_start_listening()
-> BUG_ON(o2net_wq != NULL);fs/ocfs2/cluster/tcp.c line:1897
-> BUG_ON(o2net_listen_sock != NULL);fs/ocfs2/cluster/tcp.c line:1898
14. BUG_ON() called when we should shut down our network listening socket.
- o2nm_node_attr_local.store=o2nm_node_local_write() or o2nm_node_group_group_ops.drop_item=o2nm_node_group_drop_item()
-> o2net_stop_listening()
-> BUG_ON(o2net_wq == NULL);fs/ocfs2/cluster/tcp.c line:1925
-> BUG_ON(o2net_listen_sock == NULL);fs/ocfs2/cluster/tcp.c line:1926
15. BUG_ON() called when we a node is down.
- ocfs2_hb_node_down_cb() # A call back function.
-> ocfs2_do_node_down()
-> BUG_ON(osb->node_num == node_num); fs/ocfs2/heartbeat.c line:76
-> ocfs2_node_map_clear_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:252
-> ocfs2_remove_node_from_vote_queues()
-> _ _ocfs2_mark_node_responded()
-> ocfs2_node_map_clear_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:252
-> ocfs2_node_map_is_empty()
-> BUG_ON(map->num_nodes == 0);fs/ocfs2/heartbeat.c line:286
- ocfs2_dlm_eviction_cb() # Called from the dlm when it's about to evict a node
-> ocfs2_do_node_down() see above
16. BUG_ON() called when we a node is up.
- ocfs2_hb_node_up_cb()
-> BUG_ON(osb->node_num == node_num);fs/ocfs2/heartbeat.c line:130
-> ocfs2_node_map_clear_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:252
17. BUG_ON() Requesting unlink a file.
- ocfs2_unlink()/ocfs2_rename()
-> ocfs2_request_unlink_vote() or ocfs2_request_rename_vote()
-> ocfs2_new_vote_request()
-> BUG_ON(!ocfs2_is_valid_vote_request(type));fs/ocfs2/vote.c line:768
-> ocfs2_do_request_vote()
-> ocfs2_broadcast_vote()
-> ocfs2_node_map_set_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:234
-> ocfs2_node_map_is_empty()
-> BUG_ON(map->num_nodes == 0);fs/ocfs2/heartbeat.c line:286
-> ocfs2_request_vote()
-> ocfs2_node_map_is_only()
-> _ _ocfs2_node_map_dup()
-> BUG_ON(from->num_nodes == 0);fs/ocfs2/heartbeat.c line:296
-> _ _ocfs2_node_map_set()
-> BUG_ON(target->num_nodes != from->num_nodes);fs/ocfs2/heartbeat.c line:323
-> BUG_ON(target->num_nodes == 0);fs/ocfs2/heartbeat.c line:324
-> BUG_ON(dentry->d_parent->d_inode != dir);fs/ocfs2/namei.c line:767 function:ocfs2_unlink()
-> ocfs2_double_lock()fs/ocfs2/namei.c line:955 function:ocfs2_rename()
-> BUG_ON(!handle);
-> BUG_ON(new_dentry->d_parent->d_inode != new_dir);fs/ocfs2/namei.c line:1220 function:ocfs2_rename()
18. BUG_ON() Handling node response and mark live nodes.
- ocfs2_handle_response_message()
-> _ _ocfs2_mark_node_responded()
-> ocfs2_node_map_clear_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:252
19. BUG_ON()
- ocfs2_readdir()
-> ocfs2_bread()
-> BUG_ON(!reada);fs/ocfs2/inode.c line:1028
- ocfs2_unlink()/ocfs2_rename()
-> ocfs2_empty_dir()
-> ocfs2_bread()
-> BUG_ON(!reada);fs/ocfs2/inode.c line:1028
- ocfs2_complete_recovery()
-> ocfs2_recover_orphans()
-> ocfs2_queue_orphans()
-> ocfs2_bread()
-> BUG_ON(!reada);fs/ocfs2/inode.c line:1028
-> ocfs2_mark_recovering_orphan_dir()
-> ocfs2_node_map_set_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:234
-> ocfs2_clear_recovering_orphan_dir()
-> ocfs2_node_map_clear_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:252
-> ocfs2_complete_local_alloc_recovery()
-> ocfs2_handle_add_inode()
-> BUG_ON(!handle);fs/ocfs2/journal.c line:213
-> BUG_ON(!inode);fs/ocfs2/journal.c line:214
-> BUG_ON(OCFS2_I(inode)->ip_handle);fs/ocfs2/journal.c line:222
-> BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list));fs/ocfs2/journal.c line:223
-> ocfs2_sync_local_to_main() see above
-> ocfs2_complete_truncate_log_recovery()
-> ocfs2_truncate_log_append()
-> BUG_ON(mutex_trylock(&tl_inode->i_mutex));fs/ocfs2/alloc.c line:967
-> _ _ocfs2_flush_truncate_log()
-> BUG_ON(mutex_trylock(&tl_inode->i_mutex));fs/ocfs2/alloc.c line:1124
-> ocfs2_replay_truncate_records() see above
- ocfs2_find_files_on_disk() or ocfs2_check_dir_for_entry() or ocfs2_rename() or ocfs2_orphan_del()
-> ocfs2_find_entry()
-> ocfs2_bread()
-> BUG_ON(!reada);fs/ocfs2/inode.c line:1028
- ocfs2_rename()
- ocfs2_empty_dir()
20. BUG_ON() by many functions,process with journal handle objects.
- ocfs2_block_group_alloc()
-> BUG_ON(ocfs2_is_cluster_bitmap(alloc_inode));fs/ocfs2/suballoc.c line:288
-> ocfs2_set_new_buffer_uptodate()
-> BUG_ON(ocfs2_buffer_cached(oi, bh));fs/ocfs2/uptodate.c line:450
-> ocfs2_reserve_clusters()
-> BUG_ON(!handle);fs/ocfs2/suballoc.c line:626
-> ocfs2_reserve_local_alloc_bits()
-> ocfs2_handle_add_inode()
-> BUG_ON(!handle);fs/ocfs2/journal.c line:213
-> BUG_ON(!inode);fs/ocfs2/journal.c line:214
-> BUG_ON(OCFS2_I(inode)->ip_handle);fs/ocfs2/journal.c line:222
-> BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list));fs/ocfs2/journal.c line:223
-> ocfs2_local_alloc_slide_window()
-> ocfs2_local_alloc_new_window()
-> ocfs2_local_alloc_window_bits()
-> BUG_ON(osb->s_clustersize_bits < 12);fs/ocfs2/localalloc.c line:88
-> ocfs2_claim_clusters()
-> ocfs2_claim_local_alloc_bits()
-> BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL);fs/ocfs2/localalloc.c line:546
-> ocfs2_desc_bitmap_to_cluster_off()
-> BUG_ON(!ocfs2_is_cluster_bitmap(inode));fs/ocfs2/suballoc.c line:1353
-> ocfs2_claim_suballoc_bits() see below
-> BUG_ON(!ac);
-> BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted);
-> BUG_ON(ac->ac_which != OCFS2_AC_USE_LOCAL)
-> BUG_ON(ac->ac_handle != handle);
-> ocfs2_sync_local_to_main() see above
-> ocfs2_local_alloc_reserve_for_window()
-> ocfs2_reserve_cluster_bitmap_bits()
-> ocfs2_reserve_suballoc_bits()
-> ocfs2_handle_add_inode()
-> BUG_ON(!handle);fs/ocfs2/journal.c line:213
-> BUG_ON(!inode);fs/ocfs2/journal.c line:214
-> BUG_ON(OCFS2_I(inode)->ip_handle);fs/ocfs2/journal.c line:222
-> BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list));fs/ocfs2/journal.c line:223
-> ocfs2_block_group_alloc() see above
-> BUG_ON(handle->flags & OCFS2_HANDLE_STARTED);fs/ocfs2/suballoc.c line:422
-> BUG_ON(bits_wanted >(le32_to_cpu(fe->id1.bitmap1.i_total)- le32_to_cpu(fe->id1.bitmap1.i_used)));fs/ocfs2/suballoc.c line:465
-> ocfs2_local_alloc_window_bits()
-> BUG_ON(osb->s_clustersize_bits < 12);fs/ocfs2/localalloc.c line:88
-> ocfs2_local_alloc_window_bits()
-> BUG_ON(osb->s_clustersize_bits < 12);fs/ocfs2/localalloc.c line:88
-> BUG_ON(!passed_handle);fs/ocfs2/localalloc.c line:466 -> BUG_ON(!ac);fs/ocfs2/localalloc.c line:467 -> BUG_ON(passed_handle->flags & OCFS2_HANDLE_STARTED);fs/ocfs2/localalloc.c line:468
-> ocfs2_reserve_cluster_bitmap_bits()see above
-> ocfs2_reserve_suballoc_bits() see above
-> ocfs2_alloc_should_use_local()
-> ocfs2_local_alloc_window_bits()
-> BUG_ON(osb->s_clustersize_bits < 12);fs/ocfs2/localalloc.c line:88
-> ocfs2_claim_clusters() see above
dlm fs
1. BUG() opening a file in dlmfs fs/ocfs2/dlm/dlmfs.c line:106 function:dlmfs_file_open()
- dlmfs_file_operations.open=dlmfs_file_open()
-> if (S_ISDIR(inode->i_mode)) BUG(); # if current inode is a directory.
-> user_dlm_cluster_lock()
-> user_may_continue_on_blocked_lock()
-> BUG_ON(!(lockres->l_flags & USER_LOCK_BLOCKED));
-> user_dlm_inc_holders() BUG(); #fs/ocfs2/dlm/userdlm.c line:398
-> user_may_continue_on_blocked_lock()
-> BUG_ON(!(lockres->l_flags & USER_LOCK_BLOCKED));#fs/ocfs2/dlm/userdlm.c line:409
-> BUG_ON(level == LKM_IVMODE);#fs/ocfs2/dlm/userdlm.c line:474
-> BUG_ON(level == LKM_NLMODE);#fs/ocfs2/dlm/userdlm.c line:475
2. BUG() releasing a file in dlmfs fs/ocfs2/dlm/dlmfs.c line:154 function:dlmfs_file_release()
- dlmfs_file_operations.release=dlmfs_file_release()
-> if (S_ISDIR(inode->i_mode)) BUG(); # if current inode is a directory.
-> user_dlm_cluster_unlock()
-> _ _user_dlm_cond_queue_lockres()
-> lockres->l_blocking not in ( LKM_EXMODE, LKM_PRMODE) BUG();
-> _ _user_dlm_queue_lockres()
-> user_dlm_grab_inode_ref()
-> if (!igrab(inode)) BUG();#fs/ocfs2/dlm/userdlm.c line:170
-> user_dlm_dec_holders()
-> BUG_ON(!lockres->l_ex_holders);fs/ocfs2/dlm/userdlm.c line:524
-> BUG_ON(!lockres->l_ro_holders);fs/ocfs2/dlm/userdlm.c line:528
-> BUG() # fs/ocfs2/dlm/userdlm.c line:532
3. BUG() init a inode structure for dlmfs fs/ocfs2/dlm/dlmfs.c line:385 function:dlmfs_get_inode()
- dlmfs_get_inode()
-> if mode not in(S_IFREG,S_IFDIR) then BUG();# dlmfs only support regular file and dir inode now. fs/ocfs2/dlm/dlmfs.c line:385
-> BUG_ON(!ip->ip_parent); fs/ocfs2/dlm/dlmfs.c line:400
-> user_dlm_lock_res_init()
-> BUG_ON(dentry->d_name.len >= USER_DLM_LOCK_ID_MAX_LEN);fs/ocfs2/dlm/userdlm.c line:600
- dlmfs_root_inode_operations.mkdir=dlmfs_mkdir()
- dlmfs_dir_inode_operations.create=dlmfs_create()
4. BUG_ON() writing a dlmfs file
- dlmfs_file_write()
-> user_dlm_write_lvb()
-> BUG_ON(len > DLM_LVB_LEN);fs/ocfs2/dlm/userdlm.c line:561
-> BUG_ON(lockres->l_level < LKM_EXMODE);fs/ocfs2/dlm/userdlm.c line:565
5. BUG_ON() Reading a dlmfs file
- dlmfs_file_read()
-> user_dlm_read_lvb()
-> BUG_ON(len > DLM_LVB_LEN);fs/ocfs2/dlm/userdlm.c line:578
-> BUG_ON(lockres->l_level < LKM_PRMODE);fs/ocfs2/dlm/userdlm.c line:582
dlm operation
1. BUG_ON() and BUG(), excuting the ast function. dlmast.c line:105 function:_ _dlm_queue_ast()
- There are several functions calling the dlm_queue_ast():
- dlmlock()
-> dlmconvert_master() #called directly by dlmlock(), to convert a lock,only when the local node is the owner of the lockres.
-> dlm_queue_ast()
->_ _dlm_queue_ast()
-> BUG_ON() # checking the parameter,should be not null
-> if (!list_empty(&lock->ast_list)) BUG();
- # that mean if there is already have call back function in the ast_list queue then surely bug happends.
-> dlm_lockres_release_ast()
-> BUG_ON(res->state & DLM_LOCK_RES_MIGRATING);fs/ocfs2/dlm/dlmmaster.c line:3461
- dlm_convert_lock_handler() #handler for DLM_CONVERT_LOCK_MSG on master site.
-> _ _dlm_queue_ast() see above
->BUG_ON(lksb->flags &(DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB));fs/ocfs2/dlm/dlmconvert.c line:502 506
- dlmlock() or dlm_create_lock_handler()
-> BUG_ON(!dlm);fs/ocfs2/dlm/dlmlock.c line:456 function:dlm_create_lock_handler()
-> dlmlock_master() #performs lock creation at the lockres master site
-> _ _dlm_lockres_drop_inflight_ref()
-> BUG_ON(res->inflight_locks == 0);fs/ocfs2/dlm/dlmmaster.c line:754
dlm_thread() -> dlm_shuffle_lists() (if converting a lock with no convert_type then -> BUG()).
- dlmlock()
2. BUG() sending ast message to a node dlmast.c line:464 function:dlm_send_proxy_ast_msg()
- dlm_send_proxy_ast_msg()
-> if(status == DLM_RECOVERING) BUG();else if(status == DLM_MIGRATING) BUG();
->dlm_flush_asts()
-> dlm_do_remote_ast()
->dlm_send_proxy_ast()
-> dlm_send_proxy_bast()
-> dlm_lockres_release_ast()
-> BUG_ON(res->state & DLM_LOCK_RES_MIGRATING);fs/ocfs2/dlm/dlmmaster.c line:3461
-> BUG_ON(!lock->ast_pending);fs/ocfs2/dlm/dlmthread.c line:542
-> BUG_ON(!lock->bast_pending);fs/ocfs2/dlm/dlmthread.c line:580
-> BUG_ON(lock->ml.highest_blocked <= LKM_IVMODE);fs/ocfs2/dlm/dlmthread.c line:584
3. BUG() convert a queue index to a queue pointer. fs/ocfs2/dlm/dlmcommon.h line:347 function:dlm_list_idx_to_ptr()
- dlm_list_idx_to_ptr()
-> if idx not in (DLM_GRANTED_LIST,DLM_CONVERTING_LIST,DLM_BLOCKED_LIST) then BUG();
4. BUG() Sending a remote dlmlock request fs/ocfs2/dlm/dlmlock.c line:312 function:dlm_send_remote_lock_request()
- dlmlock()
-> dlmlock_remote()
->dlm_send_remote_lock_request()
-> if (ret == DLM_REJECTED) BUG();# remote lock creation return DLM_REJECTED.
5. BUG() removing an entry from dlm_master_list fs/ocfs2/dlm/dlmmaster.c line:377 function:_ _dlm_put_mle()
- _ _dlm_put_mle()
-> if(mle.mle_refs.refcount==0) then BUG();
- dlmlock()
[-> dlm_get_lock_resource()]
-> dlm_init_mle()
-> BUG_ON(!res); fs/ocfs2/dlm/dlmmaster.c line:425
-> BUG_ON(!name); fs/ocfs2/dlm/dlmmaster.c line:438
-> BUG_ON(!name); fs/ocfs2/dlm/dlmmaster.c line:432
-> dlm_put_mle_inuse()
- dlm_trigger_migration()
-> dlm_migrate_lockres()
-> dlm_put_mle_inuse()
-> dlm_mark_lockres_migrating()
-> 4 BUG_ON()s; fs/ocfs2/dlm/dlmmaster.c line:2845-2890
-> dlm_remove_nonlocal_locks()
-> 5 BUG_ON()s fs/ocfs2/dlm/dlmmaster.c line:2927-2939
dlm_empty_lockres() -> dlm_migrate_lockres() -> dlm_put_mle_inuse() #Should be called only after beginning the domain leave process.
dlm_get_lock_resource() or dlm_master_request_handler() or dlm_migrate_lockres() or dlm_migrate_request_handler()
-> dlm_put_mle()
- dlm_wait_for_lock_mastery() or dlm_assert_master_worker() or dlm_finish_migration()
-> dlm_do_assert_master()
- dlm_assert_master_handler() # handler for DLM_ASSERT_MASTER_MSG message
-> BUG_ON(res->state & DLM_LOCK_RES_DIRTY); fs/ocfs2/dlm/dlmmaster.c line:1990
- dlm_register_domain_handlers()
-> dlm_hb_node_down_cb()
-> _ _dlm_hb_node_down
-> dlm_do_local_recovery_cleanup()
[-> dlm_clean_master_list()]
-> BUG_ON() fs/ocfs2/dlm/dlmmaster.c line:3241
-> dlm_move_lockres_to_recovery_list()
-> BUG_ON(i != DLM_CONVERTING_LIST); fs/ocfs2/dlm/dlmmaster.c line:1946
-> BUG_ON(i != DLM_BLOCKED_LIST); fs/ocfs2/dlm/dlmmaster.c line:1954
-> BUG_ON(i != DLM_GRANTED_LIST); fs/ocfs2/dlm/dlmmaster.c line:1975
-> BUG_ON(i != DLM_CONVERTING_LIST); fs/ocfs2/dlm/dlmmaster.c line:1986
-> dlm_free_dead_locks()
-> BUG_ON(!test_bit(dead_node, res->refmap)); fs/ocfs2/dlm/dlmmaster.c line:2178
-> _ _dlm_hb_node_down()
-> dlm_do_local_recovery_cleanup()
-> _ _dlm_lockres_calc_usage()
-> _ _dlm_lockres_unused()
-> BUG_ON(res->inflight_locks != 0);fs/ocfs2/dlm/dlmthread.c line: 107
- dlm_begin_reco_handler()
-> _ _dlm_hb_node_down
-> dlm_do_local_recovery_cleanup()
-> _ _dlm_lockres_calc_usage()
-> BUG_ON(res->inflight_locks != 0);fs/ocfs2/dlm/dlmthread.c line: 107
-> dlm_clean_master_list() see above
6. BUG() looking up a lock by name. fs/ocfs2/dlm/dlmmaster.c line:780 function:dlm_get_lock_resource()
- dlmlock()
-> dlm_get_lock_resource()
-> BUG_ON(!lockid); fs/ocfs2/dlm/dlmmaster.c line:795
-> BUG_ON(tmpres->state & DLM_LOCK_RES_DROPPING_REF); fs/ocfs2/dlm/dlmmaster.c line:795
-> BUG_ON(mig && mle->master == dlm->node_num); fs/ocfs2/dlm/dlmmaster.c line:809
-> BUG_ON(res->owner == O2NM_MAX_NODES); fs/ocfs2/dlm/dlmmaster.c line:1033
-> if (mle->type == DLM_MLE_MASTER) BUG(); fs/ocfs2/dlm/dlmmaster.c line:780
-> dlm_lockres_grab_inflight_ref_new()
-> _ _dlm_lockres_grab_inflight_ref()
-> BUG_ON(res->inflight_locks != 0); fs/ocfs2/dlm/dlmmaster.c line:738
-> _ _dlm_lockres_drop_inflight_ref()
-> BUG_ON(res->inflight_locks == 0); fs/ocfs2/dlm/dlmmaster.c line:754
[->dlm_wait_for_lock_mastery()]
-> dlm_do_master_request()
-> BUG_ON(mle->type == DLM_MLE_MIGRATION); fs/ocfs2/dlm/dlmmaster.c line:1382
-> dlm_do_assert_master()
-> BUG_ON(namelen > O2NM_MAX_NAME_LEN); fs/ocfs2/dlm/dlmmaster.c line:1718
7. BUG()s & BUG_ON() sending the DLM_MASTER_REQUEST_MSG message fs/ocfs2/dlm/dlmmaster.c line:1400 1403 1414 1450
- dlmlock()
->dlm_get_lock_resource()
-> dlm_do_master_request()
-> BUG_ON(mle->type == DLM_MLE_MIGRATION);
-> according to the return value of o2net_send_message(),there are several BUG()s
8. BUG()s handling the DLM_MASTER_REQUEST_MSG message fs/ocfs2/dlm/dlmmaster.c line:1553 1561 1576 1651 1680
- dlm_master_request_handler()
[-> dlm_add_migration_mle()]
-> dlm_init_mle()
-> 3 BUG_ON()s fs/ocfs2/dlm/dlmmaster.c line:425 438 432
-> 5 BUG()s used here.
9. BUG()s fs/ocfs2/dlm/dlmmaster.c line:1747 1767 function:dlm_do_assert_master()
- dlmlock()
-> dlm_get_lock_resource()
-> dlm_wait_for_lock_mastery()
-> dlm_do_assert_master()
-> BUG_ON(namelen > O2NM_MAX_NAME_LEN); fs/ocfs2/dlm/dlmmaster.c line:1718
-> dlm_do_assert_master()
-> BUG_ON(namelen > O2NM_MAX_NAME_LEN); fs/ocfs2/dlm/dlmmaster.c line:1718
-> dlm_lockres_release_ast()
-> BUG_ON(res->state & DLM_LOCK_RES_MIGRATING); fs/ocfs2/dlm/dlmmaster.c line:3461
-> dlm_finish_migration()
-> dlm_do_assert_master()see above
10. BUG()
- dlmlock()
-> dlm_get_lock_resource()
-> dlm_pre_master_reco_lockres()
-> BUG() fs/ocfs2/dlm/dlmmaster.c line:2233 function:dlm_pre_master_reco_lockres()
-> dlm_do_master_requery()
BUG_ON() fs/ocfs2/dlm/dlmrecovery.c line:1611 1612
11. BUG() sending a DLM_DEREF_LOCKRES_MSG message fs/ocfs2/dlm/dlmmaster.c line:2291 function: dlm_drop_lockres_ref()
- dlm_thread()
-> dlm_run_purge_list()
-> dlm_purge_lockres()
-> ret = dlm_drop_lockres_ref() if (r < 0) BUG();
-> dlm_drop_lockres_ref()
-> BUG_ON(namelen > O2NM_MAX_NAME_LEN); fs/ocfs2/dlm/dlmmaster.c line:2272
-> if(!dlm_is_host_down(ret)) BUG();
-> _ _dlm_lockres_unused()
-> BUG_ON(res->inflight_locks != 0);fs/ocfs2/dlm/dlmthread.c line: 107
->if(dlm_purge_lockres()) BUG();
-> BUG_ON(!res);fs/ocfs2/dlm/dlmthread.c line:661
-> BUG_ON(res->owner != dlm->node_num);fs/ocfs2/dlm/dlmthread.c line:684
-> BUG_ON(res->state & DLM_LOCK_RES_MIGRATING);fs/ocfs2/dlm/dlmthread.c line:689
12. BUG() find a mle from dlm,remove any old and add new. fs/ocfs2/dlm/dlmmaster.c line:3191 function:dlm_add_migration_mle()
dlm_migrate_request_handler() -> dlm_add_migration_mle()
- dlm_trigger_migration()
-> dlm_migrate_lockres()
-> dlm_add_migration_mle()
-> dlm_add_migration_mle()
-> BUG() fs/ocfs2/dlm/dlmmaster.c line:3191
-> dlm_mark_lockres_migrating()
-> BUG_ON(res->state & DLM_LOCK_RES_MIGRATING); fs/ocfs2/dlm/dlmmaster.c line:3461
Most of the BUG() in file dlmrecovery.c are under the condition of if(!dlm_is_host_down(ret)),that's mean sent message to host but got no-defined return value.
13. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1203 function:dlm_add_lock_to_array()
dlm_request_all_locks_worker() -> dlm_send_one_lockres() -> (dlm_add_dummy_lock()) -> dlm_add_lock_to_array()
ocfs2_put_super() or ocfs2_fill_super() see above
15. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1580 function:dlm_lockres_master_requery()
- dlm_mig_lockres_worker()
-> dlm_lockres_master_requery()
-> dlm_do_master_requery()
-> BUG_ON(status < 0);fs/ocfs2/dlm/dlmrecovery.c line:1611
-> BUG_ON(status > DLM_LOCK_RES_OWNER_UNKNOWN);fs/ocfs2/dlm/dlmrecovery.c line:1612
16. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1651 function:dlm_master_requery_handler()
- dlm_master_requery_handler() # handler for the DLM_MASTER_REQUERY_MSG message.
17. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1768 1844 function:dlm_process_recovery_data()
- dlm_mig_lockres_worker()
[-> dlm_process_recovery_data()]
-> _ _dlm_lockres_drop_inflight_ref
-> BUG_ON(res->inflight_locks == 0); fs/ocfs2/dlm/dlmmaster.c line:754
-> dlm_list_num_to_pointer()
-> BUG_ON(list_num < 0);fs/ocfs2/dlm/dlmrecovery.c line:1666
-> BUG_ON(list_num > 2);fs/ocfs2/dlm/dlmrecovery.c line:1667
-> BUG_ON(mres->num_locks != 1);fs/ocfs2/dlm/dlmrecovery.c line:1721
-> BUG_ON(ml->highest_blocked != LKM_IVMODE);fs/ocfs2/dlm/dlmrecovery.c line:1731
-> BUG_ON(!(mres->flags & DLM_MRES_MIGRATION));fs/ocfs2/dlm/dlmrecovery.c line:1743
-> BUG_ON(lock->ml.node != ml->node);fs/ocfs2/dlm/dlmrecovery.c line:1770
-> BUG_ON(queue != &res->converting);fs/ocfs2/dlm/dlmrecovery.c line:1803
-> BUG_ON(ml->type != LKM_EXMODE && ml->type != LKM_PRMODE);fs/ocfs2/dlm/dlmrecovery.c line:1826
18. BUG_ON()
- dlm_proxy_ast_handler()
-> dlm_do_local_ast()
-> dlm_update_lvb()
-> BUG_ON(!lksb);fs/ocfs2/dlm/dlmast.c line:188
-> BUG_ON(lock->ml.node != dlm->node_num);fs/ocfs2/dlm/dlmast.c line:225
->BUG_ON(res->owner == dlm->node_num);fs/ocfs2/dlm/dlmast.c line:335 ->BUG_ON(!(lock->lksb->flags & DLM_LKSB_GET_LVB));fs/ocfs2/dlm/dlmast.c line:402 -> dlm_do_local_bast()
-> BUG_ON(lock->ml.node != dlm->node_num);fs/ocfs2/dlm/dlmast.c line:259
dlm_thread()->dlm_flush_asts()see below->dlm_do_local_ast()see above
- dlm_thread()
-> dlm_flush_asts()
-> dlm_do_remote_ast()
-> dlm_update_lvb()
-> BUG_ON(!lksb);fs/ocfs2/dlm/dlmast.c line:188
-> BUG_ON(lock->ml.node != dlm->node_num);fs/ocfs2/dlm/dlmast.c line:242 -> dlm_do_local_bast()
-> BUG_ON(lock->ml.node != dlm->node_num);fs/ocfs2/dlm/dlmast.c line:259
19. BUG_ON() registering DLM.
- many points
->dlm_put()
-> kref_init(&dlm->dlm_refs, dlm_ctxt_release);
-> dlm_ctxt_release()
-> BUG_ON()fs/ocfs2/dlm/dlmdomain.c line:282 283
ocfs2_fill_super() see above
20. BUG_ON()
- dlm_assert_joined_handler()
-> BUG_ON(dlm->joining_node != assert->node_idx);fs/ocfs2/dlm/dlmdomain.c line:774
21. BUG_ON()
- dlm_cancel_join_handler()
-> BUG_ON(dlm->joining_node != cancel->node_idx);fs/ocfs2/dlm/dlmdomain.c line:811
22. BUG_ON()
- dlm_lock_put()
->kref_put(&lock->lock_refs, dlm_lock_release);
-> dlm_lock_release()
-> BUG_ON(!list_empty(&lock->list));fs/ocfs2/dlm/dlmlock.c line:344
-> BUG_ON(!list_empty(&lock->ast_list));fs/ocfs2/dlm/dlmlock.c line:345
-> BUG_ON(!list_empty(&lock->bast_list));fs/ocfs2/dlm/dlmlock.c line:346
-> BUG_ON(lock->ast_pending);fs/ocfs2/dlm/dlmlock.c line:347
-> BUG_ON(lock->bast_pending);fs/ocfs2/dlm/dlmlock.c line:348
- dlmlock() or dlm_create_lock_handler()
->dlm_new_lock()
->dlm_init_lock()
->kref_init(&newlock->lock_refs, dlm_lock_release);see above
23. BUG_ON() fs/ocfs2/dlm/dlmmaster.c line:613 62-648 function:dlm_lockres_release()
- dlm_lockres_put()
-> kref_put(&res->refs, dlm_lockres_release);
-> dlm_lockres_release()
- dlm_mig_lockres_handler()
-> dlm_new_lockres()
-> dlm_init_lockres()
-> kref_init(&res->refs, dlm_lockres_release);
-> dlm_lockres_release()
-> BUG_ON(!(mres->flags &(DLM_MRES_RECOVERY|DLM_MRES_MIGRATION)));fs/ocfs2/dlm/dlmrecovery.c line:1347
-> BUG_ON(!(mres->flags & DLM_MRES_RECOVERY));fs/ocfs2/dlm/dlmrecovery.c line:1352
-> BUG_ON(!(mres->flags & DLM_MRES_RECOVERY));fs/ocfs2/dlm/dlmrecovery.c line:1439
- dlmlock()
-> dlm_get_lock_resource()
-> dlm_new_lockres()
-> dlm_init_lockres()
-> kref_init(&res->refs, dlm_lockres_release);
-> dlm_lockres_release()
24. BUG_ON() fs/ocfs2/dlm/dlmmaster.c line:2340
- dlm_deref_lockres_handler()
-> BUG_ON(res->state & DLM_LOCK_RES_DROPPING_REF);
25. BUG_ON() fs/ocfs2/dlm/dlmrecovery.c line:835
- dlm_request_all_locks_handler()
-> BUG_ON(lr->dead_node != dlm->reco.dead_node);
26. BUG_ON() fs/ocfs2/dlm/dlmunlock.c
- dlm_unlock_lock_handler()
-> dlmunlock_master()
-> dlmunlock_common()
-> 116 BUG_ON(res->owner != dlm->node_num);
-> 118 BUG_ON(res->owner == dlm->node_num);
-> 239 BUG_ON(lock->ml.convert_type != LKM_IVMODE);
-> 241 BUG_ON(lock->ml.convert_type == LKM_IVMODE);
-> 249 BUG_ON(!(actions & DLM_UNLOCK_REMOVE_LOCK));
- dlmunlock()
-> dlmunlock_master()
-> dlmunlock_common() see above
-> BUG_ON(!lock);fs/ocfs2/dlm/dlmunlock.c line:616
-> BUG_ON(!res);fs/ocfs2/dlm/dlmunlock.c line:620
dlmunlock()-> dlmunlock_remote() -> dlmunlock_common() see above
27. BUG_ON() An ast function,called after finish the unlock operation. fs/ocfs2/dlm/userdlm.c line:252 function:user_unlock_ast()
28. BUG_ON() Call back function of some dlm operation.
ocfs2_lock_res_super() -> BUG_ON(!ocfs2_is_super_lock(lockres); fs/ocfs2/dlmglue.c line:143 The ocfs2_lock_res_super() is called by 3 functions:
- ocfs2_super_lops.bast=ocfs2_super_bast_func()
-> BUG_ON(!ocfs2_is_inode_lock(lockres));fs/ocfs2/dlmglue.c line:701
- ocfs2_rename_lops.bast=ocfs2_rename_bast_func()
-> BUG_ON(!ocfs2_is_inode_lock(lockres));fs/ocfs2/dlmglue.c line:733
- ocfs2_super_lops.unblock=ocfs2_unblock_osb_lock()
-> ocfs2_generic_unblock_lock()
-> ocfs2_cancel_convert()
-> BUG_ON(lockres->l_action != OCFS2_AST_CONVERT &&fs/ocfs2/dlmglue.c line:2367
-> BUG_ON(!(lockres->l_flags & OCFS2_LOCK_BLOCKED));fs/ocfs2/dlmglue.c line:2521
- ocfs2_super_lops.bast=ocfs2_super_bast_func()
29. BUG_ON() Get a lock resource for a inode operation.
ocfs2_inode_meta_lops.ast&ocfs2_inode_data_lops.ast=ocfs2_inode_ast_func()
-> ocfs2_generic_handle_convert_action()
-> ocfs2_lock_res_inode()
-> BUG_ON(!ocfs2_is_inode_lock(lockres));fs/ocfs2/dlmglue.c line:151
-> BUG_ON(!(lockres->l_flags & OCFS2_LOCK_BUSY));
-> BUG_ON(!(lockres->l_flags & OCFS2_LOCK_ATTACHED));
-> ocfs2_generic_handle_downconvert_act()
-> BUG_ON(!(lockres->l_flags & OCFS2_LOCK_BUSY)); fs/ocfs2/dlmglue.c line:443
-> BUG_ON(!(lockres->l_flags & OCFS2_LOCK_ATTACHED));fs/ocfs2/dlmglue.c line:444
-> BUG_ON(!(lockres->l_flags & OCFS2_LOCK_BLOCKED));fs/ocfs2/dlmglue.c line:445
-> BUG_ON(lockres->l_blocking <= LKM_NLMODE);fs/ocfs2/dlmglue.c line:446
-> ocfs2_generic_handle_attach_action()
-> BUG_ON((!lockres->l_flags & OCFS2_LOCK_BUSY));fs/ocfs2/dlmglue.c line:494
-> BUG_ON(lockres->l_flags & OCFS2_LOCK_ATTACHED);fs/ocfs2/dlmglue.c line:495
- ocfs2_super_lops.ast=ocfs2_super_ast_func()
-> ocfs2_generic_handle_convert_action() see above
-> BUG_ON(!ocfs2_is_inode_lock(lockres));fs/ocfs2/dlmglue.c line:625
- ocfs2_rename_lops.ast=ocfs2_rename_ast_func()
-> ocfs2_generic_ast_func()
-> ocfs2_generic_handle_convert_action() see above
-> ocfs2_generic_handle_downconvert_act() see above
-> ocfs2_generic_handle_attach_action() see above
-> BUG_ON(!ocfs2_is_inode_lock(lockres));fs/ocfs2/dlmglue.c line:716
ocfs2_inode_meta_lops.ast&ocfs2_inode_data_lops.ast=ocfs2_inode_ast_func()
-> ocfs2_lock_res_inode() see above
-> BUG_ON(!ocfs2_is_inode_lock(lockres));fs/ocfs2/dlmglue.c line:522
ocfs2_inode_meta_lops.bast&ocfs2_inode_data_lops.bast=ocfs2_inode_bast_func()
-> ocfs2_lock_res_inode() see above
-> BUG_ON(!ocfs2_is_inode_lock(lockres));fs/ocfs2/dlmglue.c line:625
- ocfs2_data_convert_worker()
-> ocfs2_lock_res_inode() see above
- ocfs2_inode_data_lops.unblock=ocfs2_unblock_data()
-> ocfs2_lock_res_inode() see above
-> ocfs2_generic_unblock_lock()
-> ocfs2_cancel_convert()
-> BUG_ON(lockres->l_action != OCFS2_AST_CONVERT &&fs/ocfs2/dlmglue.c line:2367
- ocfs2_inode_meta_lops.unblock=ocfs2_unblock_meta()
-> ocfs2_lock_res_inode() see above
30. BUG_ON() A block call back function.
- ocfs2_generic_bast_func()
-> BUG_ON(level <= LKM_NLMODE);fs/ocfs2/dlmglue.c line:603
31. BUG_ON() in the vote thread.
- ocfs2_vote_thread()
-> ocfs2_vote_thread_do_work()
-> BUG_ON(list_empty(&osb->blocked_lock_list));fs/ocfs2/vote.c line:521
-> BUG_ON(!processed);fs/ocfs2/vote.c line:529
-> BUG_ON(list_empty(&osb->vote_list));fs/ocfs2/vote.c line:538
-> ocfs2_process_blocked_lock()
-> BUG_ON(!lockres);fs/ocfs2/dlmglue.c line:2703
-> BUG_ON(!lockres->l_ops);fs/ocfs2/dlmglue.c line:2704
-> BUG_ON(!lockres->l_ops->unblock);fs/ocfs2/dlmglue.c line:2705
-> ocfs2_process_vote()
-> ocfs2_process_mount_request()
-> ocfs2_node_map_set_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:234
-> ocfs2_recovery_map_clear()
-> ocfs2_node_map_clear_bit
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:252
-> ocfs2_node_map_clear_bit
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:252
-> ocfs2_process_umount_request()
-> ocfs2_node_map_set_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:234
-> ocfs2_node_map_clear_bit
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:252
-> ocfs2_ilookup_for_vote()
-> BUG_ON(current != osb->vote_task);fs/ocfs2/heartbeat.c line:82
recovery
1. BUG() Recovering a node.
- _ _ocfs2_recovery_thread
-> ocfs2_recover_node()
-> ocfs2_begin_truncate_log_recovery() or ocfs2_journal_toggle_dirty() or ocfs2_replay_journal() or ocfs2_begin_local_alloc_recovery() or ocfs2_update_disk_slots()
-> ocfs2_write_block()
-> ocfs2_write_blocks()
-> BUG()buffer_head_io.c line:92 function:ocfs2_write_blocks().
-> ocfs2_read_blocks()
-> BUG()buffer_head_io.c line:234 function:ocfs2_read_blocks().
-> ocfs2_replay_journal()
-> ocfs2_meta_lock_full()
-> ocfs2_force_read_journal()
-> BUG_ON(inode->i_blocks !=ocfs2_align_bytes_to_sectors(i_size_read(inode)));fs/ocfs2/journal.c line:831
-> if (!igrab(inode)) BUG();fs/ocfs2/journal.c line:1195 1220 function:ocfs2_replay_journal()
-> if (osb->node_num == node_num) BUG() # should not ever be called to recover themselves.
-> ocfs2_clear_slot()
-> _ _ocfs2_fill_slot()
-> BUG_ON(slot_num == OCFS2_INVALID_SLOT);fs/ocfs2/slot_map.c line:154
-> BUG_ON(slot_num >= si->si_num_slots);fs/ocfs2/slot_map.c line:155
-> BUG_ON((node_num != O2NM_INVALID_NODE_NUM) &&(node_num >= O2NM_MAX_NODES));fs/ocfs2/slot_map.c line:156
-> ocfs2_node_map_is_empty()
-> BUG_ON(map->num_nodes == 0);fs/ocfs2/heartbeat.c line:286
-> ocfs2_recovery_map_clear()
-> ocfs2_node_map_clear_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:252
2. BUG() recovering for a dead node.
- dlm_recovery_thread()
-> dlm_do_recovery()
-> dlm_do_recovery()
-> BUG_ON(dlm->reco.state & DLM_RECO_STATE_ACTIVE);fs/ocfs2/dlm/dlmrecovery.c line:428
-> dlm_end_recovery()
-> BUG_ON(dlm->reco.state & DLM_RECO_STATE_ACTIVE);fs/ocfs2/dlm/dlmrecovery.c line:436
-> dlm_remaster_locks()
-> dlm_init_recovery_area()
-> BUG_ON(num == dead_node);fs/ocfs2/dlm/dlmrecovery.c line:750
-> BUG_ON(ndata->state != DLM_RECO_NODE_DATA_INIT);fs/ocfs2/dlm/dlmrecovery.c line:565
-> 2 BUG()s # checking ndata->state fs/ocfs2/dlm/dlmrecovery.c line:612 function:dlm_remaster_locks()
-> dlm_pick_recovery_master
-> BUG_ON(status);fs/ocfs2/dlm/dlmrecovery.c line:2467
3. BUG() fs/ocfs2/dlm/dlmrecovery.c line:965 function:dlm_send_all_done_msg()
dlm_request_all_locks_worker() -> dlm_send_all_done_msg() -> if (!dlm_is_host_down(ret)) BUG();
4. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1008 function:dlm_reco_data_done_handler()
dlm_reco_data_done_handler() -> switch (ndata->state) BUG();
5. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1148 function:dlm_send_mig_lockres_msg()
dlm_request_all_locks_worker() -> dlm_send_one_lockres() -> dlm_send_mig_lockres_msg()
6. BUG() picking a new master but found no node dead fs/ocfs2/dlm/dlmrecovery.c line:2452 2528 function:dlm_pick_recovery_master()
dlm_recovery_thread() -> dlm_do_recovery() -> dlm_pick_recovery_master()
7. BUG()s performing the finalizing recovery. fs/ocfs2/dlm/dlmrecovery.c line:2769 2775 2787 2799 2807 function:dlm_finalize_reco_handler()
- dlm_finalize_reco_handler() # handler of the DLM_FINALIZE_RECO_MSG message.
8. BUG_ON() A worker function used during recovery.
- dlm_dispatch_work()
-> BUG_ON(item->dlm != dlm);fs/ocfs2/dlm/dlmrecovery.c line:175
run-time
1. BUG() Creating a configfs directory. super.c line:1299 function:ocfs2_initialize_super().
- configfs_dir_inode_operations.mkdir=configfs_mkdir
-> configfs_mkdir()
-> link_group()# if there is no parent_group->cg_subsys and parent_group is not root
-> BUG()
20. BUG_ON() create a directory for an config_item.
- configfs_dir_inode_operations.mkdir = configfs_mkdir()
or init_o2nm() -> configfs_register_subsystem()
-> configfs_attach_group()
-> configfs_attach_item()
-> configfs_create_dir()
-> BUG_ON(!item);# Checking the parameter item, not NULL.fs/configfs/dir.c line:163
-> populate_attrs() # Creating an attribute file for an item.
-> configfs_create_file()
-> BUG_ON(!item || !item->ci_dentry || !attr); # fs/configfs/file.c line:359
21. BUG_ON() Drop the initial reference from make_item()/make_group() fs/configfs/dir.c line:670 function:client_drop_item()
- configfs_mkdir() or configfs_rmdir()
-> BUG_ON(!subsys);# subsys=to_config_group(parent_item)->cg_subsys; make sure it is not null.
-> client_drop_item()
-> BUG_ON(!parent_item->ci_type);#make sure the parent_item parameter 's ci_type column is not null.
2. BUG() fetching a configfs node name. inode.c line:115 function: configfs_get_name.
- configfs_dir_inode_operations.lookup=configfs_lookup #looking up a path name
-> configfs_lookup()
-> configfs_get_name()
-> if (!sd || !sd->s_element) BUG();
->configfs_readdir()
-> configfs_get_name()
-> if (!sd || !sd->s_element) BUG();
3.BUG() Deleting/unlinking a inode in configfs. symlink.c line:166 function:configfs_unlink()
- configfs_dir_inode_operations.unlink=configfs_unlink()
-> if (dentry->d_parent == configfs_sb->s_root) BUG();#when the unlinking dentry is the root of configfs.
4.BUG() extending a file cache. aops.c line:195 function:ocfs2_get_block()
- path1 ocfs2_aops.readpage=ocfs2_readpage()
-> block_read_full_page(page, ocfs2_get_block)
-> ocfs2_get_block()
-> if (vbo != OCFS2_I(inode)->ip_mmu_private) BUG();
- path2 ocfs2_aops.writepage=ocfs2_writepage()
-> block_write_full_page(page, ocfs2_get_block)
-> ocfs2_get_block()
-> if (vbo != OCFS2_I(inode)->ip_mmu_private) BUG();
- path3 ocfs2_aops.prepare_write=ocfs2_prepare_write()
-> cont_prepare_write(page, from, to, ocfs2_get_block,&(OCFS2_I(inode)->ip_mmu_private));
-> ocfs2_get_block()
-> if (vbo != OCFS2_I(inode)->ip_mmu_private) BUG();
5.BUG() Reading in blocks from disk buffer_head_io.c line:234 function:ocfs2_read_blocks
- ocfs2_read_block()
-> ocfs2_read_blocks()
-> BUG()
6.BUG() finding a index of a configfs_attribute structure. cluster/nodemanager.c line:463 function:o2nm_attr_index
- configfs_item_operations o2nm_node_item_ops.store_attribute=o2nm_node_store
-> o2nm_node_store()
-> o2nm_attr_index() # matching a configfs_attribute structure in array o2nm_node_attrs,but find nothing then bug()
->BUG()
7. BUG() geting a cluster lock
- ocfs2_data_lock() or ocfs2_meta_lock_full() or ocfs2_super_lock() or ocfs2_rename_lock()
-> ocfs2_cluster_lock()
-> ocfs2_inc_holders()
-> BUG_ON(!lockres); fs/ocfs2/dlmglue.c line:354 function:ocfs2_inc_holders()
-> BUG(); fs/ocfs2/dlmglue.c line:364 function:ocfs2_inc_holders()
-> lockres_add_flag_callback()
-> BUG_ON(!list_empty(&fcb->fc_lockres_item)); fs/ocfs2/dlmglue.c line:837
-> BUG_ON(fcb->fc_cb == NULL); fs/ocfs2/dlmglue.c line:838
-> ocfs2_may_continue_on_blocked_lock()
-> BUG_ON(!(lockres->l_flags & OCFS2_LOCK_BLOCKED)); fs/ocfs2/dlmglue.c line:853
-> BUG_ON(level == LKM_IVMODE);
-> BUG_ON(level == LKM_NLMODE);
8. BUG() releasing a cluster lock
- ocfs2_data_unlock() or ocfs2_meta_unlock() or ocfs2_super_unlock() or ocfs2_rename_unlock()
-> ocfs2_cluster_unlock()
-> ocfs2_dec_holders()
-> BUG(); fs/ocfs2/dlmglue.c line:364 function:ocfs2_dec_holders()
-> BUG_ON(!lockres); fs/ocfs2/dlmglue.c line:375 function:ocfs2_dec_holders()
-> BUG_ON(!lockres->l_ex_holders); fs/ocfs2/dlmglue.c line:379 function:ocfs2_dec_holders()
-> BUG_ON(!lockres->l_ro_holders); fs/ocfs2/dlmglue.c line:383 function:ocfs2_dec_holders()
->ocfs2_vote_on_unlock()
-> BUG();
9. BUG() in inode lock call back function fs/ocfs2/dlmglue.c line:553 function:ocfs2_inode_ast_func()
10. BUG() in generic lock call back function fs/ocfs2/dlmglue.c line:665 function:ocfs2_generic_ast_func()
11. BUG() in unlock lock call back function fs/ocfs2/dlmglue.c line:2100 function:ocfs2_unlock_ast_func()
The above three BUG()s may happen when find undefined lock actions.
12. BUG() Droping a lock
- ocfs2_clear_inode()
-> ocfs2_drop_inode_locks()
-> ocfs2_drop_lock()
-> _ _ocfs2_drop_lock()
-> if(dlmunlock() != DLM_NORMAL) BUG()
-> ocfs2_mark_lockres_freeing() see above
13. BUG() down converting a lock
- ocfs2_inode_meta_lops.unblock=ocfs2_unblock_meta()
-> ocfs2_do_unblock_meta()
-> _ _ocfs2_downconvert_lock()
-> BUG_ON(lockres->l_blocking <= LKM_NLMODE); fs/ocfs2/dlmglue.c line:2315 function:_ _ocfs2_downconvert_lock()
-> if (lockres->l_level <= new_level) BUG(); fs/ocfs2/dlmglue.c line:2320 function:_ _ocfs2_downconvert_lock()
-> ocfs2_cancel_convert()
-> _ _ocfs2_cancel_convert() fs/ocfs2/dlmglue.c line:2367
-> ocfs2_can_downconvert_meta_lock()
-> BUG_ON(new_level != LKM_NLMODE && new_level !=LKM_PRMODE); fs/ocfs2/dlmglue.c line:2423
-> BUG_ON(!(lockres->l_flags & OCFS2_LOCK_BLOCKED)); fs/ocfs2/dlmglue.c line:2453
-> BUG_ON(lockres->l_level != LKM_EXMODE && fs/ocfs2/dlmglue.c line:2458
14. BUG() Init a super block inode. fs/ocfs2/inode.c line:297 function:ocfs2_populate_inode()
ocfs2_dir_iops.mkdir= ocfs2_mkdir-> ocfs2_mknod() or ocfs2_dir_iops.symlink=ocfs2_symlink()
-> ocfs2_mknod_locked()
-> ocfs2_populate_inode()
-> BUG();
-> ocfs2_inode_lock_res_init()
-> BUG_ON(type != OCFS2_LOCK_TYPE_META &&) fs/ocfs2/dlmglue.c line:283
-> if (ocfs2_populate_inode(inode, fe, 1) < 0) BUG();
-> ocfs2_set_new_buffer_uptodate()
-> BUG_ON(ocfs2_buffer_cached(oi, bh));fs/ocfs2/uptodate.c line:450
-> ocfs2_create_new_inode_locks()
-> BUG_ON(!inode); fs/ocfs2/dlmglue.c line:1086
-> BUG_ON(!ocfs2_inode_is_new(inode)); fs/ocfs2/dlmglue.c line:1087
-> BUG_ON(lockres->l_flags & OCFS2_LOCK_ATTACHED); fs/ocfs2/dlmglue.c line:1104
-> BUG_ON(lockres->l_flags & OCFS2_LOCK_ATTACHED); fs/ocfs2/dlmglue.c line:1117
-> ocfs2_claim_new_inode()
-> ocfs2_claim_suballoc_bits() see below
-> BUG_ON(!ac);fs/ocfs2/suballoc.c line:1315
-> BUG_ON(ac->ac_bits_given != 0);fs/ocfs2/suballoc.c line:1316
-> BUG_ON(ac->ac_bits_wanted != 1);fs/ocfs2/suballoc.c line:1317
-> BUG_ON(ac->ac_which != OCFS2_AC_USE_INODE);fs/ocfs2/suballoc.c line:1318
-> BUG_ON(ac->ac_handle != handle);fs/ocfs2/suballoc.c line:1319
-> BUG_ON(num_bits != 1);fs/ocfs2/suballoc.c line:1334
-> ocfs2_extend_allocation()see below
-> ocfs2_reserve_clusters()see above
ocfs2_get_dentry()or ocfs2_get_parent() or ocfs2_complete_recovery()->ocfs2_recover_orphans()->ocfs2_queue_orphans() or ocfs2_lookup() or ocfs2_fill_super()->ocfs2_initialize_super()->ocfs2_init_global_system_inodes() or many others that calling ocfs2_get_system_file_inode() -> _ocfs2_get_system_file_inode(),all of those will call ocfs2_iget().
- ocfs2_iget()
-> ocfs2_read_locked_inode()
-> ocfs2_populate_inode()
-> ocfs2_populate_inode() see above
-> ocfs2_inode_lock_res_init()
-> ocfs2_lock_res_init_common()
-> ocfs2_build_lock_name()
-> BUG_ON(type >= OCFS2_NUM_LOCK_TYPES); fs/ocfs2/dlmglue.c line:209
-> BUG_ON(type >= OCFS2_NUM_LOCK_TYPES); fs/ocfs2/dlmglue.c line:215
-> ocfs2_read_locked_inode()
-> BUG_ON(args->fi_blkno != le64_to_cpu(fe->i_blkno));fs/ocfs2/inode.c line:394
- ocfs2_iget()
15. BUG() changing a file name fs/ocfs2/namei.c line:1040 function:ocfs2_rename()
- ocfs2_rename()
-> if (!igrab(new_inode)) BUG();
-> ocfs2_bread()
-> BUG_ON(!reada);fs/ocfs2/inode.c line:1028
16. BUG() Changing super block data fs/ocfs2/super.c line:185 function:ocfs2_write_super()
ocfs2_write_super() -> if (!mutex_trylock(&sb->s_lock) == 0) BUG();
17. BUG() Get a reference of an inode. fs/ocfs2/sysfile.c line:81 93 function:ocfs2_get_system_file_inode()
- many others
-> ocfs2_get_system_file_inode() # this function is called by many functions that need operate on inode structure.
-> if (!inode) BUG();
18. BUG() Insert a meta data cache item to the tree. fs/ocfs2/uptodate.c line:268 function:_ _ocfs2_insert_cache_tree()
- ocfs2_set_buffer_uptodate()
-> _ _ocfs2_set_buffer_uptodate()
-> ocfs2_expand_cache()
-> _ _ocfs2_insert_cache_tree()
->if duplicate block inserted then BUG(),this should never happen.
-> ocfs2_append_cache_array()
-> BUG_ON(ci->ci_num_cached >=OCFS2_INODE_MAX_CACHE_ARRAY);fs/ocfs2/uptodate.c line:232
- the ocfs2_set_buffer_uptodate() function could be called by the following functions:
ocfs2_write_block() -> ocfs2_write_blocks()
ocfs2_read_block() or ocfs2_force_read_journal() -> ocfs2_read_blocks()
- ocfs2_set_new_buffer_uptodate()
19. BUG_ON() Releasing a inode structure. fs/configfs/dir.c line:45 function:configfs_d_iput
- configfs_dentry_ops.d_iput = configfs_d_iput()
-> BUG_ON(sd->s_dentry != dentry);# this sd don't belong to the dentry
22. BUG_ON() Allocate and fill buffer from item fs/configfs/file.c line:73 function:fill_read_buffer
- configfs_file_operations.read = configfs_read_file()
-> fill_read_buffer()
-> BUG_ON(count > (ssize_t)PAGE_SIZE);# if the read size larger than page size,then bug.
23. BUG_ON() doing asynchronous IO fs/ocfs2/aio.c line:119 function:ocfs2_ki_dtor()
- ocfs2_fops.aio_read = ocfs2_file_aio_read() ocfs2_fops.aio_write = ocfs2_file_aio_write()
-> okp_alloc() will set iocb->ki_dtor = ocfs2_ki_dtor;
-> ocfs2_ki_dtor()
-> BUG_ON(okp == NULL);
-> BUG_ON(okp->kp_inode == NULL);
#okp_alloc only assigns the iocb->private and ->ki_dtor pointers if it was able to alloc the okp and get an inode reference.
24. BUG_ON()s in alloc.c
- There are so many BUG_ONs in this file.So for each path run into BUG_ON() this file:
ocfs2_num_free_extents() -> BUG_ON(el->l_tree_depth != 0);fs/ocfs2/alloc.c line:136 function:ocfs2_num_free_extents()
- This function is called in several paths:
ocfs2_mkdir() -> ocfs2_mknod() or ocfs2_link() or ocfs2_rename() or ocfs2_symlink() or ocfs2_unlink() -> ocfs2_prepare_orphan_dir()
->ocfs2_prepare_dir_for_insert()
-> BUG_ON(!S_ISDIR(dir->i_mode));fs/ocfs2/dir.c line:537 function:ocfs2_prepare_dir_for_insert()
-> BUG_ON(le64_to_cpu(fe->i_size) != i_size_read(dir));fs/ocfs2/dir.c line:539 function:ocfs2_prepare_dir_for_insert()
-> BUG_ON(!bh);fs/ocfs2/dir.c line:572 function:ocfs2_prepare_dir_for_insert()
-> ocfs2_bread()
-> BUG_ON(!reada);fs/ocfs2/inode.c line:1028
-> ocfs2_extend_dir()
-> ocfs2_num_free_extents()
-> BUG_ON(el->l_tree_depth != 0);fs/ocfs2/alloc.c line:136 function:ocfs2_num_free_extents()
-> ocfs2_reserve_new_metadata()
-> ocfs2_reserve_suballoc_bits() see above
-> ocfs2_do_extend_dir()
-> ocfs2_extend_allocation()see above
-> ocfs2_set_new_buffer_uptodate()
-> BUG_ON(ocfs2_buffer_cached(oi, bh));fs/ocfs2/uptodate.c line:450
-> ocfs2_fill_new_dir()
-> ocfs2_set_new_buffer_uptodate()
-> BUG_ON(ocfs2_buffer_cached(oi, bh));fs/ocfs2/uptodate.c line:450
-> ocfs2_do_extend_dir() or directly from ocfs2_symlink()
-> BUG_ON(status == -EAGAIN);fs/ocfs2/dir.c line:362 function:ocfs2_do_extend_dir()
-> ocfs2_reserve_clusters()see above
-> ocfs2_extend_allocation()
-> BUG_ON(!clusters_to_add);fs/ocfs2/file.c line:642
-> BUG_ON(num_bits > clusters_to_add);fs/ocfs2/file.c line:680
-> ocfs2_num_free_extents()
-> ocfs2_insert_extent()
-> BUG_ON(le16_to_cpu(el->l_next_free_rec) != le16_to_cpu(el->l_count));fs/ocfs2/alloc.c line:272
-> BUG_ON(bh);fs/ocfs2/alloc.c line:283
-> ocfs2_shift_tree_depth()
-> ocfs2_create_new_meta_bhs()
-> ocfs2_set_new_buffer_uptodate()
-> BUG_ON(ocfs2_buffer_cached(oi, bh));fs/ocfs2/uptodate.c line:450
-> ocfs2_claim_metadata()
-> ocfs2_claim_suballoc_bits()
-> BUG_ON(ac->ac_bits_given >= ac->ac_bits_wanted);fs/ocfs2/suballoc.c line:1199
-> BUG_ON(bits_wanted > (ac->ac_bits_wanted - ac->ac_bits_given));fs/ocfs2/suballoc.c line:1200
-> BUG_ON(!ac->ac_bh);fs/ocfs2/suballoc.c line:1201
-> ocfs2_search_chain()
-> ocfs2_block_group_set_bits()
-> BUG_ON(le16_to_cpu(bg->bg_free_bits_count) < num_bits);fs/ocfs2/suballoc.c line:800
-> ac->ac_group_search()=ocfs2_cluster_group_search()
-> ocfs2_cluster_group_search()
-> BUG_ON(!ocfs2_is_cluster_bitmap(inode));fs/ocfs2/suballoc.c line:968
-> ocfs2_block_group_search()
->BUG_ON(min_bits != 1);fs/ocfs2/suballoc.c line:1019
->BUG_ON(ocfs2_is_cluster_bitmap(inode));fs/ocfs2/suballoc.c line:1020
-> BUG_ON(*num_bits == 0);fs/ocfs2/suballoc.c line:1109
-> ocfs2_find_victim_chain()
-> BUG_ON(!cl->cl_next_free_rec);fs/ocfs2/suballoc.c line:839
-> BUG_ON(best >= le16_to_cpu(cl->cl_next_free_rec));fs/ocfs2/suballoc.c line:849
-> BUG_ON(!ac);fs/ocfs2/suballoc.c line:1277
-> BUG_ON(ac->ac_bits_wanted < (ac->ac_bits_given + bits_wanted));fs/ocfs2/suballoc.c line:1278
-> BUG_ON(ac->ac_which != OCFS2_AC_USE_META);fs/ocfs2/suballoc.c line:1279
-> BUG_ON(ac->ac_handle != handle);fs/ocfs2/suballoc.c line:1280
-> ocfs2_add_branch()
-> BUG_ON(!last_eb_bh);
-> BUG_ON(!el->l_tree_depth);
-> ocfs2_create_new_meta_bhs() see above
-> ocfs2_do_insert_extent() fs/ocfs2/alloc.c line:575 602 635 640 666
-> BUG_ON(i >= num_bhs);fs/ocfs2/alloc.c line:575
-> BUG_ON(el->l_tree_depth);fs/ocfs2/alloc.c line:602
-> BUG_ON(i != (num_bhs - 1));fs/ocfs2/alloc.c line:635
-> BUG_ON(el->l_tree_depth);fs/ocfs2/alloc.c line:640
-> BUG_ON(le16_to_cpu(el->l_next_free_rec) >=le16_to_cpu(el->l_count));fs/ocfs2/alloc.c line:666
-> ocfs2_extent_map_append()
-> 659 BUG_ON(!new_clusters); fs/ocfs2/extent_map.c line:659
-> 660 BUG_ON(le32_to_cpu(rec->e_clusters) < new_clusters);fs/ocfs2/extent_map.c line:660
-> 693 BUG_ON((le32_to_cpu(rec->e_cpos) +fs/ocfs2/extent_map.c line:693
-> 699 BUG_ON(le32_to_cpu(old->e_cpos) !=fs/ocfs2/extent_map.c line:699
-> 701 BUG_ON(le64_to_cpu(old->e_blkno) !=fs/ocfs2/extent_map.c line:701
-> ocfs2_claim_clusters() see above
- ocfs2_setattr()
-> ocfs2_setattr_newsize()
-> ocfs2_extend_file()
-> ocfs2_num_free_extents()
-> ocfs2_extend_allocation()see above
-> BUG_ON(why != RESTART_TRANS);fs/ocfs2/file.c line:891
-> ocfs2_handle_add_inode()
-> BUG_ON(!handle);fs/ocfs2/journal.c line:213
-> BUG_ON(!inode);fs/ocfs2/journal.c line:214
-> BUG_ON(OCFS2_I(inode)->ip_handle);fs/ocfs2/journal.c line:222
-> BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list));fs/ocfs2/journal.c line:223
-> ocfs2_reserve_new_metadata()
-> ocfs2_reserve_suballoc_bits() see above
-> ocfs2_replay_truncate_records() see above
- ocfs2_file_write()
-> ocfs2_write_lock_maybe_extend()
-> ocfs2_extend_file()see above
-> ocfs2_num_free_extents()
-> ocfs2_extend_allocation()see above
-> BUG_ON(ret == -EIOCBRETRY);fs/ocfs2/mmap.c line:546
-> ocfs2_setup_io_locks()
[-> ocfs2_fill_ctxt_from_buf()]
-> ocfs2_buffer_lock_ctxt_insert()
-> ocfs2_binode_blkno()
-> BUG_ON(!inode);fs/ocfs2/mmap.c line:173
-> BUG_ON(!ctxt);fs/ocfs2/mmap.c line:193
-> BUG_ON(!inode);fs/ocfs2/mmap.c line:194
-> BUG_ON(_ _ocfs2_buffer_lock_ctxt_root(ctxt));fs/ocfs2/mmap.c line:274
-> ocfs2_unlock_buffer_inodes()
-> BUG_ON(in_interrupt());fs/ocfs2/mmap.c line:415
-> ocfs2_unlock_buffer_inodes()
-> BUG_ON(in_interrupt());fs/ocfs2/mmap.c line:415
ocfs2_truncate_log_append() -> BUG_ON(mutex_trylock(&tl_inode->i_mutex));fs/ocfs2/alloc.c line:967
- ocfs2_setattr()
-> ocfs2_setattr_newsize()
-> ocfs2_truncate_file()
-> ocfs2_commit_truncate()
-> ocfs2_do_truncate()
-> ocfs2_truncate_log_append()
-> BUG_ON(mutex_trylock(&tl_inode->i_mutex));fs/ocfs2/alloc.c line:967
-> ocfs2_find_new_last_ext_blk()
-> BUG_ON(!el->l_next_free_rec);fs/ocfs2/alloc.c line:1486
-> BUG_ON(i < 0);fs/ocfs2/alloc.c line:1486
-> ocfs2_free_extent_block()
-> ocfs2_free_suballoc_bits()
-> BUG_ON((count + start_bit) > ocfs2_bits_per_group(cl));fs/ocfs2/suballoc.c line:1554
-> BUG_ON((count + start_bit) > le16_to_cpu(group->bg_bits));fs/ocfs2/suballoc.c line:1574
-> ocfs2_remove_metadata_array()
-> BUG_ON(index < 0 || index >=OCFS2_INODE_MAX_CACHE_ARRAY);fs/ocfs2/uptodate.c line:466
-> BUG_ON(index >= ci->ci_num_cached);fs/ocfs2/uptodate.c line:467
-> BUG_ON(!ci->ci_num_cached);fs/ocfs2/uptodate.c line:468
-> BUG_ON(le32_to_cpu(el->l_recs[i].e_clusters) < clusters_to_del);fs/ocfs2/alloc.c line:1590
-> BUG_ON(!el->l_next_free_rec);fs/ocfs2/alloc.c line:1609
-> BUG_ON(le16_to_cpu(el->l_next_free_rec) == 0);fs/ocfs2/alloc.c line:1670
-> BUG_ON(depth != (le16_to_cpu(el->l_tree_depth) + 1));fs/ocfs2/alloc.c line:1671
-> BUG_ON(le32_to_cpu(el->l_recs[i].e_clusters) < clusters_to_del);fs/ocfs2/alloc.c line:1683
-> BUG_ON(!el->l_next_free_rec);fs/ocfs2/alloc.c line:1695
-> BUG_ON(eb->h_suballoc_slot);fs/ocfs2/alloc.c line:1717
-> BUG_ON(el->l_recs[0].e_clusters);fs/ocfs2/alloc.c line:1718
-> BUG_ON(el->l_recs[0].e_cpos);fs/ocfs2/alloc.c line:1719
-> BUG_ON(el->l_recs[0].e_blkno);fs/ocfs2/alloc.c line:1720
-> BUG_ON(!delete_blk);fs/ocfs2/alloc.c line:1735
-> _ _ocfs2_flush_truncate_log()
-> BUG_ON(mutex_trylock(&tl_inode->i_mutex));fs/ocfs2/alloc.c line:1124
-> ocfs2_handle_add_inode()
-> BUG_ON(!handle);fs/ocfs2/journal.c line:213
-> BUG_ON(!inode);fs/ocfs2/journal.c line:214
-> BUG_ON(OCFS2_I(inode)->ip_handle);fs/ocfs2/journal.c line:222
-> BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list));fs/ocfs2/journal.c line:223
-> ocfs2_replay_truncate_records()see above
-> BUG_ON(!fe->id2.i_list.l_tree_depth);# fs/ocfs2/alloc.c line:1801
-> BUG_ON(le32_to_cpu(fe->i_clusters) < target_i_clusters);# fs/ocfs2/alloc.c line:1882
-> ocfs2_calc_tree_trunc_credits()
-> BUG_ON(i < 0);fs/ocfs2/journal.c line:437
- ocfs2_delete_inode()
-> ocfs2_wipe_inode()
-> ocfs2_truncate_for_delete()
-> ocfs2_commit_truncate() see above
-> ocfs2_do_truncate() see above
-> ocfs2_remove_inode()
->ocfs2_free_dinode()
-> ocfs2_free_suballoc_bits()
-> BUG_ON((count + start_bit) > ocfs2_bits_per_group(cl));fs/ocfs2/suballoc.c line:1554
-> BUG_ON((count + start_bit) > le16_to_cpu(group->bg_bits));fs/ocfs2/suballoc.c line:1574
-> ocfs2_remove_from_cache()
-> ocfs2_remove_metadata_array()
-> BUG_ON(index < 0 || index >=OCFS2_INODE_MAX_CACHE_ARRAY);fs/ocfs2/uptodate.c line:466
-> BUG_ON(index >= ci->ci_num_cached);fs/ocfs2/uptodate.c line:467
-> BUG_ON(!ci->ci_num_cached);fs/ocfs2/uptodate.c line:468
-> ocfs2_query_inode_wipe()
-> ocfs2_request_delete_vote()
-> ocfs2_new_vote_request()
-> BUG_ON(!ocfs2_is_valid_vote_request(type));fs/ocfs2/vote.c line:768
-> ocfs2_do_request_vote()
-> ocfs2_broadcast_vote()
-> ocfs2_node_map_set_bit()
-> BUG_ON(bit >= map->num_nodes);fs/ocfs2/heartbeat.c line:234
-> ocfs2_journal_dirty()
-> BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED));fs/ocfs2/journal.c line:427
-> ocfs2_request_vote()
-> ocfs2_node_map_is_only()
-> _ _ocfs2_node_map_dup()
-> BUG_ON(from->num_nodes == 0);fs/ocfs2/heartbeat.c line:296
-> _ _ocfs2_node_map_set()
-> BUG_ON(target->num_nodes != from->num_nodes);fs/ocfs2/heartbeat.c line:323
-> BUG_ON(target->num_nodes == 0);fs/ocfs2/heartbeat.c line:324
ocfs2_complete_recovery() see above
- ocfs2_setattr()
_ _ocfs2_flush_truncate_log() -> BUG_ON(mutex_trylock(&tl_inode->i_mutex));
- ocfs2_truncate_log_worker()
-> ocfs2_flush_truncate_log()
-> _ _ocfs2_flush_truncate_log()
-> BUG_ON(mutex_trylock(&tl_inode->i_mutex));fs/ocfs2/alloc.c line:1124
-> ocfs2_replay_truncate_records() see above
- ocfs2_sync_fs()
-> ocfs2_flush_truncate_log()
-> _ _ocfs2_flush_truncate_log()
-> BUG_ON(mutex_trylock(&tl_inode->i_mutex));fs/ocfs2/alloc.c line:1124
-> ocfs2_replay_truncate_records() see above
- ocfs2_truncate_log_worker()
25. BUG_ON() fs/ocfs2/aops.c line:57 function:ocfs2_symlink_get_block()
- This could be call from block_read_full_page(),block_write_full_page() or cont_prepare_write().
- ocfs2_get_block()
->ocfs2_symlink_get_block()
-> BUG_ON(ocfs2_inode_is_fast_symlink(inode));
- ocfs2_get_block()
26. BUG_ON()
- ocfs2_dentry_ops.d_revalidate = ocfs2_dentry_revalidate()
-> BUG_ON(!osb);fs/ocfs2/dcache.c line:60
27. BUG_ON()
dlmlock()->dlmconvert_master() or dlmlock()->dlmlock_master()or dlm_convert_lock_handler() or dlm_thread()->dlm_shuffle_lists()
-> dlm_queue_ast()
-> _ _dlm_queue_ast()
-> dlm_should_cancel_bast()#Should be called as an ast gets queued to see if the new lock level will obsolete a pending bast.
-> BUG_ON(lock->ml.highest_blocked == LKM_NLMODE);fs/ocfs2/dlm/dlmast.c line:74
-> BUG_ON(!dlm);fs/ocfs2/dlm/dlmast.c line:98 function:_ _dlm_queue_ast()
-> BUG_ON(!lock);fs/ocfs2/dlm/dlmast.c line:99 function:_ _dlm_queue_ast()
-> BUG_ON(!list_empty(&lock->ast_list));fs/ocfs2/dlm/dlmast.c line:107 function:_ _dlm_queue_ast()
-> BUG_ON(!dlm);fs/ocfs2/dlm/dlmast.c line:143 function:dlm_queue_ast()
-> BUG_ON(!lock);fs/ocfs2/dlm/dlmast.c line:144 function:dlm_queue_ast()
28. BUG_ON()
- dlm_thread()
->dlm_shuffle_lists()
-> dlm_queue_bast()
-> _ _dlm_queue_bast()
-> BUG_ON(!dlm);fs/ocfs2/dlm/dlmast.c line:98 function:_ _dlm_queue_ast()
-> BUG_ON(!lock);fs/ocfs2/dlm/dlmast.c line:99 function:_ _dlm_queue_ast()
-> BUG_ON(!list_empty(&lock->bast_list));fs/ocfs2/dlm/dlmast.c line:107 function:_ _dlm_queue_ast()
-> BUG_ON(!dlm);fs/ocfs2/dlm/dlmast.c line:143 function:dlm_queue_ast()
-> BUG_ON(!lock);fs/ocfs2/dlm/dlmast.c line:144 function:dlm_queue_ast()
-> BUG_ON((res->state & (DLM_LOCK_RES_MIGRATING| fs/ocfs2/dlm/dlmthread.c line:293
-> BUG_ON(target->ml.highest_blocked != LKM_IVMODE);fs/ocfs2/dlm/dlmthread.c line:349
-> BUG_ON(!target->lksb);fs/ocfs2/dlm/dlmthread.c line:361
-> BUG_ON(target->ml.highest_blocked != LKM_IVMODE);fs/ocfs2/dlm/dlmthread.c line:413
-> BUG_ON(!target->lksb);fs/ocfs2/dlm/dlmthread.c line:423
29. BUG_ON() Geting a data lock
- ocfs2_fops.sendfile=ocfs2_file_sendfile()
-> ocfs2_data_lock()
-> BUG_ON(!inode);fs/ocfs2/dlmglue.c line:1139
- ocfs2_file_iops.setattr=ocfs2_setattr()
[-> ocfs2_setattr_newsize()]
-> ocfs2_truncate_file()
-> ocfs2_data_lock() see above
- ocfs2_file_vm_ops.nopage=ocfs2_nopage()
-> ocfs2_data_lock()see above
- ocfs2_file_aio_read()/ocfs2_file_read()
-> ocfs2_lock_buffer_inodes
-> ocfs2_data_lock()see above
-> ocfs2_setup_io_locks()see above
-> ocfs2_unlock_buffer_inodes() function:ocfs2_file_read
-> BUG_ON(in_interrupt());fs/ocfs2/mmap.c line:415
- ocfs2_file_write()/ocfs2_file_aio_write()
[-> ocfs2_write_lock_maybe_extend()] see above
-> ocfs2_lock_buffer_inodes()
-> ocfs2_data_lock()see above
30. BUG_ON() expending a dir.
ocfs2_mknod() or ocfs2_link() or ocfs2_rename() or ocfs2_symlink() or ocfs2_unlink()/ocfs2_rename()->ocfs2_prepare_orphan_dir()
-> ocfs2_prepare_dir_for_insert()
-> ocfs2_bread()
-> BUG_ON(!reada);fs/ocfs2/inode.c line:1028
->ocfs2_extend_dir() see above
-> ocfs2_handle_add_inode()
-> BUG_ON(!handle);fs/ocfs2/journal.c line:213
-> BUG_ON(!inode);fs/ocfs2/journal.c line:214
-> BUG_ON(OCFS2_I(inode)->ip_handle);fs/ocfs2/journal.c line:222
-> BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list));fs/ocfs2/journal.c line:223
-> ocfs2_reserve_new_inode()[only in ocfs2_mknod()/ocfs2_symlink()]
-> ocfs2_handle_add_inode()
-> BUG_ON(!handle);fs/ocfs2/journal.c line:213
-> BUG_ON(!inode);fs/ocfs2/journal.c line:214
-> BUG_ON(OCFS2_I(inode)->ip_handle);fs/ocfs2/journal.c line:222
-> BUG_ON(!list_empty(&OCFS2_I(inode)->ip_handle_list));fs/ocfs2/journal.c line:223
-> ocfs2_reserve_suballoc_bits() see above
31. BUG_ON() Adding an entry to a directory.
- ocfs2_mknod()/ocfs2_link()/ocfs2_rename()/ocfs2_symlink()
-> ocfs2_add_entry()
-> _ _ocfs2_add_entry
->BUG_ON((char *)de >= sb->s_blocksize +insert_bh->b_data);fs/ocfs2/namei.c line:1752
- ocfs2_symlink()
-> ocfs2_create_symlink_data()
-> ocfs2_set_new_buffer_uptodate()
-> BUG_ON(ocfs2_buffer_cached(oi, bh));fs/ocfs2/uptodate.c line:450
- ocfs2_unlink()/ocfs2_rename()
-> ocfs2_orphan_add()
-> _ _ocfs2_add_entry
->BUG_ON((char *)de >= sb->s_blocksize +insert_bh->b_data);fs/ocfs2/namei.c line:1752
journal
1. BUG()&BUG_ON() allocte and start the journal transaction fs/ocfs2/journal.c line:151 164 function:ocfs2_start_trans()
- ocfs2_start_trans()
-> if (!osb || !osb->journal->j_journal) BUG();fs/ocfs2/journal.c line:151
-> if (journal_current_handle()) BUG();fs/ocfs2/journal.c line:164
-> BUG_ON(osb->journal->j_state == OCFS2_JOURNAL_FREE);fs/ocfs2/journal.c line:158
-> BUG_ON(max_buffs <= 0);fs/ocfs2/journal.c line:159
-> ocfs2_commit_unstarted_handle()
-> BUG_ON(handle->flags & OCFS2_HANDLE_STARTED);fs/ocfs2/journal.c line:255
2. BUG() commint a journal transaction fs/ocfs2/journal.c line:304 function:ocfs2_commit_trans()
- Generally speaking,the code called ocfs2_start_trans also would call ocfs2_commit_trans() in the following.
- ocfs2_commit_trans()
-> if(journal_stop(jbd_handle)<0) BUG();
-> ocfs2_commit_unstarted_handle()
-> BUG_ON(handle->flags & OCFS2_HANDLE_STARTED);fs/ocfs2/journal.c line:255
-> BUG_ON(!handle) fs/ocfs2/journal.c line:275
- ocfs2_commit_trans()
3. BUG() fs/ocfs2/journal.c line:459 function:ocfs2_handle_add_lock()
- ocfs2_meta_lock_full()
-> ocfs2_handle_add_lock()
-> if (!igrab(inode)) BUG();
-> BUG_ON(!inode);fs/ocfs2/dlmglue.c line:1536
-> ocfs2_node_map_is_empty()
-> BUG_ON(map->num_nodes == 0);fs/ocfs2/heartbeat.c line:286
-> ocfs2_handle_add_lock()
-> BUG_ON(!inode);fs/ocfs2/journal.c line:449
ocfs2_meta_lock() -> ocfs2_meta_lock_full()
ocfs2_fill_super() see above
_ _ocfs2_recovery_thread() see above
- ocfs2_lock_buffer_inodes()
-> ocfs2_meta_lock_full()
5. BUG_ON() fs/ocfs2/journal.c line:376-379 function:ocfs2_journal_access()
- ocfs2_journal_access() is call by lots of functions.
shutdown
other
1. quorum.c line 81 function: o2quo_fence_self() panic("*** ocfs2 is very sorry to be fencing this system by panicing ***\n");
* path1
- o2hb_region_attr_dev.store= o2hb_region_dev_write()
#o2hb_region_dev_write will create a work queue:INIT_WORK(®->hr_write_timeout_work, o2hb_write_timeout, reg);
-> o2hb_write_timeout()
-> o2quo_disk_timeout()
-> o2quo_fence_self()
-> case FENCE_PANIC_OPTION: panic()
- o2hb_region_attr_dev.store= o2hb_region_dev_write()
2. super.c line 1726 function:ocfs2_handle_error() panic("OCFS2: (device %s): panic forced after error\n",
* path1 only when specified the errors=panic option during mount
- when run into ocfs2_error() # there are so many points calling the ocfs2_error(),a marco to the ocfs2_error().
-> ocfs2_handle_error(sb)
-> panic()
* path2 Doing journal transaction.if aborted, will run into panic.
- ocfs2_start_trans() # if (is_journal_aborted(journal))
-> ocfs2_abort()=ocfs2_abort()
-> ocfs2_handle_error(sb)
-> panic()
- when run into ocfs2_error() # there are so many points calling the ocfs2_error(),a marco to the ocfs2_error().
3.a marco mlog_bug_on_msg() will call BUG() according to the condition passed in. masklog.h line:254_ extent_map.c omitted