Lines Matching refs:xe
241 static int namevalue_size_xe(struct ocfs2_xattr_entry *xe) in namevalue_size_xe() argument
243 u64 value_len = le64_to_cpu(xe->xe_value_size); in namevalue_size_xe()
246 ocfs2_xattr_is_local(xe)); in namevalue_size_xe()
247 return namevalue_size(xe->xe_name_len, value_len); in namevalue_size_xe()
581 static int ocfs2_xe_entry_usage(struct ocfs2_xattr_entry *xe) in ocfs2_xe_entry_usage() argument
583 return namevalue_size_xe(xe) + in ocfs2_xe_entry_usage()
3033 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_calc_xattr_set_need() local
3063 xe = xis->here; in ocfs2_calc_xattr_set_need()
3064 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_calc_xattr_set_need()
3065 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_calc_xattr_set_need()
3071 xe = xbs->here; in ocfs2_calc_xattr_set_need()
3072 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_calc_xattr_set_need()
3073 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_calc_xattr_set_need()
3098 if (!ocfs2_xattr_is_local(xe)) in ocfs2_calc_xattr_set_need()
3105 value_size = le64_to_cpu(xe->xe_value_size); in ocfs2_calc_xattr_set_need()
3118 if (!ocfs2_xattr_is_local(xe)) in ocfs2_calc_xattr_set_need()
3130 if (!ocfs2_xattr_is_local(xe)) { in ocfs2_calc_xattr_set_need()
3157 if ((ocfs2_xattr_is_local(xe) && in ocfs2_calc_xattr_set_need()
3159 (!ocfs2_xattr_is_local(xe) && in ocfs2_calc_xattr_set_need()
3742 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_find_xe_in_bucket() local
3750 xe = &xh->xh_entries[i]; in ocfs2_find_xe_in_bucket()
3752 if (name_hash > le32_to_cpu(xe->xe_name_hash)) in ocfs2_find_xe_in_bucket()
3754 else if (name_hash < le32_to_cpu(xe->xe_name_hash)) in ocfs2_find_xe_in_bucket()
3757 cmp = name_index - ocfs2_xattr_get_type(xe); in ocfs2_find_xe_in_bucket()
3759 cmp = name_len - xe->xe_name_len; in ocfs2_find_xe_in_bucket()
3806 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_xattr_bucket_find() local
3840 xe = &xh->xh_entries[0]; in ocfs2_xattr_bucket_find()
3841 if (name_hash < le32_to_cpu(xe->xe_name_hash)) { in ocfs2_xattr_bucket_find()
3852 xe = &xh->xh_entries[le16_to_cpu(xh->xh_count) - 1]; in ocfs2_xattr_bucket_find()
3857 if (name_hash > le32_to_cpu(xe->xe_name_hash)) { in ocfs2_xattr_bucket_find()
4176 struct ocfs2_xattr_entry *xe; in ocfs2_cp_xattr_block_to_bucket() local
4198 xe = &xb_xh->xh_entries[count - 1]; in ocfs2_cp_xattr_block_to_bucket()
4199 offset = le16_to_cpu(xe->xe_name_offset) + off_change; in ocfs2_cp_xattr_block_to_bucket()
4381 struct ocfs2_xattr_entry *xe; in ocfs2_defrag_xattr_bucket() local
4424 xe = xh->xh_entries; in ocfs2_defrag_xattr_bucket()
4426 for (i = 0; i < le16_to_cpu(xh->xh_count); i++, xe++) { in ocfs2_defrag_xattr_bucket()
4427 offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_defrag_xattr_bucket()
4428 len = namevalue_size_xe(xe); in ocfs2_defrag_xattr_bucket()
4442 xe->xe_name_offset = cpu_to_le16(end - len); in ocfs2_defrag_xattr_bucket()
4621 struct ocfs2_xattr_entry *xe; in ocfs2_divide_xattr_bucket() local
4677 xe = &xh->xh_entries[start-1]; in ocfs2_divide_xattr_bucket()
4689 xh->xh_entries[0].xe_name_hash = xe->xe_name_hash; in ocfs2_divide_xattr_bucket()
4708 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4709 name_value_len += namevalue_size_xe(xe); in ocfs2_divide_xattr_bucket()
4710 if (le16_to_cpu(xe->xe_name_offset) < name_offset) in ocfs2_divide_xattr_bucket()
4711 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_divide_xattr_bucket()
4722 xe = &xh->xh_entries[start]; in ocfs2_divide_xattr_bucket()
4725 (int)((char *)xe - (char *)xh), in ocfs2_divide_xattr_bucket()
4727 memmove((char *)xh->xh_entries, (char *)xe, len); in ocfs2_divide_xattr_bucket()
4728 xe = &xh->xh_entries[count - start]; in ocfs2_divide_xattr_bucket()
4730 memset((char *)xe, 0, len); in ocfs2_divide_xattr_bucket()
4738 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4739 if (le16_to_cpu(xe->xe_name_offset) < in ocfs2_divide_xattr_bucket()
4741 xh->xh_free_start = xe->xe_name_offset; in ocfs2_divide_xattr_bucket()
5347 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_bucket_value_truncate() local
5354 xe = &xh->xh_entries[xe_off]; in ocfs2_xattr_bucket_value_truncate()
5356 BUG_ON(!xe || ocfs2_xattr_is_local(xe)); in ocfs2_xattr_bucket_value_truncate()
5358 offset = le16_to_cpu(xe->xe_name_offset) + in ocfs2_xattr_bucket_value_truncate()
5359 OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_xattr_bucket_value_truncate()
5394 xe->xe_value_size = cpu_to_le64(len); in ocfs2_xattr_bucket_value_truncate()
5645 struct ocfs2_xattr_entry *xe; in ocfs2_delete_xattr_in_bucket() local
5657 xe = &xh->xh_entries[i]; in ocfs2_delete_xattr_in_bucket()
5658 if (ocfs2_xattr_is_local(xe)) in ocfs2_delete_xattr_in_bucket()
5755 struct ocfs2_xattr_entry *xe; in ocfs2_prepare_refcount_xattr() local
5768 xe = xis->here; in ocfs2_prepare_refcount_xattr()
5769 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_prepare_refcount_xattr()
5770 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_prepare_refcount_xattr()
5777 xe = xbs->here; in ocfs2_prepare_refcount_xattr()
5778 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_prepare_refcount_xattr()
5779 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_prepare_refcount_xattr()
5811 if (ocfs2_xattr_is_local(xe)) in ocfs2_prepare_refcount_xattr()
5930 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_attach_refcount_normal() local
5936 xe = &header->xh_entries[i]; in ocfs2_xattr_attach_refcount_normal()
5938 if (ocfs2_xattr_is_local(xe)) in ocfs2_xattr_attach_refcount_normal()
5942 le16_to_cpu(xe->xe_name_offset) + in ocfs2_xattr_attach_refcount_normal()
5943 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_xattr_attach_refcount_normal()
5993 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_tree_value_root() local
6009 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_get_xattr_tree_value_root()
6031 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_bucket_value_refcount() local
6050 xe = &xh->xh_entries[i]; in ocfs2_xattr_bucket_value_refcount()
6052 if (ocfs2_xattr_is_local(xe)) in ocfs2_xattr_bucket_value_refcount()
6165 typedef int (should_xattr_reflinked)(struct ocfs2_xattr_entry *xe);
6209 struct ocfs2_xattr_entry *xe; in ocfs2_value_metas_in_xattr_header() local
6212 xe = &xh->xh_entries[i]; in ocfs2_value_metas_in_xattr_header()
6213 if (ocfs2_xattr_is_local(xe)) in ocfs2_value_metas_in_xattr_header()
6251 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_value_root() local
6254 le16_to_cpu(xe->xe_name_offset) + in ocfs2_get_xattr_value_root()
6255 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_get_xattr_value_root()
6337 struct ocfs2_xattr_entry *xe, *last; in ocfs2_reflink_xattr_header() local
6348 xe = &xh->xh_entries[i]; in ocfs2_reflink_xattr_header()
6350 if (args->xattr_reflinked && !args->xattr_reflinked(xe)) { in ocfs2_reflink_xattr_header()
6351 xe = &new_xh->xh_entries[j]; in ocfs2_reflink_xattr_header()
6355 memmove(xe, xe + 1, in ocfs2_reflink_xattr_header()
6356 (void *)last - (void *)xe); in ocfs2_reflink_xattr_header()
6369 if (ocfs2_xattr_is_local(xe)) in ocfs2_reflink_xattr_header()
7106 static int ocfs2_reflink_xattr_no_security(struct ocfs2_xattr_entry *xe) in ocfs2_reflink_xattr_no_security() argument
7108 int type = ocfs2_xattr_get_type(xe); in ocfs2_reflink_xattr_no_security()