Lines Matching defs:xh

238 					     struct ocfs2_xattr_header *xh,
952 struct ocfs2_xattr_header *xh;
955 xh = (struct ocfs2_xattr_header *)
959 for (i = 0; i < le16_to_cpu(xh->xh_count); i++)
960 if (!ocfs2_xattr_is_local(&xh->xh_entries[i]))
1588 struct ocfs2_xattr_header *xh = loc->xl_header;
1589 int i, count = le16_to_cpu(xh->xh_count);
1593 offset = le16_to_cpu(xh->xh_entries[i].xe_name_offset);
1634 struct ocfs2_xattr_header *xh = loc->xl_header;
1635 int count = le16_to_cpu(xh->xh_count);
1642 memmove((char *)xh + first_namevalue_offset + namevalue_size,
1643 (char *)xh + first_namevalue_offset,
1645 memset((char *)xh + first_namevalue_offset, 0, namevalue_size);
1647 /* Now tell xh->xh_entries about it */
1649 offset = le16_to_cpu(xh->xh_entries[i].xe_name_offset);
1651 le16_add_cpu(&xh->xh_entries[i].xe_name_offset,
1816 struct ocfs2_xattr_header *xh = loc->xl_header;
1817 int count = le16_to_cpu(xh->xh_count);
1827 tmp_xe = &xh->xh_entries[tmp];
1840 memmove(&xh->xh_entries[low + 1],
1841 &xh->xh_entries[low],
1844 le16_add_cpu(&xh->xh_count, 1);
1845 loc->xl_entry = &xh->xh_entries[low];
1852 struct ocfs2_xattr_header *xh = loc->xl_header;
1859 xh->xh_free_start = cpu_to_le16(nameval_offset);
1860 le16_add_cpu(&xh->xh_name_value_len, size);
1938 struct ocfs2_xattr_header *xh = loc->xl_header;
1944 le16_add_cpu(&xh->xh_count, -1);
1945 count = le16_to_cpu(xh->xh_count);
1953 index = ((char *)entry - (char *)&xh->xh_entries) /
1955 memmove(&xh->xh_entries[index], &xh->xh_entries[index + 1],
1957 memset(&xh->xh_entries[count], 0,
3759 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
3768 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
3769 xe = &xh->xh_entries[i];
3783 xh,
3824 struct ocfs2_xattr_header *xh = NULL;
3845 xh = bucket_xh(search);
3846 high_bucket = le16_to_cpu(xh->xh_num_buckets) - 1;
3858 xh = bucket_xh(search);
3859 xe = &xh->xh_entries[0];
3870 if (xh->xh_count)
3871 xe = &xh->xh_entries[le16_to_cpu(xh->xh_count) - 1];
4029 struct ocfs2_xattr_header *xh,
4036 if (index < 0 || index >= le16_to_cpu(xh->xh_count))
4039 name_offset = le16_to_cpu(xh->xh_entries[index].xe_name_offset);
4188 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
4214 xh->xh_count = xb_xh->xh_count;
4215 xh->xh_num_buckets = cpu_to_le16(1);
4216 xh->xh_name_value_len = cpu_to_le16(size);
4217 xh->xh_free_start = cpu_to_le16(OCFS2_XATTR_BUCKET_SIZE - size);
4229 le16_add_cpu(&xh->xh_entries[i].xe_name_offset, off_change);
4384 struct ocfs2_xattr_header *xh;
4414 xh = (struct ocfs2_xattr_header *)bucket_buf;
4415 entries = (char *)xh->xh_entries;
4416 xh_free_start = le16_to_cpu(xh->xh_free_start);
4419 (unsigned long long)blkno, le16_to_cpu(xh->xh_count),
4420 xh_free_start, le16_to_cpu(xh->xh_name_value_len));
4427 sort(entries, le16_to_cpu(xh->xh_count),
4432 xe = xh->xh_entries;
4434 for (i = 0; i < le16_to_cpu(xh->xh_count); i++, xe++) {
4466 xh->xh_free_start = cpu_to_le16(end);
4469 sort(entries, le16_to_cpu(xh->xh_count),
4576 static int ocfs2_xattr_find_divide_pos(struct ocfs2_xattr_header *xh)
4578 struct ocfs2_xattr_entry *entries = xh->xh_entries;
4579 int count = le16_to_cpu(xh->xh_count);
4628 struct ocfs2_xattr_header *xh;
4680 xh = bucket_xh(s_bucket);
4681 count = le16_to_cpu(xh->xh_count);
4682 start = ocfs2_xattr_find_divide_pos(xh);
4685 xe = &xh->xh_entries[start-1];
4695 xh = bucket_xh(t_bucket);
4696 xh->xh_free_start = cpu_to_le16(blocksize);
4697 xh->xh_entries[0].xe_name_hash = xe->xe_name_hash;
4698 le32_add_cpu(&xh->xh_entries[0].xe_name_hash, 1);
4707 xh = bucket_xh(t_bucket);
4716 xe = &xh->xh_entries[i];
4730 xe = &xh->xh_entries[start];
4733 (int)((char *)xe - (char *)xh),
4734 (int)((char *)xh->xh_entries - (char *)xh));
4735 memmove((char *)xh->xh_entries, (char *)xe, len);
4736 xe = &xh->xh_entries[count - start];
4740 le16_add_cpu(&xh->xh_count, -start);
4741 le16_add_cpu(&xh->xh_name_value_len, -name_value_len);
4744 xh->xh_free_start = cpu_to_le16(OCFS2_XATTR_BUCKET_SIZE);
4745 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
4746 xe = &xh->xh_entries[i];
4748 le16_to_cpu(xh->xh_free_start))
4749 xh->xh_free_start = xe->xe_name_offset;
4753 /* set xh->xh_num_buckets for the new xh. */
4755 xh->xh_num_buckets = cpu_to_le16(1);
4757 xh->xh_num_buckets = 0;
4763 *first_hash = le32_to_cpu(xh->xh_entries[0].xe_name_hash);
4773 xh = bucket_xh(s_bucket);
4774 memset(&xh->xh_entries[start], 0,
4776 xh->xh_count = cpu_to_le16(start);
4777 xh->xh_free_start = cpu_to_le16(name_offset);
4778 xh->xh_name_value_len = cpu_to_le16(name_value_len);
5356 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
5362 xe = &xh->xh_entries[xe_off];
5515 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
5518 if (name_hash != le32_to_cpu(xh->xh_entries[0].xe_name_hash))
5521 if (xh->xh_entries[le16_to_cpu(xh->xh_count) - 1].xe_name_hash ==
5522 xh->xh_entries[0].xe_name_hash) {
5526 le32_to_cpu(xh->xh_entries[0].xe_name_hash));
5651 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
5664 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
5665 xe = &xh->xh_entries[i];
6000 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
6001 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset];
6037 struct ocfs2_xattr_header *xh =
6056 le16_to_cpu(xh->xh_count));
6057 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
6058 xe = &xh->xh_entries[i];
6196 struct ocfs2_xattr_header *xh,
6209 struct ocfs2_xattr_header *xh,
6219 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
6220 xe = &xh->xh_entries[i];
6224 ret = func(sb, bh, xh, i, &xv, NULL, para);
6253 struct ocfs2_xattr_header *xh,
6259 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset];
6261 *xv = (struct ocfs2_xattr_value_root *)((void *)xh +
6276 struct ocfs2_xattr_header *xh,
6287 ret = ocfs2_value_metas_in_xattr_header(osb->sb, NULL, xh,
6334 struct ocfs2_xattr_header *xh,
6352 le16_to_cpu(xh->xh_count));
6355 for (i = 0, j = 0; i < le16_to_cpu(xh->xh_count); i++, j++) {
6356 xe = &xh->xh_entries[i];
6380 ret = func(sb, old_bh, xh, i, &xv, NULL, para);
6394 * recs have already be copied to the new xh with the
6465 struct ocfs2_xattr_header *xh = (struct ocfs2_xattr_header *)
6477 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh,
6504 ret = ocfs2_reflink_xattr_header(handle, args, args->old_bh, xh,
6578 struct ocfs2_xattr_header *xh = &xb->xb_attrs.xb_header;
6588 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh,
6624 ret = ocfs2_reflink_xattr_header(handle, args, blk_bh, xh,
6668 struct ocfs2_xattr_header *xh,
6695 struct ocfs2_xattr_header *xh,
6714 struct ocfs2_xattr_header *xh =
6720 xh, &metas->num_metas,