[OracleOSS] [TitleIndex] [WordIndex]

OCFS2/DesignDocs/OCFS2BUGs

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()

2. BUG() Loading the ocfs2 node manager module. dir.c line 580 function: link_group

mount & unmount

1. BUG() Initializing a super_block structure.

2. BUG() Mounting a volume need write some blocks to disk.

  1. 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

  2. ocfs2_begin_local_alloc_recovery()
    • -> ocfs2_write_block() see above

      • -> ocfs2_write_blocks()

  3. 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()

dlm register

1. BUG_ON()

heartbeat

1. BUG_ON()

  1. 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

  2. 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

  3. 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

  4. 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()

  1. 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

  2. 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()

  3. 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

3. BUG_ON()

4. BUG_ON()

5. BUG_ON()

6. BUG_ON() find an unknown error.

7. BUG_ON() get o2net_node structure by index of the structure array or contrary.

8. BUG_ON()

9. BUG_ON()

10. BUG_ON()

11. BUG_ON()

12. BUG_ON() A call back function for the O2HB_NODE_DOWN_CB message.

13. BUG_ON() called from node manager when we should bring up our network listening socket.

14. BUG_ON() called when we should shut down our network listening socket.

15. BUG_ON() called when we a node is down.

  1. 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

  2. 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.

17. BUG_ON() Requesting unlink a file.

18. BUG_ON() Handling node response and mark live nodes.

19. BUG_ON()

  1. ocfs2_readdir()
    • -> ocfs2_bread()

      • -> BUG_ON(!reada);fs/ocfs2/inode.c line:1028

  2. ocfs2_unlink()/ocfs2_rename()
    • -> ocfs2_empty_dir()

      • -> ocfs2_bread()

        • -> BUG_ON(!reada);fs/ocfs2/inode.c line:1028

  3. 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

  4. 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

  5. ocfs2_rename()
  6. ocfs2_empty_dir()

20. BUG_ON() by many functions,process with journal handle objects.

dlm fs

1. BUG() opening a file in dlmfs fs/ocfs2/dlm/dlmfs.c line:106 function:dlmfs_file_open()

2. BUG() releasing a file in dlmfs fs/ocfs2/dlm/dlmfs.c line:154 function:dlmfs_file_release()

3. BUG() init a inode structure for dlmfs fs/ocfs2/dlm/dlmfs.c line:385 function:dlmfs_get_inode()

4. BUG_ON() writing a dlmfs file

5. BUG_ON() Reading a dlmfs file

dlm operation

1. BUG_ON() and BUG(), excuting the ast function. dlmast.c line:105 function:_ _dlm_queue_ast()

2. BUG() sending ast message to a node dlmast.c line:464 function:dlm_send_proxy_ast_msg()

3. BUG() convert a queue index to a queue pointer. fs/ocfs2/dlm/dlmcommon.h line:347 function:dlm_list_idx_to_ptr()

4. BUG() Sending a remote dlmlock request fs/ocfs2/dlm/dlmlock.c line:312 function:dlm_send_remote_lock_request()

5. BUG() removing an entry from dlm_master_list fs/ocfs2/dlm/dlmmaster.c line:377 function:_ _dlm_put_mle()

6. BUG() looking up a lock by name. fs/ocfs2/dlm/dlmmaster.c line:780 function:dlm_get_lock_resource()

7. BUG()s & BUG_ON() sending the DLM_MASTER_REQUEST_MSG message fs/ocfs2/dlm/dlmmaster.c line:1400 1403 1414 1450

8. BUG()s handling the DLM_MASTER_REQUEST_MSG message fs/ocfs2/dlm/dlmmaster.c line:1553 1561 1576 1651 1680

9. BUG()s fs/ocfs2/dlm/dlmmaster.c line:1747 1767 function:dlm_do_assert_master()

  1. 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

    b. dlm_assert_master_worker()
    • -> 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

    c. dlm_mig_lockres_worker()
    • -> dlm_finish_migration()

      • -> dlm_do_assert_master()see above

10. BUG()

11. BUG() sending a DLM_DEREF_LOCKRES_MSG message fs/ocfs2/dlm/dlmmaster.c line:2291 function: dlm_drop_lockres_ref()

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()

  1. dlm_migrate_request_handler() -> dlm_add_migration_mle()

  2. 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()

  1. dlm_request_all_locks_worker() -> dlm_send_one_lockres() -> (dlm_add_dummy_lock()) -> dlm_add_lock_to_array()

  2. ocfs2_put_super() or ocfs2_fill_super() see above

15. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1580 function:dlm_lockres_master_requery()

16. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1651 function:dlm_master_requery_handler()

17. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1768 1844 function:dlm_process_recovery_data()

18. BUG_ON()

  1. 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

    1. dlm_thread()->dlm_flush_asts()see below->dlm_do_local_ast()see above

    2. 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.

  1. 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

  2. ocfs2_fill_super() see above

20. BUG_ON()

21. BUG_ON()

22. BUG_ON()

  1. 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

  2. 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()

  1. dlm_lockres_put()
    • -> kref_put(&res->refs, dlm_lockres_release);

      • -> dlm_lockres_release()

  2. 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

  3. 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

25. BUG_ON() fs/ocfs2/dlm/dlmrecovery.c line:835

26. BUG_ON() fs/ocfs2/dlm/dlmunlock.c

  1. 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));

  2. 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

  3. 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.

