Lines Matching refs:xh

252 					     struct ocfs2_xattr_header *xh,
966 struct ocfs2_xattr_header *xh; in ocfs2_has_inline_xattr_value_outside() local
969 xh = (struct ocfs2_xattr_header *) in ocfs2_has_inline_xattr_value_outside()
973 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) in ocfs2_has_inline_xattr_value_outside()
974 if (!ocfs2_xattr_is_local(&xh->xh_entries[i])) in ocfs2_has_inline_xattr_value_outside()
1593 struct ocfs2_xattr_header *xh = loc->xl_header; in ocfs2_xa_block_get_free_start() local
1594 int i, count = le16_to_cpu(xh->xh_count); in ocfs2_xa_block_get_free_start()
1598 offset = le16_to_cpu(xh->xh_entries[i].xe_name_offset); in ocfs2_xa_block_get_free_start()
1639 struct ocfs2_xattr_header *xh = loc->xl_header; in ocfs2_xa_block_wipe_namevalue() local
1640 int count = le16_to_cpu(xh->xh_count); in ocfs2_xa_block_wipe_namevalue()
1647 memmove((char *)xh + first_namevalue_offset + namevalue_size, in ocfs2_xa_block_wipe_namevalue()
1648 (char *)xh + first_namevalue_offset, in ocfs2_xa_block_wipe_namevalue()
1650 memset((char *)xh + first_namevalue_offset, 0, namevalue_size); in ocfs2_xa_block_wipe_namevalue()
1654 offset = le16_to_cpu(xh->xh_entries[i].xe_name_offset); in ocfs2_xa_block_wipe_namevalue()
1656 le16_add_cpu(&xh->xh_entries[i].xe_name_offset, in ocfs2_xa_block_wipe_namevalue()
1821 struct ocfs2_xattr_header *xh = loc->xl_header; in ocfs2_xa_bucket_add_entry() local
1822 int count = le16_to_cpu(xh->xh_count); in ocfs2_xa_bucket_add_entry()
1832 tmp_xe = &xh->xh_entries[tmp]; in ocfs2_xa_bucket_add_entry()
1845 memmove(&xh->xh_entries[low + 1], in ocfs2_xa_bucket_add_entry()
1846 &xh->xh_entries[low], in ocfs2_xa_bucket_add_entry()
1849 le16_add_cpu(&xh->xh_count, 1); in ocfs2_xa_bucket_add_entry()
1850 loc->xl_entry = &xh->xh_entries[low]; in ocfs2_xa_bucket_add_entry()
1857 struct ocfs2_xattr_header *xh = loc->xl_header; in ocfs2_xa_bucket_add_namevalue() local
1864 xh->xh_free_start = cpu_to_le16(nameval_offset); in ocfs2_xa_bucket_add_namevalue()
1865 le16_add_cpu(&xh->xh_name_value_len, size); in ocfs2_xa_bucket_add_namevalue()
1943 struct ocfs2_xattr_header *xh = loc->xl_header; in ocfs2_xa_remove_entry() local
1949 le16_add_cpu(&xh->xh_count, -1); in ocfs2_xa_remove_entry()
1950 count = le16_to_cpu(xh->xh_count); in ocfs2_xa_remove_entry()
1958 index = ((char *)entry - (char *)&xh->xh_entries) / in ocfs2_xa_remove_entry()
1960 memmove(&xh->xh_entries[index], &xh->xh_entries[index + 1], in ocfs2_xa_remove_entry()
1962 memset(&xh->xh_entries[count], 0, in ocfs2_xa_remove_entry()
3765 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_find_xe_in_bucket() local
3774 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) { in ocfs2_find_xe_in_bucket()
3775 xe = &xh->xh_entries[i]; in ocfs2_find_xe_in_bucket()
3789 xh, in ocfs2_find_xe_in_bucket()
3830 struct ocfs2_xattr_header *xh = NULL; in ocfs2_xattr_bucket_find() local
3851 xh = bucket_xh(search); in ocfs2_xattr_bucket_find()
3852 high_bucket = le16_to_cpu(xh->xh_num_buckets) - 1; in ocfs2_xattr_bucket_find()
3864 xh = bucket_xh(search); in ocfs2_xattr_bucket_find()
3865 xe = &xh->xh_entries[0]; in ocfs2_xattr_bucket_find()
3876 if (xh->xh_count) in ocfs2_xattr_bucket_find()
3877 xe = &xh->xh_entries[le16_to_cpu(xh->xh_count) - 1]; in ocfs2_xattr_bucket_find()
4035 struct ocfs2_xattr_header *xh, in ocfs2_xattr_bucket_get_name_value() argument
4042 if (index < 0 || index >= le16_to_cpu(xh->xh_count)) in ocfs2_xattr_bucket_get_name_value()
4045 name_offset = le16_to_cpu(xh->xh_entries[index].xe_name_offset); in ocfs2_xattr_bucket_get_name_value()
4203 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_cp_xattr_block_to_bucket() local
4229 xh->xh_count = xb_xh->xh_count; in ocfs2_cp_xattr_block_to_bucket()
4230 xh->xh_num_buckets = cpu_to_le16(1); in ocfs2_cp_xattr_block_to_bucket()
4231 xh->xh_name_value_len = cpu_to_le16(size); in ocfs2_cp_xattr_block_to_bucket()
4232 xh->xh_free_start = cpu_to_le16(OCFS2_XATTR_BUCKET_SIZE - size); in ocfs2_cp_xattr_block_to_bucket()
4244 le16_add_cpu(&xh->xh_entries[i].xe_name_offset, off_change); in ocfs2_cp_xattr_block_to_bucket()
4399 struct ocfs2_xattr_header *xh; in ocfs2_defrag_xattr_bucket() local
4429 xh = (struct ocfs2_xattr_header *)bucket_buf; in ocfs2_defrag_xattr_bucket()
4430 entries = (char *)xh->xh_entries; in ocfs2_defrag_xattr_bucket()
4431 xh_free_start = le16_to_cpu(xh->xh_free_start); in ocfs2_defrag_xattr_bucket()
4434 (unsigned long long)blkno, le16_to_cpu(xh->xh_count), in ocfs2_defrag_xattr_bucket()
4435 xh_free_start, le16_to_cpu(xh->xh_name_value_len)); in ocfs2_defrag_xattr_bucket()
4442 sort(entries, le16_to_cpu(xh->xh_count), in ocfs2_defrag_xattr_bucket()
4447 xe = xh->xh_entries; in ocfs2_defrag_xattr_bucket()
4449 for (i = 0; i < le16_to_cpu(xh->xh_count); i++, xe++) { in ocfs2_defrag_xattr_bucket()
4481 xh->xh_free_start = cpu_to_le16(end); in ocfs2_defrag_xattr_bucket()
4484 sort(entries, le16_to_cpu(xh->xh_count), in ocfs2_defrag_xattr_bucket()
4591 static int ocfs2_xattr_find_divide_pos(struct ocfs2_xattr_header *xh) in ocfs2_xattr_find_divide_pos() argument
4593 struct ocfs2_xattr_entry *entries = xh->xh_entries; in ocfs2_xattr_find_divide_pos()
4594 int count = le16_to_cpu(xh->xh_count); in ocfs2_xattr_find_divide_pos()
4643 struct ocfs2_xattr_header *xh; in ocfs2_divide_xattr_bucket() local
4695 xh = bucket_xh(s_bucket); in ocfs2_divide_xattr_bucket()
4696 count = le16_to_cpu(xh->xh_count); in ocfs2_divide_xattr_bucket()
4697 start = ocfs2_xattr_find_divide_pos(xh); in ocfs2_divide_xattr_bucket()
4700 xe = &xh->xh_entries[start-1]; in ocfs2_divide_xattr_bucket()
4710 xh = bucket_xh(t_bucket); in ocfs2_divide_xattr_bucket()
4711 xh->xh_free_start = cpu_to_le16(blocksize); in ocfs2_divide_xattr_bucket()
4712 xh->xh_entries[0].xe_name_hash = xe->xe_name_hash; in ocfs2_divide_xattr_bucket()
4713 le32_add_cpu(&xh->xh_entries[0].xe_name_hash, 1); in ocfs2_divide_xattr_bucket()
4722 xh = bucket_xh(t_bucket); in ocfs2_divide_xattr_bucket()
4731 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4745 xe = &xh->xh_entries[start]; in ocfs2_divide_xattr_bucket()
4748 (int)((char *)xe - (char *)xh), in ocfs2_divide_xattr_bucket()
4749 (int)((char *)xh->xh_entries - (char *)xh)); in ocfs2_divide_xattr_bucket()
4750 memmove((char *)xh->xh_entries, (char *)xe, len); in ocfs2_divide_xattr_bucket()
4751 xe = &xh->xh_entries[count - start]; in ocfs2_divide_xattr_bucket()
4755 le16_add_cpu(&xh->xh_count, -start); in ocfs2_divide_xattr_bucket()
4756 le16_add_cpu(&xh->xh_name_value_len, -name_value_len); in ocfs2_divide_xattr_bucket()
4759 xh->xh_free_start = cpu_to_le16(OCFS2_XATTR_BUCKET_SIZE); in ocfs2_divide_xattr_bucket()
4760 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) { in ocfs2_divide_xattr_bucket()
4761 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4763 le16_to_cpu(xh->xh_free_start)) in ocfs2_divide_xattr_bucket()
4764 xh->xh_free_start = xe->xe_name_offset; in ocfs2_divide_xattr_bucket()
4770 xh->xh_num_buckets = cpu_to_le16(1); in ocfs2_divide_xattr_bucket()
4772 xh->xh_num_buckets = 0; in ocfs2_divide_xattr_bucket()
4778 *first_hash = le32_to_cpu(xh->xh_entries[0].xe_name_hash); in ocfs2_divide_xattr_bucket()
4788 xh = bucket_xh(s_bucket); in ocfs2_divide_xattr_bucket()
4789 memset(&xh->xh_entries[start], 0, in ocfs2_divide_xattr_bucket()
4791 xh->xh_count = cpu_to_le16(start); in ocfs2_divide_xattr_bucket()
4792 xh->xh_free_start = cpu_to_le16(name_offset); in ocfs2_divide_xattr_bucket()
4793 xh->xh_name_value_len = cpu_to_le16(name_value_len); in ocfs2_divide_xattr_bucket()
5371 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_xattr_bucket_value_truncate() local
5377 xe = &xh->xh_entries[xe_off]; in ocfs2_xattr_bucket_value_truncate()
5530 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_check_xattr_bucket_collision() local
5533 if (name_hash != le32_to_cpu(xh->xh_entries[0].xe_name_hash)) in ocfs2_check_xattr_bucket_collision()
5536 if (xh->xh_entries[le16_to_cpu(xh->xh_count) - 1].xe_name_hash == in ocfs2_check_xattr_bucket_collision()
5537 xh->xh_entries[0].xe_name_hash) { in ocfs2_check_xattr_bucket_collision()
5541 le32_to_cpu(xh->xh_entries[0].xe_name_hash)); in ocfs2_check_xattr_bucket_collision()
5666 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_delete_xattr_in_bucket() local
5679 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) { in ocfs2_delete_xattr_in_bucket()
5680 xe = &xh->xh_entries[i]; in ocfs2_delete_xattr_in_bucket()
6015 struct ocfs2_xattr_header *xh = bucket_xh(bucket); in ocfs2_get_xattr_tree_value_root() local
6016 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_tree_value_root()
6052 struct ocfs2_xattr_header *xh = in ocfs2_xattr_bucket_value_refcount() local
6071 le16_to_cpu(xh->xh_count)); in ocfs2_xattr_bucket_value_refcount()
6072 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) { in ocfs2_xattr_bucket_value_refcount()
6073 xe = &xh->xh_entries[i]; in ocfs2_xattr_bucket_value_refcount()
6211 struct ocfs2_xattr_header *xh,
6224 struct ocfs2_xattr_header *xh, in ocfs2_value_metas_in_xattr_header() argument
6234 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) { in ocfs2_value_metas_in_xattr_header()
6235 xe = &xh->xh_entries[i]; in ocfs2_value_metas_in_xattr_header()
6239 ret = func(sb, bh, xh, i, &xv, NULL, para); in ocfs2_value_metas_in_xattr_header()
6268 struct ocfs2_xattr_header *xh, in ocfs2_get_xattr_value_root() argument
6274 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_value_root()
6276 *xv = (struct ocfs2_xattr_value_root *)((void *)xh + in ocfs2_get_xattr_value_root()
6291 struct ocfs2_xattr_header *xh, in ocfs2_reflink_lock_xattr_allocators() argument
6302 ret = ocfs2_value_metas_in_xattr_header(osb->sb, NULL, xh, in ocfs2_reflink_lock_xattr_allocators()
6349 struct ocfs2_xattr_header *xh, in ocfs2_reflink_xattr_header() argument
6367 le16_to_cpu(xh->xh_count)); in ocfs2_reflink_xattr_header()
6370 for (i = 0, j = 0; i < le16_to_cpu(xh->xh_count); i++, j++) { in ocfs2_reflink_xattr_header()
6371 xe = &xh->xh_entries[i]; in ocfs2_reflink_xattr_header()
6395 ret = func(sb, old_bh, xh, i, &xv, NULL, para); in ocfs2_reflink_xattr_header()
6480 struct ocfs2_xattr_header *xh = (struct ocfs2_xattr_header *) in ocfs2_reflink_xattr_inline() local
6492 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh, in ocfs2_reflink_xattr_inline()
6519 ret = ocfs2_reflink_xattr_header(handle, args, args->old_bh, xh, in ocfs2_reflink_xattr_inline()
6602 struct ocfs2_xattr_header *xh = &xb->xb_attrs.xb_header; in ocfs2_reflink_xattr_block() local
6612 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh, in ocfs2_reflink_xattr_block()
6648 ret = ocfs2_reflink_xattr_header(handle, args, blk_bh, xh, in ocfs2_reflink_xattr_block()
6692 struct ocfs2_xattr_header *xh, in ocfs2_get_reflink_xattr_value_root() argument
6719 struct ocfs2_xattr_header *xh, in ocfs2_value_tree_metas_in_bucket() argument
6738 struct ocfs2_xattr_header *xh = in ocfs2_calc_value_tree_metas() local
6744 xh, &metas->num_metas, in ocfs2_calc_value_tree_metas()