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()
587 static int ocfs2_xe_entry_usage(struct ocfs2_xattr_entry *xe) in ocfs2_xe_entry_usage() argument
589 return namevalue_size_xe(xe) + in ocfs2_xe_entry_usage()
3037 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_calc_xattr_set_need() local
3067 xe = xis->here; in ocfs2_calc_xattr_set_need()
3068 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_calc_xattr_set_need()
3069 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_calc_xattr_set_need()
3075 xe = xbs->here; in ocfs2_calc_xattr_set_need()
3076 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_calc_xattr_set_need()
3077 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_calc_xattr_set_need()
3102 if (!ocfs2_xattr_is_local(xe)) in ocfs2_calc_xattr_set_need()
3109 value_size = le64_to_cpu(xe->xe_value_size); in ocfs2_calc_xattr_set_need()
3122 if (!ocfs2_xattr_is_local(xe)) in ocfs2_calc_xattr_set_need()
3134 if (!ocfs2_xattr_is_local(xe)) { in ocfs2_calc_xattr_set_need()
3161 if ((ocfs2_xattr_is_local(xe) && in ocfs2_calc_xattr_set_need()
3163 (!ocfs2_xattr_is_local(xe) && in ocfs2_calc_xattr_set_need()
3748 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_find_xe_in_bucket() local
3756 xe = &xh->xh_entries[i]; in ocfs2_find_xe_in_bucket()
3758 if (name_hash > le32_to_cpu(xe->xe_name_hash)) in ocfs2_find_xe_in_bucket()
3760 else if (name_hash < le32_to_cpu(xe->xe_name_hash)) in ocfs2_find_xe_in_bucket()
3763 cmp = name_index - ocfs2_xattr_get_type(xe); in ocfs2_find_xe_in_bucket()
3765 cmp = name_len - xe->xe_name_len; in ocfs2_find_xe_in_bucket()
3812 struct ocfs2_xattr_entry *xe = NULL; in ocfs2_xattr_bucket_find() local
3847 xe = &xh->xh_entries[0]; in ocfs2_xattr_bucket_find()
3848 if (name_hash < le32_to_cpu(xe->xe_name_hash)) { in ocfs2_xattr_bucket_find()
3859 xe = &xh->xh_entries[le16_to_cpu(xh->xh_count) - 1]; in ocfs2_xattr_bucket_find()
3861 last_hash = le32_to_cpu(xe->xe_name_hash); in ocfs2_xattr_bucket_find()
3866 if (name_hash > le32_to_cpu(xe->xe_name_hash)) { in ocfs2_xattr_bucket_find()
4185 struct ocfs2_xattr_entry *xe; in ocfs2_cp_xattr_block_to_bucket() local
4207 xe = &xb_xh->xh_entries[count - 1]; in ocfs2_cp_xattr_block_to_bucket()
4208 offset = le16_to_cpu(xe->xe_name_offset) + off_change; in ocfs2_cp_xattr_block_to_bucket()
4390 struct ocfs2_xattr_entry *xe; in ocfs2_defrag_xattr_bucket() local
4433 xe = xh->xh_entries; in ocfs2_defrag_xattr_bucket()
4435 for (i = 0; i < le16_to_cpu(xh->xh_count); i++, xe++) { in ocfs2_defrag_xattr_bucket()
4436 offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_defrag_xattr_bucket()
4437 len = namevalue_size_xe(xe); in ocfs2_defrag_xattr_bucket()
4451 xe->xe_name_offset = cpu_to_le16(end - len); in ocfs2_defrag_xattr_bucket()
4630 struct ocfs2_xattr_entry *xe; in ocfs2_divide_xattr_bucket() local
4686 xe = &xh->xh_entries[start-1]; in ocfs2_divide_xattr_bucket()
4698 xh->xh_entries[0].xe_name_hash = xe->xe_name_hash; in ocfs2_divide_xattr_bucket()
4717 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4718 name_value_len += namevalue_size_xe(xe); in ocfs2_divide_xattr_bucket()
4719 if (le16_to_cpu(xe->xe_name_offset) < name_offset) in ocfs2_divide_xattr_bucket()
4720 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_divide_xattr_bucket()
4731 xe = &xh->xh_entries[start]; in ocfs2_divide_xattr_bucket()
4734 (int)((char *)xe - (char *)xh), in ocfs2_divide_xattr_bucket()
4736 memmove((char *)xh->xh_entries, (char *)xe, len); in ocfs2_divide_xattr_bucket()
4737 xe = &xh->xh_entries[count - start]; in ocfs2_divide_xattr_bucket()
4739 memset((char *)xe, 0, len); in ocfs2_divide_xattr_bucket()
4747 xe = &xh->xh_entries[i]; in ocfs2_divide_xattr_bucket()
4748 if (le16_to_cpu(xe->xe_name_offset) < in ocfs2_divide_xattr_bucket()
4750 xh->xh_free_start = xe->xe_name_offset; in ocfs2_divide_xattr_bucket()
5356 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_bucket_value_truncate() local
5363 xe = &xh->xh_entries[xe_off]; in ocfs2_xattr_bucket_value_truncate()
5365 BUG_ON(!xe || ocfs2_xattr_is_local(xe)); in ocfs2_xattr_bucket_value_truncate()
5367 offset = le16_to_cpu(xe->xe_name_offset) + in ocfs2_xattr_bucket_value_truncate()
5368 OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_xattr_bucket_value_truncate()
5403 xe->xe_value_size = cpu_to_le64(len); in ocfs2_xattr_bucket_value_truncate()
5654 struct ocfs2_xattr_entry *xe; in ocfs2_delete_xattr_in_bucket() local
5666 xe = &xh->xh_entries[i]; in ocfs2_delete_xattr_in_bucket()
5667 if (ocfs2_xattr_is_local(xe)) in ocfs2_delete_xattr_in_bucket()
5764 struct ocfs2_xattr_entry *xe; in ocfs2_prepare_refcount_xattr() local
5777 xe = xis->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()
5786 xe = xbs->here; in ocfs2_prepare_refcount_xattr()
5787 name_offset = le16_to_cpu(xe->xe_name_offset); in ocfs2_prepare_refcount_xattr()
5788 name_len = OCFS2_XATTR_SIZE(xe->xe_name_len); in ocfs2_prepare_refcount_xattr()
5820 if (ocfs2_xattr_is_local(xe)) in ocfs2_prepare_refcount_xattr()
5939 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_attach_refcount_normal() local
5945 xe = &header->xh_entries[i]; in ocfs2_xattr_attach_refcount_normal()
5947 if (ocfs2_xattr_is_local(xe)) in ocfs2_xattr_attach_refcount_normal()
5951 le16_to_cpu(xe->xe_name_offset) + in ocfs2_xattr_attach_refcount_normal()
5952 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_xattr_attach_refcount_normal()
6002 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_tree_value_root() local
6018 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_get_xattr_tree_value_root()
6040 struct ocfs2_xattr_entry *xe; in ocfs2_xattr_bucket_value_refcount() local
6059 xe = &xh->xh_entries[i]; in ocfs2_xattr_bucket_value_refcount()
6061 if (ocfs2_xattr_is_local(xe)) in ocfs2_xattr_bucket_value_refcount()
6174 typedef int (should_xattr_reflinked)(struct ocfs2_xattr_entry *xe);
6218 struct ocfs2_xattr_entry *xe; in ocfs2_value_metas_in_xattr_header() local
6221 xe = &xh->xh_entries[i]; in ocfs2_value_metas_in_xattr_header()
6222 if (ocfs2_xattr_is_local(xe)) in ocfs2_value_metas_in_xattr_header()
6260 struct ocfs2_xattr_entry *xe = &xh->xh_entries[offset]; in ocfs2_get_xattr_value_root() local
6263 le16_to_cpu(xe->xe_name_offset) + in ocfs2_get_xattr_value_root()
6264 OCFS2_XATTR_SIZE(xe->xe_name_len)); in ocfs2_get_xattr_value_root()
6346 struct ocfs2_xattr_entry *xe, *last; in ocfs2_reflink_xattr_header() local
6357 xe = &xh->xh_entries[i]; in ocfs2_reflink_xattr_header()
6359 if (args->xattr_reflinked && !args->xattr_reflinked(xe)) { in ocfs2_reflink_xattr_header()
6360 xe = &new_xh->xh_entries[j]; in ocfs2_reflink_xattr_header()
6364 memmove(xe, xe + 1, in ocfs2_reflink_xattr_header()
6365 (void *)last - (void *)xe); in ocfs2_reflink_xattr_header()
6378 if (ocfs2_xattr_is_local(xe)) in ocfs2_reflink_xattr_header()
7115 static int ocfs2_reflink_xattr_no_security(struct ocfs2_xattr_entry *xe) in ocfs2_reflink_xattr_no_security() argument
7117 int type = ocfs2_xattr_get_type(xe); in ocfs2_reflink_xattr_no_security()