29. BUG_ON() Get a lock resource for a inode operation.

  1. 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

  2. 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

  3. 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

  4. 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

  5. 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

  6. ocfs2_data_convert_worker()
    • -> ocfs2_lock_res_inode() see above

  7. 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

  8. ocfs2_inode_meta_lops.unblock=ocfs2_unblock_meta()
    • -> ocfs2_lock_res_inode() see above

30. BUG_ON() A block call back function.

31. BUG_ON() in the vote thread.

recovery

1. BUG() Recovering a node.

2. BUG() recovering for a dead node.

3. BUG() fs/ocfs2/dlm/dlmrecovery.c line:965 function:dlm_send_all_done_msg()

4. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1008 function:dlm_reco_data_done_handler()

5. BUG() fs/ocfs2/dlm/dlmrecovery.c line:1148 function:dlm_send_mig_lockres_msg()

  1. 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()

7. BUG()s performing the finalizing recovery. fs/ocfs2/dlm/dlmrecovery.c line:2769 2775 2787 2799 2807 function:dlm_finalize_reco_handler()

8. BUG_ON() A worker function used during recovery.

run-time

1. BUG() Creating a configfs directory. super.c line:1299 function:ocfs2_initialize_super().

20. BUG_ON() create a directory for an config_item.

21. BUG_ON() Drop the initial reference from make_item()/make_group() fs/configfs/dir.c line:670 function:client_drop_item()

2. BUG() fetching a configfs node name. inode.c line:115 function: configfs_get_name.

3.BUG() Deleting/unlinking a inode in configfs. symlink.c line:166 function:configfs_unlink()

4.BUG() extending a file cache. aops.c line:195 function:ocfs2_get_block()

5.BUG() Reading in blocks from disk buffer_head_io.c line:234 function:ocfs2_read_blocks

6.BUG() finding a index of a configfs_attribute structure. cluster/nodemanager.c line:463 function:o2nm_attr_index

7. BUG() geting a cluster lock

8. BUG() releasing a cluster lock

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

  1. 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

14. BUG() Init a super block inode. fs/ocfs2/inode.c line:297 function:ocfs2_populate_inode()

  1. 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

  2. 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

15. BUG() changing a file name fs/ocfs2/namei.c line:1040 function:ocfs2_rename()

16. BUG() Changing super block data fs/ocfs2/super.c line:185 function:ocfs2_write_super()

17. BUG() Get a reference of an inode. fs/ocfs2/sysfile.c line:81 93 function:ocfs2_get_system_file_inode()

18. BUG() Insert a meta data cache item to the tree. fs/ocfs2/uptodate.c line:268 function:_ _ocfs2_insert_cache_tree()

19. BUG_ON() Releasing a inode structure. fs/configfs/dir.c line:45 function:configfs_d_iput

22. BUG_ON() Allocate and fill buffer from item fs/configfs/file.c line:73 function:fill_read_buffer

23. BUG_ON() doing asynchronous IO fs/ocfs2/aio.c line:119 function:ocfs2_ki_dtor()

24. BUG_ON()s in alloc.c

  1. 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

  2. ocfs2_truncate_log_append() -> BUG_ON(mutex_trylock(&tl_inode->i_mutex));fs/ocfs2/alloc.c line:967

    1. 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

    2. 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

    3. ocfs2_complete_recovery() see above

  3. _ _ocfs2_flush_truncate_log() -> BUG_ON(mutex_trylock(&tl_inode->i_mutex));

    1. 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

    2. 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

25. BUG_ON() fs/ocfs2/aops.c line:57 function:ocfs2_symlink_get_block()

26. BUG_ON()

27. BUG_ON()

28. BUG_ON()

29. BUG_ON() Geting a data lock

  1. ocfs2_fops.sendfile=ocfs2_file_sendfile()
    • -> ocfs2_data_lock()

      • -> BUG_ON(!inode);fs/ocfs2/dlmglue.c line:1139

  2. ocfs2_file_iops.setattr=ocfs2_setattr()
    • [-> ocfs2_setattr_newsize()]

      • -> ocfs2_truncate_file()

        • -> ocfs2_data_lock() see above

  3. ocfs2_file_vm_ops.nopage=ocfs2_nopage()
    • -> ocfs2_data_lock()see above

  4. 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

  5. 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.

  1. 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.

  1. 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

  2. ocfs2_symlink()
    • -> ocfs2_create_symlink_data()

      • -> ocfs2_set_new_buffer_uptodate()

        • -> BUG_ON(ocfs2_buffer_cached(oi, bh));fs/ocfs2/uptodate.c line:450

  3. 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()

2. BUG() commint a journal transaction fs/ocfs2/journal.c line:304 function:ocfs2_commit_trans()

3. BUG() fs/ocfs2/journal.c line:459 function:ocfs2_handle_add_lock()

5. BUG_ON() fs/ocfs2/journal.c line:376-379 function:ocfs2_journal_access()

shutdown

other

1. quorum.c line 81 function: o2quo_fence_self() panic("*** ocfs2 is very sorry to be fencing this system by panicing ***\n");

2. super.c line 1726 function:ocfs2_handle_error() panic("OCFS2: (device %s): panic forced after error\n",

3.a marco mlog_bug_on_msg() will call BUG() according to the condition passed in. masklog.h line:254_

extent_map.c omitted


2011-12-23 01:01