Lines Matching refs:BUG_ON

121 	BUG_ON(!con_flag_valid(con_flag));  in con_flag_clear()
128 BUG_ON(!con_flag_valid(con_flag)); in con_flag_set()
135 BUG_ON(!con_flag_valid(con_flag)); in con_flag_test()
143 BUG_ON(!con_flag_valid(con_flag)); in con_flag_test_and_clear()
151 BUG_ON(!con_flag_valid(con_flag)); in con_flag_test_and_set()
235 BUG_ON(ceph_msg_cache); in ceph_msgr_slab_init()
245 BUG_ON(!ceph_msg_cache); in ceph_msgr_slab_exit()
257 BUG_ON(zero_page == NULL); in _ceph_msgr_exit()
269 BUG_ON(zero_page != NULL); in ceph_msgr_init()
289 BUG_ON(ceph_msgr_wq == NULL); in ceph_msgr_exit()
460 BUG_ON(con->sock); in ceph_tcp_connect()
530 BUG_ON(page_offset + length > PAGE_SIZE); in ceph_tcp_recvpage()
644 BUG_ON(con->in_msg->con != con); in reset_connection()
652 BUG_ON(con->out_msg->con != con); in reset_connection()
758 BUG_ON(con->out_skip); in con_out_kvec_reset()
770 BUG_ON(con->out_skip); in con_out_kvec_add()
771 BUG_ON(index >= ARRAY_SIZE(con->out_kvec)); in con_out_kvec_add()
791 BUG_ON(con->out_kvec_bytes < skip); in con_out_kvec_skip()
792 BUG_ON(!con->out_kvec_left); in con_out_kvec_skip()
818 BUG_ON(cursor->resid < bio_iter_len(it->bio, it->iter)); in ceph_msg_data_bio_cursor_init()
840 BUG_ON(bytes > cursor->resid); in ceph_msg_data_bio_advance()
841 BUG_ON(bytes > bio_iter_len(it->bio, it->iter)); in ceph_msg_data_bio_advance()
846 BUG_ON(!cursor->last_piece); in ceph_msg_data_bio_advance()
861 BUG_ON(cursor->last_piece); in ceph_msg_data_bio_advance()
862 BUG_ON(cursor->resid < bio_iter_len(it->bio, it->iter)); in ceph_msg_data_bio_advance()
878 BUG_ON(cursor->resid < bvec_iter_len(bvecs, cursor->bvec_iter)); in ceph_msg_data_bvecs_cursor_init()
901 BUG_ON(bytes > cursor->resid); in ceph_msg_data_bvecs_advance()
902 BUG_ON(bytes > bvec_iter_len(bvecs, cursor->bvec_iter)); in ceph_msg_data_bvecs_advance()
907 BUG_ON(!cursor->last_piece); in ceph_msg_data_bvecs_advance()
915 BUG_ON(cursor->last_piece); in ceph_msg_data_bvecs_advance()
916 BUG_ON(cursor->resid < bvec_iter_len(bvecs, cursor->bvec_iter)); in ceph_msg_data_bvecs_advance()
932 BUG_ON(data->type != CEPH_MSG_DATA_PAGES); in ceph_msg_data_pages_cursor_init()
934 BUG_ON(!data->pages); in ceph_msg_data_pages_cursor_init()
935 BUG_ON(!data->length); in ceph_msg_data_pages_cursor_init()
941 BUG_ON(page_count > (int)USHRT_MAX); in ceph_msg_data_pages_cursor_init()
943 BUG_ON(length > SIZE_MAX - cursor->page_offset); in ceph_msg_data_pages_cursor_init()
953 BUG_ON(data->type != CEPH_MSG_DATA_PAGES); in ceph_msg_data_pages_next()
955 BUG_ON(cursor->page_index >= cursor->page_count); in ceph_msg_data_pages_next()
956 BUG_ON(cursor->page_offset >= PAGE_SIZE); in ceph_msg_data_pages_next()
970 BUG_ON(cursor->data->type != CEPH_MSG_DATA_PAGES); in ceph_msg_data_pages_advance()
972 BUG_ON(cursor->page_offset + bytes > PAGE_SIZE); in ceph_msg_data_pages_advance()
986 BUG_ON(cursor->page_index >= cursor->page_count); in ceph_msg_data_pages_advance()
1005 BUG_ON(data->type != CEPH_MSG_DATA_PAGELIST); in ceph_msg_data_pagelist_cursor_init()
1008 BUG_ON(!pagelist); in ceph_msg_data_pagelist_cursor_init()
1013 BUG_ON(list_empty(&pagelist->head)); in ceph_msg_data_pagelist_cursor_init()
1029 BUG_ON(data->type != CEPH_MSG_DATA_PAGELIST); in ceph_msg_data_pagelist_next()
1032 BUG_ON(!pagelist); in ceph_msg_data_pagelist_next()
1034 BUG_ON(!cursor->page); in ceph_msg_data_pagelist_next()
1035 BUG_ON(cursor->offset + cursor->resid != pagelist->length); in ceph_msg_data_pagelist_next()
1053 BUG_ON(data->type != CEPH_MSG_DATA_PAGELIST); in ceph_msg_data_pagelist_advance()
1056 BUG_ON(!pagelist); in ceph_msg_data_pagelist_advance()
1058 BUG_ON(cursor->offset + cursor->resid != pagelist->length); in ceph_msg_data_pagelist_advance()
1059 BUG_ON((cursor->offset & ~PAGE_MASK) + bytes > PAGE_SIZE); in ceph_msg_data_pagelist_advance()
1074 BUG_ON(list_is_last(&cursor->page->lru, &pagelist->head)); in ceph_msg_data_pagelist_advance()
1120 BUG_ON(!length); in ceph_msg_data_cursor_init()
1121 BUG_ON(length > msg->data_length); in ceph_msg_data_cursor_init()
1122 BUG_ON(!msg->num_data_items); in ceph_msg_data_cursor_init()
1162 BUG_ON(!page); in ceph_msg_data_next()
1163 BUG_ON(*page_offset + *length > PAGE_SIZE); in ceph_msg_data_next()
1164 BUG_ON(!*length); in ceph_msg_data_next()
1165 BUG_ON(*length > cursor->resid); in ceph_msg_data_next()
1181 BUG_ON(bytes > cursor->resid); in ceph_msg_data_advance()
1272 BUG_ON(list_empty(&con->out_queue)); in prepare_write_message()
1275 BUG_ON(m->con != con); in prepare_write_message()
1513 BUG_ON(!con->out_kvec_left); in write_partial_kvec()
1539 BUG_ON(kaddr == NULL); in ceph_crc32c_page()
1685 BUG_ON(con->in_msg != NULL); in prepare_read_message()
2293 BUG_ON(!section); in read_partial_message_section()
2296 BUG_ON(section->iov_base == NULL); in read_partial_message_section()
2422 BUG_ON(!con->in_msg ^ skip); in read_partial_message()
2433 BUG_ON(!con->in_msg); in read_partial_message()
2434 BUG_ON(con->in_msg->con != con); in read_partial_message()
2521 BUG_ON(con->in_msg->con != con); in process_message()
2573 BUG_ON(con->sock); in try_write()
2580 BUG_ON(con->in_msg); in try_write()
2593 BUG_ON(!con->sock); in try_write()
2667 BUG_ON(!con->sock); in try_read()
2877 BUG_ON(ret == -ENOENT); in con_backoff()
2932 BUG_ON(con->sock); in ceph_con_workfn()
2937 BUG_ON(con->sock); in ceph_con_workfn()
2997 BUG_ON(con->in_msg->con != con); in con_fault()
3002 BUG_ON(con->out_msg->con != con); in con_fault()
3072 BUG_ON(msg->con != con); in msg_con_set()
3094 BUG_ON(msg->front.iov_len != le32_to_cpu(msg->hdr.front_len)); in ceph_con_send()
3108 BUG_ON(!list_empty(&msg->list_head)); in ceph_con_send()
3148 BUG_ON(con->out_skip); in ceph_msg_revoke()
3153 BUG_ON(!msg->data_length); in ceph_msg_revoke()
3243 BUG_ON(msg->num_data_items >= msg->max_data_items); in ceph_msg_data_add()
3262 BUG_ON(!pages); in ceph_msg_data_add_pages()
3263 BUG_ON(!length); in ceph_msg_data_add_pages()
3281 BUG_ON(!pagelist); in ceph_msg_data_add_pagelist()
3282 BUG_ON(!pagelist->length); in ceph_msg_data_add_pagelist()
3403 BUG_ON(!middle_len); in ceph_alloc_middle()
3404 BUG_ON(msg->middle); in ceph_alloc_middle()
3434 BUG_ON(con->in_msg != NULL); in ceph_con_in_msg_alloc()
3435 BUG_ON(!con->ops->alloc_msg); in ceph_con_in_msg_alloc()
3446 BUG_ON(*skip); in ceph_con_in_msg_alloc()