Lines Matching refs:dx_root

156 	struct ocfs2_dx_root_block *dx_root;
166 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
168 trailer->db_free_next = dx_root->dr_free_blk;
169 dx_root->dr_free_blk = cpu_to_le64(dirdata_bh->b_blocknr);
197 static inline int ocfs2_dx_root_inline(struct ocfs2_dx_root_block *dx_root)
199 return dx_root->dr_flags & OCFS2_DX_FLAG_INLINE;
566 struct ocfs2_dx_root_block *dx_root;
570 dx_root = (struct ocfs2_dx_root_block *) bh->b_data;
572 ret = ocfs2_validate_meta_ecc(sb, bh->b_data, &dx_root->dr_check);
580 if (!OCFS2_IS_VALID_DX_ROOT(dx_root)) {
583 (unsigned long long)le64_to_cpu(dx_root->dr_blkno),
584 7, dx_root->dr_signature);
891 struct ocfs2_dx_root_block *dx_root,
907 if (ocfs2_dx_root_inline(dx_root)) {
908 entry_list = &dx_root->dr_entries;
912 dr_el = &dx_root->dr_list;
1011 struct ocfs2_dx_root_block *dx_root;
1026 dx_root = (struct ocfs2_dx_root_block *) dx_root_bh->b_data;
1028 ret = ocfs2_dx_dir_search(name, namelen, dir, dx_root, lookup);
1238 struct ocfs2_dx_root_block *dx_root;
1252 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
1253 if (ocfs2_dx_root_inline(dx_root)) {
1254 entry_list = &dx_root->dr_entries;
1302 if (!ocfs2_dx_root_inline(dx_root)) {
1325 trailer->db_free_next = dx_root->dr_free_blk;
1326 dx_root->dr_free_blk = cpu_to_le64(leaf_bh->b_blocknr);
1333 le32_add_cpu(&dx_root->dr_num_entries, -1);
1338 if (!ocfs2_dx_root_inline(dx_root))
1480 struct ocfs2_dx_root_block *dx_root)
1482 ocfs2_dx_entry_list_insert(&dx_root->dr_entries, hinfo, dirent_blk);
1489 struct ocfs2_dx_root_block *dx_root;
1499 dx_root = (struct ocfs2_dx_root_block *)lookup->dl_dx_root_bh->b_data;
1500 if (ocfs2_dx_root_inline(dx_root)) {
1504 dx_root);
1513 le32_add_cpu(&dx_root->dr_num_entries, 1);
1525 struct ocfs2_dx_root_block *dx_root;
1532 dx_root = (struct ocfs2_dx_root_block *)bh->b_data;
1533 dx_root->dr_free_blk = trailer->db_free_next;
2079 struct ocfs2_dx_root_block *dx_root;
2095 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
2097 if (le32_to_cpu(dx_root->dr_num_entries) != 2)
2296 struct ocfs2_dx_root_block *dx_root;
2325 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
2326 memset(dx_root, 0, osb->sb->s_blocksize);
2327 strcpy(dx_root->dr_signature, OCFS2_DX_ROOT_SIGNATURE);
2328 dx_root->dr_suballoc_slot = cpu_to_le16(meta_ac->ac_alloc_slot);
2329 dx_root->dr_suballoc_loc = cpu_to_le64(suballoc_loc);
2330 dx_root->dr_suballoc_bit = cpu_to_le16(dr_suballoc_bit);
2331 dx_root->dr_fs_generation = cpu_to_le32(osb->fs_generation);
2332 dx_root->dr_blkno = cpu_to_le64(dr_blkno);
2333 dx_root->dr_dir_blkno = cpu_to_le64(OCFS2_I(dir)->ip_blkno);
2334 dx_root->dr_num_entries = cpu_to_le32(num_entries);
2336 dx_root->dr_free_blk = cpu_to_le64(dirdata_bh->b_blocknr);
2338 dx_root->dr_free_blk = cpu_to_le64(0);
2341 dx_root->dr_flags |= OCFS2_DX_FLAG_INLINE;
2342 dx_root->dr_entries.de_count =
2345 dx_root->dr_list.l_count =
2519 struct ocfs2_dx_root_block *dx_root;
2546 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
2547 entry_list = &dx_root->dr_entries;
2638 struct ocfs2_dx_root_block *dx_root;
2643 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
2660 le16_to_cpu(dx_root->dr_entries.de_num_used));
2662 ocfs2_dx_entry_list_insert(&dx_root->dr_entries, &hinfo,
2665 le32_add_cpu(&dx_root->dr_num_entries, 1);
2811 /* This gets us the dx_root */
2930 * be correctly set once the dx_root has been
3259 * dx_root */
3671 struct ocfs2_dx_root_block *dx_root)
3675 credits += ocfs2_calc_extend_credits(osb->sb, &dx_root->dr_list);
3700 struct ocfs2_dx_root_block *dx_root;
3709 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
3714 if (le32_to_cpu(dx_root->dr_clusters) == UINT_MAX)
3747 credits = ocfs2_dx_dir_rebalance_credits(osb, dx_root);
3886 struct ocfs2_dx_root_block *dx_root;
3892 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
3895 ret = ocfs2_dx_dir_lookup(dir, &dx_root->dr_list, &lookup->dl_hinfo,
3962 struct ocfs2_dx_root_block *dx_root;
3964 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
3965 next_block = le64_to_cpu(dx_root->dr_free_blk);
4010 struct ocfs2_dx_root_block *dx_root;
4061 * Transfer the entries from our dx_root into the appropriate
4064 dx_root = (struct ocfs2_dx_root_block *) dx_root_bh->b_data;
4065 entry_list = &dx_root->dr_entries;
4080 dx_root->dr_flags &= ~OCFS2_DX_FLAG_INLINE;
4081 memset(&dx_root->dr_list, 0, osb->sb->s_blocksize -
4083 dx_root->dr_list.l_count =
4087 * dx_root. */
4118 struct ocfs2_dx_root_block *dx_root;
4121 dx_root = (struct ocfs2_dx_root_block *) dx_root_bh->b_data;
4122 entry_list = &dx_root->dr_entries;
4142 struct ocfs2_dx_root_block *dx_root;
4150 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
4151 if (le32_to_cpu(dx_root->dr_num_entries) == OCFS2_DX_ENTRIES_MAX) {
4157 if (ocfs2_dx_root_inline(dx_root)) {
4201 /* Do this up here - ocfs2_extend_dir might need the dx_root */
4317 struct ocfs2_dx_root_block *dx_root;
4325 dx_root = (struct ocfs2_dx_root_block *) dx_root_bh->b_data;
4329 le16_to_cpu(dx_root->dr_suballoc_slot));
4366 blk = le64_to_cpu(dx_root->dr_blkno);
4367 bit = le16_to_cpu(dx_root->dr_suballoc_bit);
4368 if (dx_root->dr_suballoc_loc)
4369 bg_blkno = le64_to_cpu(dx_root->dr_suballoc_loc);
4399 struct ocfs2_dx_root_block *dx_root;
4414 dx_root = (struct ocfs2_dx_root_block *)dx_root_bh->b_data;
4416 if (ocfs2_dx_root_inline(dx_root))
4422 while (le32_to_cpu(dx_root->dr_clusters)) {
4423 ret = ocfs2_dx_dir_lookup_rec(dir, &dx_root->dr_list,