Lines Matching refs:xe
233 static int namevalue_size_xe(struct ocfs2_xattr_entry *xe) in namevalue_size_xe() argument
235 u64 value_len = le64_to_cpu(xe->xe_value_size); in namevalue_size_xe()
238 ocfs2_xattr_is_local(xe)); in namevalue_size_xe()
239 return namevalue_size(xe->xe_name_len, value_len); in namevalue_size_xe()
572 static int ocfs2_xe_entry_usage(struct ocfs2_xattr_entry *xe) in ocfs2_xe_entry_usage() argument
574 return namevalue_size_xe(xe) + in ocfs2_xe_entry_usage()
3048 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_calc_xattr_set_need() local
3078 xe = xis->here; in ocfs2_calc_xattr_set_need()
3079 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_calc_xattr_set_need()
3080 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_calc_xattr_set_need()
3086 xe = xbs->here; in ocfs2_calc_xattr_set_need()
3087 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_calc_xattr_set_need()
3088 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_calc_xattr_set_need()
3113 if (!ocfs2_xattr_is_local(xe)) in ocfs2_calc_xattr_set_need()
3120 value_size = le64_to_cpu(xe->xe_value_size); in ocfs2_calc_xattr_set_need()
3133 if (!ocfs2_xattr_is_local(xe)) in ocfs2_calc_xattr_set_need()
3145 if (!ocfs2_xattr_is_local(xe)) { in ocfs2_calc_xattr_set_need()
3172 if ((ocfs2_xattr_is_local(xe) && in ocfs2_calc_xattr_set_need()
3174 (!ocfs2_xattr_is_local(xe) && in ocfs2_calc_xattr_set_need()
3759 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_find_xe_in_bucket() local
3767 xe = &xh->xh_entries[i]; in ocfs2_find_xe_in_bucket()
3769 if (name_hash > le32_to_cpu(xe->xe_name_hash)) in ocfs2_find_xe_in_bucket()
3771 else if (name_hash < le32_to_cpu(xe->xe_name_hash)) in ocfs2_find_xe_in_bucket()
3774 cmp = name_index - ocfs2_xattr_get_type(xe); in ocfs2_find_xe_in_bucket()
3776 cmp = name_len - xe->xe_name_len; in ocfs2_find_xe_in_bucket()
3823 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_xattr_bucket_find() local
3857 xe = &xh->xh_entries[0]; in ocfs2_xattr_bucket_find()
3858 if (name_hash < le32_to_cpu(xe->xe_name_hash)) { in ocfs2_xattr_bucket_find()
3869 xe = &xh->xh_entries[le16_to_cpu(xh->xh_count) - 1]; in ocfs2_xattr_bucket_find()
3874 if (name_hash > le32_to_cpu(xe->xe_name_hash)) { in ocfs2_xattr_bucket_find()
4191 struct ocfs2_xattr_entry *xe; in ocfs2_cp_xattr_block_to_bucket() local
4213 xe = &xb_xh->xh_entries[count - 1]; in ocfs2_cp_xattr_block_to_bucket()
4214 offset = le16_to_cpu(xe->xe_name_offset) + off_change; in ocfs2_cp_xattr_block_to_bucket()
4396 struct ocfs2_xattr_entry *xe; in ocfs2_defrag_xattr_bucket() local
4439 xe = xh->xh_entries; in ocfs2_defrag_xattr_bucket()
4441 for (i = 0; i < le16_to_cpu(xh->xh_count); i++, xe++) { in ocfs2_defrag_xattr_bucket()
4442 offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_defrag_xattr_bucket()
4443 len = namevalue_size_xe(xe); in ocfs2_defrag_xattr_bucket()
4457 xe->xe_name_offset = cpu_to_le16(end - len); in ocfs2_defrag_xattr_bucket()
4636 struct ocfs2_xattr_entry *xe; in ocfs2_divide_xattr_bucket() local
4692 xe = &xh->xh_entries[start-1]; in ocfs2_divide_xattr_bucket()
4704 xh->xh_entries[0].xe_name_hash = xe->xe_name_hash; in ocfs2_divide_xattr_bucket()
4723 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4724 name_value_len += namevalue_size_xe(xe); in ocfs2_divide_xattr_bucket()
4725 if (le16_to_cpu(xe->xe_name_offset) < name_offset) in ocfs2_divide_xattr_bucket()
4726 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_divide_xattr_bucket()
4737 xe = &xh->xh_entries[start]; in ocfs2_divide_xattr_bucket()
4740 (int)((char *)xe - (char *)xh), in ocfs2_divide_xattr_bucket()
4742 memmove((char *)xh->xh_entries, (char *)xe, len); in ocfs2_divide_xattr_bucket()
4743 xe = &xh->xh_entries[count - start]; in ocfs2_divide_xattr_bucket()
4745 memset((char *)xe, 0, len); in ocfs2_divide_xattr_bucket()
4753 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4754 if (le16_to_cpu(xe->xe_name_offset) < in ocfs2_divide_xattr_bucket()
4756 xh->xh_free_start = xe->xe_name_offset; in ocfs2_divide_xattr_bucket()
5362 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_bucket_value_truncate() local
5369 xe = &xh->xh_entries[xe_off]; in ocfs2_xattr_bucket_value_truncate()
5371 BUG_ON(!xe || ocfs2_xattr_is_local(xe)); in ocfs2_xattr_bucket_value_truncate()
5373 offset = le16_to_cpu(xe->xe_name_offset) + in ocfs2_xattr_bucket_value_truncate()
5374 OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_xattr_bucket_value_truncate()
5409 xe->xe_value_size = cpu_to_le64(len); in ocfs2_xattr_bucket_value_truncate()
5660 struct ocfs2_xattr_entry *xe; in ocfs2_delete_xattr_in_bucket() local
5672 xe = &xh->xh_entries[i]; in ocfs2_delete_xattr_in_bucket()
5673 if (ocfs2_xattr_is_local(xe)) in ocfs2_delete_xattr_in_bucket()
5770 struct ocfs2_xattr_entry *xe; in ocfs2_prepare_refcount_xattr() local
5783 xe = xis->here; in ocfs2_prepare_refcount_xattr()
5784 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_prepare_refcount_xattr()
5785 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_prepare_refcount_xattr()
5792 xe = xbs->here; in ocfs2_prepare_refcount_xattr()
5793 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_prepare_refcount_xattr()
5794 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_prepare_refcount_xattr()
5826 if (ocfs2_xattr_is_local(xe)) in ocfs2_prepare_refcount_xattr()
5945 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_attach_refcount_normal() local
5951 xe = &header->xh_entries[i]; in ocfs2_xattr_attach_refcount_normal()
5953 if (ocfs2_xattr_is_local(xe)) in ocfs2_xattr_attach_refcount_normal()
5957 le16_to_cpu(xe->xe_name_offset) + in ocfs2_xattr_attach_refcount_normal()
5958 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_xattr_attach_refcount_normal()
6008 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_tree_value_root() local
6024 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_get_xattr_tree_value_root()
6046 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_bucket_value_refcount() local
6065 xe = &xh->xh_entries[i]; in ocfs2_xattr_bucket_value_refcount()
6067 if (ocfs2_xattr_is_local(xe)) in ocfs2_xattr_bucket_value_refcount()
6180 typedef int (should_xattr_reflinked)(struct ocfs2_xattr_entry *xe);
6224 struct ocfs2_xattr_entry *xe; in ocfs2_value_metas_in_xattr_header() local
6227 xe = &xh->xh_entries[i]; in ocfs2_value_metas_in_xattr_header()
6228 if (ocfs2_xattr_is_local(xe)) in ocfs2_value_metas_in_xattr_header()
6266 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_value_root() local
6269 le16_to_cpu(xe->xe_name_offset) + in ocfs2_get_xattr_value_root()
6270 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_get_xattr_value_root()
6352 struct ocfs2_xattr_entry *xe, *last; in ocfs2_reflink_xattr_header() local
6363 xe = &xh->xh_entries[i]; in ocfs2_reflink_xattr_header()
6365 if (args->xattr_reflinked && !args->xattr_reflinked(xe)) { in ocfs2_reflink_xattr_header()
6366 xe = &new_xh->xh_entries[j]; in ocfs2_reflink_xattr_header()
6370 memmove(xe, xe + 1, in ocfs2_reflink_xattr_header()
6371 (void *)last - (void *)xe); in ocfs2_reflink_xattr_header()
6384 if (ocfs2_xattr_is_local(xe)) in ocfs2_reflink_xattr_header()
7121 static int ocfs2_reflink_xattr_no_security(struct ocfs2_xattr_entry *xe) in ocfs2_reflink_xattr_no_security() argument
7123 int type = ocfs2_xattr_get_type(xe); in ocfs2_reflink_xattr_no_security()