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()
3031 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_calc_xattr_set_need() local
3061 xe = xis->here; in ocfs2_calc_xattr_set_need()
3062 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_calc_xattr_set_need()
3063 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_calc_xattr_set_need()
3069 xe = xbs->here; in ocfs2_calc_xattr_set_need()
3070 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_calc_xattr_set_need()
3071 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_calc_xattr_set_need()
3096 if (!ocfs2_xattr_is_local(xe)) in ocfs2_calc_xattr_set_need()
3103 value_size = le64_to_cpu(xe->xe_value_size); in ocfs2_calc_xattr_set_need()
3116 if (!ocfs2_xattr_is_local(xe)) in ocfs2_calc_xattr_set_need()
3128 if (!ocfs2_xattr_is_local(xe)) { in ocfs2_calc_xattr_set_need()
3155 if ((ocfs2_xattr_is_local(xe) && in ocfs2_calc_xattr_set_need()
3157 (!ocfs2_xattr_is_local(xe) && in ocfs2_calc_xattr_set_need()
3740 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_find_xe_in_bucket() local
3748 xe = &xh->xh_entries[i]; in ocfs2_find_xe_in_bucket()
3750 if (name_hash > le32_to_cpu(xe->xe_name_hash)) in ocfs2_find_xe_in_bucket()
3752 else if (name_hash < le32_to_cpu(xe->xe_name_hash)) in ocfs2_find_xe_in_bucket()
3755 cmp = name_index - ocfs2_xattr_get_type(xe); in ocfs2_find_xe_in_bucket()
3757 cmp = name_len - xe->xe_name_len; in ocfs2_find_xe_in_bucket()
3804 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_xattr_bucket_find() local
3839 xe = &xh->xh_entries[0]; in ocfs2_xattr_bucket_find()
3840 if (name_hash < le32_to_cpu(xe->xe_name_hash)) { in ocfs2_xattr_bucket_find()
3851 xe = &xh->xh_entries[le16_to_cpu(xh->xh_count) - 1]; in ocfs2_xattr_bucket_find()
3853 last_hash = le32_to_cpu(xe->xe_name_hash); in ocfs2_xattr_bucket_find()
3858 if (name_hash > le32_to_cpu(xe->xe_name_hash)) { in ocfs2_xattr_bucket_find()
4177 struct ocfs2_xattr_entry *xe; in ocfs2_cp_xattr_block_to_bucket() local
4199 xe = &xb_xh->xh_entries[count - 1]; in ocfs2_cp_xattr_block_to_bucket()
4200 offset = le16_to_cpu(xe->xe_name_offset) + off_change; in ocfs2_cp_xattr_block_to_bucket()
4382 struct ocfs2_xattr_entry *xe; in ocfs2_defrag_xattr_bucket() local
4425 xe = xh->xh_entries; in ocfs2_defrag_xattr_bucket()
4427 for (i = 0; i < le16_to_cpu(xh->xh_count); i++, xe++) { in ocfs2_defrag_xattr_bucket()
4428 offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_defrag_xattr_bucket()
4429 len = namevalue_size_xe(xe); in ocfs2_defrag_xattr_bucket()
4443 xe->xe_name_offset = cpu_to_le16(end - len); in ocfs2_defrag_xattr_bucket()
4622 struct ocfs2_xattr_entry *xe; in ocfs2_divide_xattr_bucket() local
4678 xe = &xh->xh_entries[start-1]; in ocfs2_divide_xattr_bucket()
4690 xh->xh_entries[0].xe_name_hash = xe->xe_name_hash; in ocfs2_divide_xattr_bucket()
4709 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4710 name_value_len += namevalue_size_xe(xe); in ocfs2_divide_xattr_bucket()
4711 if (le16_to_cpu(xe->xe_name_offset) < name_offset) in ocfs2_divide_xattr_bucket()
4712 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_divide_xattr_bucket()
4723 xe = &xh->xh_entries[start]; in ocfs2_divide_xattr_bucket()
4726 (int)((char *)xe - (char *)xh), in ocfs2_divide_xattr_bucket()
4728 memmove((char *)xh->xh_entries, (char *)xe, len); in ocfs2_divide_xattr_bucket()
4729 xe = &xh->xh_entries[count - start]; in ocfs2_divide_xattr_bucket()
4731 memset((char *)xe, 0, len); in ocfs2_divide_xattr_bucket()
4739 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4740 if (le16_to_cpu(xe->xe_name_offset) < in ocfs2_divide_xattr_bucket()
4742 xh->xh_free_start = xe->xe_name_offset; in ocfs2_divide_xattr_bucket()
5348 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_bucket_value_truncate() local
5355 xe = &xh->xh_entries[xe_off]; in ocfs2_xattr_bucket_value_truncate()
5357 BUG_ON(!xe || ocfs2_xattr_is_local(xe)); in ocfs2_xattr_bucket_value_truncate()
5359 offset = le16_to_cpu(xe->xe_name_offset) + in ocfs2_xattr_bucket_value_truncate()
5360 OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_xattr_bucket_value_truncate()
5395 xe->xe_value_size = cpu_to_le64(len); in ocfs2_xattr_bucket_value_truncate()
5646 struct ocfs2_xattr_entry *xe; in ocfs2_delete_xattr_in_bucket() local
5658 xe = &xh->xh_entries[i]; in ocfs2_delete_xattr_in_bucket()
5659 if (ocfs2_xattr_is_local(xe)) in ocfs2_delete_xattr_in_bucket()
5756 struct ocfs2_xattr_entry *xe; in ocfs2_prepare_refcount_xattr() local
5769 xe = xis->here; in ocfs2_prepare_refcount_xattr()
5770 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_prepare_refcount_xattr()
5771 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_prepare_refcount_xattr()
5778 xe = xbs->here; in ocfs2_prepare_refcount_xattr()
5779 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_prepare_refcount_xattr()
5780 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_prepare_refcount_xattr()
5812 if (ocfs2_xattr_is_local(xe)) in ocfs2_prepare_refcount_xattr()
5931 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_attach_refcount_normal() local
5937 xe = &header->xh_entries[i]; in ocfs2_xattr_attach_refcount_normal()
5939 if (ocfs2_xattr_is_local(xe)) in ocfs2_xattr_attach_refcount_normal()
5943 le16_to_cpu(xe->xe_name_offset) + in ocfs2_xattr_attach_refcount_normal()
5944 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_xattr_attach_refcount_normal()
5994 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_tree_value_root() local
6010 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_get_xattr_tree_value_root()
6032 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_bucket_value_refcount() local
6051 xe = &xh->xh_entries[i]; in ocfs2_xattr_bucket_value_refcount()
6053 if (ocfs2_xattr_is_local(xe)) in ocfs2_xattr_bucket_value_refcount()
6166 typedef int (should_xattr_reflinked)(struct ocfs2_xattr_entry *xe);
6210 struct ocfs2_xattr_entry *xe; in ocfs2_value_metas_in_xattr_header() local
6213 xe = &xh->xh_entries[i]; in ocfs2_value_metas_in_xattr_header()
6214 if (ocfs2_xattr_is_local(xe)) in ocfs2_value_metas_in_xattr_header()
6252 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_value_root() local
6255 le16_to_cpu(xe->xe_name_offset) + in ocfs2_get_xattr_value_root()
6256 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_get_xattr_value_root()
6338 struct ocfs2_xattr_entry *xe, *last; in ocfs2_reflink_xattr_header() local
6349 xe = &xh->xh_entries[i]; in ocfs2_reflink_xattr_header()
6351 if (args->xattr_reflinked && !args->xattr_reflinked(xe)) { in ocfs2_reflink_xattr_header()
6352 xe = &new_xh->xh_entries[j]; in ocfs2_reflink_xattr_header()
6356 memmove(xe, xe + 1, in ocfs2_reflink_xattr_header()
6357 (void *)last - (void *)xe); in ocfs2_reflink_xattr_header()
6370 if (ocfs2_xattr_is_local(xe)) in ocfs2_reflink_xattr_header()
7107 static int ocfs2_reflink_xattr_no_security(struct ocfs2_xattr_entry *xe) in ocfs2_reflink_xattr_no_security() argument
7109 int type = ocfs2_xattr_get_type(xe); in ocfs2_reflink_xattr_no_security()