Lines Matching refs:dx_root
158 struct ocfs2_dx_root_block *dx_root; in ocfs2_dx_dir_link_trailer() local
168 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_dx_dir_link_trailer()
170 trailer->db_free_next = dx_root->dr_free_blk; in ocfs2_dx_dir_link_trailer()
171 dx_root->dr_free_blk = cpu_to_le64(dirdata_bh->b_blocknr); in ocfs2_dx_dir_link_trailer()
199 static inline int ocfs2_dx_root_inline(struct ocfs2_dx_root_block *dx_root) in ocfs2_dx_root_inline() argument
201 return dx_root->dr_flags & OCFS2_DX_FLAG_INLINE; in ocfs2_dx_root_inline()
568 struct ocfs2_dx_root_block *dx_root; in ocfs2_validate_dx_root() local
572 dx_root = (struct ocfs2_dx_root_block *) bh->b_data; in ocfs2_validate_dx_root()
574 ret = ocfs2_validate_meta_ecc(sb, bh->b_data, &dx_root->dr_check); in ocfs2_validate_dx_root()
582 if (!OCFS2_IS_VALID_DX_ROOT(dx_root)) { in ocfs2_validate_dx_root()
585 (unsigned long long)le64_to_cpu(dx_root->dr_blkno), in ocfs2_validate_dx_root()
586 7, dx_root->dr_signature); in ocfs2_validate_dx_root()
893 struct ocfs2_dx_root_block *dx_root, in ocfs2_dx_dir_search() argument
909 if (ocfs2_dx_root_inline(dx_root)) { in ocfs2_dx_dir_search()
910 entry_list = &dx_root->dr_entries; in ocfs2_dx_dir_search()
914 dr_el = &dx_root->dr_list; in ocfs2_dx_dir_search()
1013 struct ocfs2_dx_root_block *dx_root; in ocfs2_find_entry_dx() local
1028 dx_root = (struct ocfs2_dx_root_block *) dx_root_bh->b_data; in ocfs2_find_entry_dx()
1030 ret = ocfs2_dx_dir_search(name, namelen, dir, dx_root, lookup); in ocfs2_find_entry_dx()
1240 struct ocfs2_dx_root_block *dx_root; in ocfs2_delete_entry_dx() local
1254 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_delete_entry_dx()
1255 if (ocfs2_dx_root_inline(dx_root)) { in ocfs2_delete_entry_dx()
1256 entry_list = &dx_root->dr_entries; in ocfs2_delete_entry_dx()
1304 if (!ocfs2_dx_root_inline(dx_root)) { in ocfs2_delete_entry_dx()
1327 trailer->db_free_next = dx_root->dr_free_blk; in ocfs2_delete_entry_dx()
1328 dx_root->dr_free_blk = cpu_to_le64(leaf_bh->b_blocknr); in ocfs2_delete_entry_dx()
1335 le32_add_cpu(&dx_root->dr_num_entries, -1); in ocfs2_delete_entry_dx()
1340 if (!ocfs2_dx_root_inline(dx_root)) in ocfs2_delete_entry_dx()
1482 struct ocfs2_dx_root_block *dx_root) in ocfs2_dx_inline_root_insert() argument
1484 ocfs2_dx_entry_list_insert(&dx_root->dr_entries, hinfo, dirent_blk); in ocfs2_dx_inline_root_insert()
1491 struct ocfs2_dx_root_block *dx_root; in ocfs2_dx_dir_insert() local
1501 dx_root = (struct ocfs2_dx_root_block *)lookup->dl_dx_root_bh->b_data; in ocfs2_dx_dir_insert()
1502 if (ocfs2_dx_root_inline(dx_root)) { in ocfs2_dx_dir_insert()
1506 dx_root); in ocfs2_dx_dir_insert()
1515 le32_add_cpu(&dx_root->dr_num_entries, 1); in ocfs2_dx_dir_insert()
1527 struct ocfs2_dx_root_block *dx_root; in ocfs2_remove_block_from_free_list() local
1534 dx_root = (struct ocfs2_dx_root_block *)bh->b_data; in ocfs2_remove_block_from_free_list()
1535 dx_root->dr_free_blk = trailer->db_free_next; in ocfs2_remove_block_from_free_list()
2081 struct ocfs2_dx_root_block *dx_root; in ocfs2_empty_dir_dx() local
2097 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_empty_dir_dx()
2099 if (le32_to_cpu(dx_root->dr_num_entries) != 2) in ocfs2_empty_dir_dx()
2298 struct ocfs2_dx_root_block *dx_root; in ocfs2_dx_dir_attach_index() local
2327 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_dx_dir_attach_index()
2328 memset(dx_root, 0, osb->sb->s_blocksize); in ocfs2_dx_dir_attach_index()
2329 strcpy(dx_root->dr_signature, OCFS2_DX_ROOT_SIGNATURE); in ocfs2_dx_dir_attach_index()
2330 dx_root->dr_suballoc_slot = cpu_to_le16(meta_ac->ac_alloc_slot); in ocfs2_dx_dir_attach_index()
2331 dx_root->dr_suballoc_loc = cpu_to_le64(suballoc_loc); in ocfs2_dx_dir_attach_index()
2332 dx_root->dr_suballoc_bit = cpu_to_le16(dr_suballoc_bit); in ocfs2_dx_dir_attach_index()
2333 dx_root->dr_fs_generation = cpu_to_le32(osb->fs_generation); in ocfs2_dx_dir_attach_index()
2334 dx_root->dr_blkno = cpu_to_le64(dr_blkno); in ocfs2_dx_dir_attach_index()
2335 dx_root->dr_dir_blkno = cpu_to_le64(OCFS2_I(dir)->ip_blkno); in ocfs2_dx_dir_attach_index()
2336 dx_root->dr_num_entries = cpu_to_le32(num_entries); in ocfs2_dx_dir_attach_index()
2338 dx_root->dr_free_blk = cpu_to_le64(dirdata_bh->b_blocknr); in ocfs2_dx_dir_attach_index()
2340 dx_root->dr_free_blk = cpu_to_le64(0); in ocfs2_dx_dir_attach_index()
2343 dx_root->dr_flags |= OCFS2_DX_FLAG_INLINE; in ocfs2_dx_dir_attach_index()
2344 dx_root->dr_entries.de_count = in ocfs2_dx_dir_attach_index()
2347 dx_root->dr_list.l_count = in ocfs2_dx_dir_attach_index()
2521 struct ocfs2_dx_root_block *dx_root; in ocfs2_fill_new_dir_dx() local
2548 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_fill_new_dir_dx()
2549 entry_list = &dx_root->dr_entries; in ocfs2_fill_new_dir_dx()
2640 struct ocfs2_dx_root_block *dx_root; in ocfs2_dx_dir_index_root_block() local
2645 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_dx_dir_index_root_block()
2662 le16_to_cpu(dx_root->dr_entries.de_num_used)); in ocfs2_dx_dir_index_root_block()
2664 ocfs2_dx_entry_list_insert(&dx_root->dr_entries, &hinfo, in ocfs2_dx_dir_index_root_block()
2667 le32_add_cpu(&dx_root->dr_num_entries, 1); in ocfs2_dx_dir_index_root_block()
3673 struct ocfs2_dx_root_block *dx_root) in ocfs2_dx_dir_rebalance_credits() argument
3677 credits += ocfs2_calc_extend_credits(osb->sb, &dx_root->dr_list); in ocfs2_dx_dir_rebalance_credits()
3702 struct ocfs2_dx_root_block *dx_root; in ocfs2_dx_dir_rebalance() local
3711 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_dx_dir_rebalance()
3716 if (le32_to_cpu(dx_root->dr_clusters) == UINT_MAX) in ocfs2_dx_dir_rebalance()
3749 credits = ocfs2_dx_dir_rebalance_credits(osb, dx_root); in ocfs2_dx_dir_rebalance()
3888 struct ocfs2_dx_root_block *dx_root; in ocfs2_find_dir_space_dx() local
3894 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_find_dir_space_dx()
3897 ret = ocfs2_dx_dir_lookup(dir, &dx_root->dr_list, &lookup->dl_hinfo, in ocfs2_find_dir_space_dx()
3964 struct ocfs2_dx_root_block *dx_root; in ocfs2_search_dx_free_list() local
3966 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_search_dx_free_list()
3967 next_block = le64_to_cpu(dx_root->dr_free_blk); in ocfs2_search_dx_free_list()
4012 struct ocfs2_dx_root_block *dx_root; in ocfs2_expand_inline_dx_root() local
4066 dx_root = (struct ocfs2_dx_root_block *) dx_root_bh->b_data; in ocfs2_expand_inline_dx_root()
4067 entry_list = &dx_root->dr_entries; in ocfs2_expand_inline_dx_root()
4082 dx_root->dr_flags &= ~OCFS2_DX_FLAG_INLINE; in ocfs2_expand_inline_dx_root()
4083 memset(&dx_root->dr_list, 0, osb->sb->s_blocksize - in ocfs2_expand_inline_dx_root()
4085 dx_root->dr_list.l_count = in ocfs2_expand_inline_dx_root()
4120 struct ocfs2_dx_root_block *dx_root; in ocfs2_inline_dx_has_space() local
4123 dx_root = (struct ocfs2_dx_root_block *) dx_root_bh->b_data; in ocfs2_inline_dx_has_space()
4124 entry_list = &dx_root->dr_entries; in ocfs2_inline_dx_has_space()
4144 struct ocfs2_dx_root_block *dx_root; in ocfs2_prepare_dx_dir_for_insert() local
4152 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_prepare_dx_dir_for_insert()
4153 if (le32_to_cpu(dx_root->dr_num_entries) == OCFS2_DX_ENTRIES_MAX) { in ocfs2_prepare_dx_dir_for_insert()
4159 if (ocfs2_dx_root_inline(dx_root)) { in ocfs2_prepare_dx_dir_for_insert()
4319 struct ocfs2_dx_root_block *dx_root; in ocfs2_dx_dir_remove_index() local
4327 dx_root = (struct ocfs2_dx_root_block *) dx_root_bh->b_data; in ocfs2_dx_dir_remove_index()
4331 le16_to_cpu(dx_root->dr_suballoc_slot)); in ocfs2_dx_dir_remove_index()
4368 blk = le64_to_cpu(dx_root->dr_blkno); in ocfs2_dx_dir_remove_index()
4369 bit = le16_to_cpu(dx_root->dr_suballoc_bit); in ocfs2_dx_dir_remove_index()
4370 if (dx_root->dr_suballoc_loc) in ocfs2_dx_dir_remove_index()
4371 bg_blkno = le64_to_cpu(dx_root->dr_suballoc_loc); in ocfs2_dx_dir_remove_index()
4401 struct ocfs2_dx_root_block *dx_root; in ocfs2_dx_dir_truncate() local
4416 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data; in ocfs2_dx_dir_truncate()
4418 if (ocfs2_dx_root_inline(dx_root)) in ocfs2_dx_dir_truncate()
4424 while (le32_to_cpu(dx_root->dr_clusters)) { in ocfs2_dx_dir_truncate()
4425 ret = ocfs2_dx_dir_lookup_rec(dir, &dx_root->dr_list, in ocfs2_dx_dir_truncate()