Lines Matching refs: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]))
1579 struct ocfs2_xattr_header *xh = loc->xl_header;
1580 int i, count = le16_to_cpu(xh->xh_count);
1584 offset = le16_to_cpu(xh->xh_entries[i].xe_name_offset);
1625 struct ocfs2_xattr_header *xh = loc->xl_header;
1626 int count = le16_to_cpu(xh->xh_count);
1633 memmove((char *)xh + first_namevalue_offset + namevalue_size,
1634 (char *)xh + first_namevalue_offset,
1636 memset((char *)xh + first_namevalue_offset, 0, namevalue_size);
1638 /* Now tell xh->xh_entries about it */
1640 offset = le16_to_cpu(xh->xh_entries[i].xe_name_offset);
1642 le16_add_cpu(&xh->xh_entries[i].xe_name_offset,
1807 struct ocfs2_xattr_header *xh = loc->xl_header;
1808 int count = le16_to_cpu(xh->xh_count);
1818 tmp_xe = &xh->xh_entries[tmp];
1831 memmove(&xh->xh_entries[low + 1],
1832 &xh->xh_entries[low],
1835 le16_add_cpu(&xh->xh_count, 1);
1836 loc->xl_entry = &xh->xh_entries[low];
1843 struct ocfs2_xattr_header *xh = loc->xl_header;
1850 xh->xh_free_start = cpu_to_le16(nameval_offset);
1851 le16_add_cpu(&xh->xh_name_value_len, size);
1929 struct ocfs2_xattr_header *xh = loc->xl_header;
1935 le16_add_cpu(&xh->xh_count, -1);
1936 count = le16_to_cpu(xh->xh_count);
1944 index = ((char *)entry - (char *)&xh->xh_entries) /
1946 memmove(&xh->xh_entries[index], &xh->xh_entries[index + 1],
1948 memset(&xh->xh_entries[count], 0,
3751 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
3760 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
3761 xe = &xh->xh_entries[i];
3775 xh,
3816 struct ocfs2_xattr_header *xh = NULL;
3837 xh = bucket_xh(search);
3838 high_bucket = le16_to_cpu(xh->xh_num_buckets) - 1;
3850 xh = bucket_xh(search);
3851 xe = &xh->xh_entries[0];
3862 if (xh->xh_count)
3863 xe = &xh->xh_entries[le16_to_cpu(xh->xh_count) - 1];
4021 struct ocfs2_xattr_header *xh,
4028 if (index < 0 || index >= le16_to_cpu(xh->xh_count))
4031 name_offset = le16_to_cpu(xh->xh_entries[index].xe_name_offset);
4189 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
4215 xh->xh_count = xb_xh->xh_count;
4216 xh->xh_num_buckets = cpu_to_le16(1);
4217 xh->xh_name_value_len = cpu_to_le16(size);
4218 xh->xh_free_start = cpu_to_le16(OCFS2_XATTR_BUCKET_SIZE - size);
4230 le16_add_cpu(&xh->xh_entries[i].xe_name_offset, off_change);
4385 struct ocfs2_xattr_header *xh;
4415 xh = (struct ocfs2_xattr_header *)bucket_buf;
4416 entries = (char *)xh->xh_entries;
4417 xh_free_start = le16_to_cpu(xh->xh_free_start);
4420 (unsigned long long)blkno, le16_to_cpu(xh->xh_count),
4421 xh_free_start, le16_to_cpu(xh->xh_name_value_len));
4428 sort(entries, le16_to_cpu(xh->xh_count),
4433 xe = xh->xh_entries;
4435 for (i = 0; i < le16_to_cpu(xh->xh_count); i++, xe++) {
4467 xh->xh_free_start = cpu_to_le16(end);
4470 sort(entries, le16_to_cpu(xh->xh_count),
4577 static int ocfs2_xattr_find_divide_pos(struct ocfs2_xattr_header *xh)
4579 struct ocfs2_xattr_entry *entries = xh->xh_entries;
4580 int count = le16_to_cpu(xh->xh_count);
4629 struct ocfs2_xattr_header *xh;
4681 xh = bucket_xh(s_bucket);
4682 count = le16_to_cpu(xh->xh_count);
4683 start = ocfs2_xattr_find_divide_pos(xh);
4686 xe = &xh->xh_entries[start-1];
4696 xh = bucket_xh(t_bucket);
4697 xh->xh_free_start = cpu_to_le16(blocksize);
4698 xh->xh_entries[0].xe_name_hash = xe->xe_name_hash;
4699 le32_add_cpu(&xh->xh_entries[0].xe_name_hash, 1);
4708 xh = bucket_xh(t_bucket);
4717 xe = &xh->xh_entries[i];
4731 xe = &xh->xh_entries[start];
4734 (int)((char *)xe - (char *)xh),
4735 (int)((char *)xh->xh_entries - (char *)xh));
4736 memmove((char *)xh->xh_entries, (char *)xe, len);
4737 xe = &xh->xh_entries[count - start];
4741 le16_add_cpu(&xh->xh_count, -start);
4742 le16_add_cpu(&xh->xh_name_value_len, -name_value_len);
4745 xh->xh_free_start = cpu_to_le16(OCFS2_XATTR_BUCKET_SIZE);
4746 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
4747 xe = &xh->xh_entries[i];
4749 le16_to_cpu(xh->xh_free_start))
4750 xh->xh_free_start = xe->xe_name_offset;
4754 /* set xh->xh_num_buckets for the new xh. */
4756 xh->xh_num_buckets = cpu_to_le16(1);
4758 xh->xh_num_buckets = 0;
4764 *first_hash = le32_to_cpu(xh->xh_entries[0].xe_name_hash);
4774 xh = bucket_xh(s_bucket);
4775 memset(&xh->xh_entries[start], 0,
4777 xh->xh_count = cpu_to_le16(start);
4778 xh->xh_free_start = cpu_to_le16(name_offset);
4779 xh->xh_name_value_len = cpu_to_le16(name_value_len);
5357 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
5363 xe = &xh->xh_entries[xe_off];
5516 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
5519 if (name_hash != le32_to_cpu(xh->xh_entries[0].xe_name_hash))
5522 if (xh->xh_entries[le16_to_cpu(xh->xh_count) - 1].xe_name_hash ==
5523 xh->xh_entries[0].xe_name_hash) {
5527 le32_to_cpu(xh->xh_entries[0].xe_name_hash));
5652 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
5665 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
5666 xe = &xh->xh_entries[i];
6001 struct ocfs2_xattr_header *xh = bucket_xh(bucket);
6002 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset];
6038 struct ocfs2_xattr_header *xh =
6057 le16_to_cpu(xh->xh_count));
6058 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
6059 xe = &xh->xh_entries[i];
6197 struct ocfs2_xattr_header *xh,
6210 struct ocfs2_xattr_header *xh,
6220 for (i = 0; i < le16_to_cpu(xh->xh_count); i++) {
6221 xe = &xh->xh_entries[i];
6225 ret = func(sb, bh, xh, i, &xv, NULL, para);
6254 struct ocfs2_xattr_header *xh,
6260 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset];
6262 *xv = (struct ocfs2_xattr_value_root *)((void *)xh +
6277 struct ocfs2_xattr_header *xh,
6288 ret = ocfs2_value_metas_in_xattr_header(osb->sb, NULL, xh,
6335 struct ocfs2_xattr_header *xh,
6353 le16_to_cpu(xh->xh_count));
6356 for (i = 0, j = 0; i < le16_to_cpu(xh->xh_count); i++, j++) {
6357 xe = &xh->xh_entries[i];
6381 ret = func(sb, old_bh, xh, i, &xv, NULL, para);
6395 * recs have already be copied to the new xh with the
6466 struct ocfs2_xattr_header *xh = (struct ocfs2_xattr_header *)
6478 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh,
6505 ret = ocfs2_reflink_xattr_header(handle, args, args->old_bh, xh,
6588 struct ocfs2_xattr_header *xh = &xb->xb_attrs.xb_header;
6598 ret = ocfs2_reflink_lock_xattr_allocators(osb, xh, args->ref_root_bh,
6634 ret = ocfs2_reflink_xattr_header(handle, args, blk_bh, xh,
6678 struct ocfs2_xattr_header *xh,
6705 struct ocfs2_xattr_header *xh,
6724 struct ocfs2_xattr_header *xh =
6730 xh, &metas->num_metas,