Lines Matching refs:xi

160 			     struct ocfs2_xattr_info *xi);
164 struct ocfs2_xattr_info *xi);
236 static int namevalue_size_xi(struct ocfs2_xattr_info *xi) in namevalue_size_xi() argument
238 return namevalue_size(xi->xi_name_len, xi->xi_value_len); in namevalue_size_xi()
277 struct ocfs2_xattr_info *xi,
304 struct ocfs2_xattr_info *xi,
574 static int ocfs2_xi_entry_usage(struct ocfs2_xattr_info *xi) in ocfs2_xi_entry_usage() argument
576 return namevalue_size_xi(xi) + in ocfs2_xi_entry_usage()
1460 struct ocfs2_xattr_info *xi) in ocfs2_xa_can_reuse_entry() argument
1462 return loc->xl_ops->xlo_can_reuse(loc, xi); in ocfs2_xa_can_reuse_entry()
1467 struct ocfs2_xattr_info *xi) in ocfs2_xa_check_space() argument
1469 return loc->xl_ops->xlo_check_space(loc, xi); in ocfs2_xa_check_space()
1485 struct ocfs2_xattr_info *xi) in ocfs2_xa_add_namevalue() argument
1487 int size = namevalue_size_xi(xi); in ocfs2_xa_add_namevalue()
1492 loc->xl_entry->xe_value_size = cpu_to_le64(xi->xi_value_len); in ocfs2_xa_add_namevalue()
1493 loc->xl_entry->xe_name_len = xi->xi_name_len; in ocfs2_xa_add_namevalue()
1494 ocfs2_xattr_set_type(loc->xl_entry, xi->xi_name_index); in ocfs2_xa_add_namevalue()
1496 xi->xi_value_len <= OCFS2_XATTR_INLINE_SIZE); in ocfs2_xa_add_namevalue()
1501 memcpy(nameval_buf, xi->xi_name, xi->xi_name_len); in ocfs2_xa_add_namevalue()
1552 struct ocfs2_xattr_info *xi) in ocfs2_xa_block_can_reuse() argument
1559 namevalue_size_xi(xi); in ocfs2_xa_block_can_reuse()
1578 struct ocfs2_xattr_info *xi) in ocfs2_xa_block_check_space() argument
1582 int needed_space = ocfs2_xi_entry_usage(xi); in ocfs2_xa_block_check_space()
1591 if (ocfs2_xa_can_reuse_entry(loc, xi)) in ocfs2_xa_block_check_space()
1713 struct ocfs2_xattr_info *xi) in ocfs2_xa_bucket_can_reuse() argument
1716 namevalue_size_xi(xi); in ocfs2_xa_bucket_can_reuse()
1740 struct ocfs2_xattr_info *xi) in ocfs2_xa_bucket_check_space() argument
1745 int needed_space = ocfs2_xi_entry_usage(xi); in ocfs2_xa_bucket_check_space()
1746 int size = namevalue_size_xi(xi); in ocfs2_xa_bucket_check_space()
1757 if (ocfs2_xa_can_reuse_entry(loc, xi)) in ocfs2_xa_bucket_check_space()
2042 struct ocfs2_xattr_info *xi, in ocfs2_xa_reuse_entry() argument
2046 int name_size = OCFS2_XATTR_SIZE(xi->xi_name_len); in ocfs2_xa_reuse_entry()
2050 int xi_local = xi->xi_value_len <= OCFS2_XATTR_INLINE_SIZE; in ocfs2_xa_reuse_entry()
2073 xi->xi_value_len) { in ocfs2_xa_reuse_entry()
2074 rc = ocfs2_xa_value_truncate(loc, xi->xi_value_len, in ocfs2_xa_reuse_entry()
2087 loc->xl_entry->xe_value_size = cpu_to_le64(xi->xi_value_len); in ocfs2_xa_reuse_entry()
2103 struct ocfs2_xattr_info *xi, in ocfs2_xa_prepare_entry() argument
2111 rc = ocfs2_xa_check_space(loc, xi); in ocfs2_xa_prepare_entry()
2116 if (ocfs2_xa_can_reuse_entry(loc, xi)) { in ocfs2_xa_prepare_entry()
2118 rc = ocfs2_xa_reuse_entry(loc, xi, ctxt); in ocfs2_xa_prepare_entry()
2143 ocfs2_xa_add_namevalue(loc, xi); in ocfs2_xa_prepare_entry()
2144 if (xi->xi_value_len > OCFS2_XATTR_INLINE_SIZE) in ocfs2_xa_prepare_entry()
2148 if (xi->xi_value_len > OCFS2_XATTR_INLINE_SIZE) { in ocfs2_xa_prepare_entry()
2150 rc = ocfs2_xa_value_truncate(loc, xi->xi_value_len, ctxt); in ocfs2_xa_prepare_entry()
2179 struct ocfs2_xattr_info *xi, in ocfs2_xa_store_value() argument
2184 int name_size = OCFS2_XATTR_SIZE(xi->xi_name_len); in ocfs2_xa_store_value()
2189 if (xi->xi_value_len > OCFS2_XATTR_INLINE_SIZE) { in ocfs2_xa_store_value()
2193 xi->xi_value, in ocfs2_xa_store_value()
2194 xi->xi_value_len); in ocfs2_xa_store_value()
2196 memcpy(nameval_buf + name_size, xi->xi_value, xi->xi_value_len); in ocfs2_xa_store_value()
2202 struct ocfs2_xattr_info *xi, in ocfs2_xa_set() argument
2206 u32 name_hash = ocfs2_xattr_name_hash(loc->xl_inode, xi->xi_name, in ocfs2_xa_set()
2207 xi->xi_name_len); in ocfs2_xa_set()
2223 if (!xi->xi_value) { in ocfs2_xa_set()
2228 ret = ocfs2_xa_prepare_entry(loc, xi, name_hash, ctxt); in ocfs2_xa_set()
2235 ret = ocfs2_xa_store_value(loc, xi, ctxt); in ocfs2_xa_set()
2748 struct ocfs2_xattr_info *xi, in ocfs2_xattr_ibody_set() argument
2779 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_ibody_set()
2933 struct ocfs2_xattr_info *xi, in ocfs2_xattr_block_set() argument
2963 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_block_set()
2976 ret = ocfs2_xattr_set_entry_index_block(inode, xi, xs, ctxt); in ocfs2_xattr_block_set()
2984 struct ocfs2_xattr_info *xi, in ocfs2_xattr_can_be_in_inode() argument
3009 if (free >= (sizeof(struct ocfs2_xattr_entry) + namevalue_size_xi(xi))) in ocfs2_xattr_can_be_in_inode()
3017 struct ocfs2_xattr_info *xi, in ocfs2_calc_xattr_set_need() argument
3033 xi->xi_value_len); in ocfs2_calc_xattr_set_need()
3041 if (xi->xi_value_len > OCFS2_XATTR_INLINE_SIZE) in ocfs2_calc_xattr_set_need()
3048 if (xi->xi_value_len > OCFS2_XATTR_INLINE_SIZE) { in ocfs2_calc_xattr_set_need()
3093 if (!xi->xi_value) { in ocfs2_calc_xattr_set_need()
3110 if (ocfs2_xattr_can_be_in_inode(inode, xi, xis)) { in ocfs2_calc_xattr_set_need()
3123 if (xi->xi_value_len > OCFS2_XATTR_INLINE_SIZE) { in ocfs2_calc_xattr_set_need()
3157 (value_size >= xi->xi_value_len)) || in ocfs2_calc_xattr_set_need()
3159 OCFS2_XATTR_ROOT_SIZE >= xi->xi_value_len)) in ocfs2_calc_xattr_set_need()
3226 struct ocfs2_xattr_info *xi, in ocfs2_init_xattr_set_ctxt() argument
3240 ret = ocfs2_calc_xattr_set_need(inode, di, xi, xis, xbs, in ocfs2_init_xattr_set_ctxt()
3248 trace_ocfs2_init_xattr_set_ctxt(xi->xi_name, meta_add, in ocfs2_init_xattr_set_ctxt()
3282 struct ocfs2_xattr_info *xi, in __ocfs2_xattr_set_handle() argument
3289 if (!xi->xi_value) { in __ocfs2_xattr_set_handle()
3292 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt); in __ocfs2_xattr_set_handle()
3294 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt); in __ocfs2_xattr_set_handle()
3297 ret = ocfs2_xattr_ibody_set(inode, xi, xis, ctxt); in __ocfs2_xattr_set_handle()
3303 xi->xi_value = NULL; in __ocfs2_xattr_set_handle()
3304 xi->xi_value_len = 0; in __ocfs2_xattr_set_handle()
3310 xi, in __ocfs2_xattr_set_handle()
3327 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt); in __ocfs2_xattr_set_handle()
3331 xi->xi_name_index, in __ocfs2_xattr_set_handle()
3332 xi->xi_name, xbs); in __ocfs2_xattr_set_handle()
3340 xi, in __ocfs2_xattr_set_handle()
3362 ret = ocfs2_xattr_block_set(inode, xi, xbs, ctxt); in __ocfs2_xattr_set_handle()
3370 xi->xi_value = NULL; in __ocfs2_xattr_set_handle()
3371 xi->xi_value_len = 0; in __ocfs2_xattr_set_handle()
3375 xi, in __ocfs2_xattr_set_handle()
3391 ret = ocfs2_xattr_ibody_set(inode, xi, in __ocfs2_xattr_set_handle()
3435 struct ocfs2_xattr_info xi = { in ocfs2_xattr_set_handle() local
3487 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt); in ocfs2_xattr_set_handle()
3519 struct ocfs2_xattr_info xi = { in ocfs2_xattr_set() local
3586 ret = ocfs2_prepare_refcount_xattr(inode, di, &xi, in ocfs2_xattr_set()
3607 ret = ocfs2_init_xattr_set_ctxt(inode, di, &xi, &xis, in ocfs2_xattr_set()
3623 ret = __ocfs2_xattr_set_handle(inode, di, &xi, &xis, &xbs, &ctxt); in ocfs2_xattr_set()
5534 struct ocfs2_xattr_info *xi, in ocfs2_xattr_set_entry_bucket() argument
5541 trace_ocfs2_xattr_set_entry_bucket(xi->xi_name); in ocfs2_xattr_set_entry_bucket()
5545 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_set_entry_bucket()
5563 ret = ocfs2_xa_set(&loc, xi, ctxt); in ocfs2_xattr_set_entry_bucket()
5577 struct ocfs2_xattr_info *xi, in ocfs2_xattr_set_entry_index_block() argument
5583 trace_ocfs2_xattr_set_entry_index_block(xi->xi_name); in ocfs2_xattr_set_entry_index_block()
5585 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt); in ocfs2_xattr_set_entry_index_block()
5603 xi->xi_name); in ocfs2_xattr_set_entry_index_block()
5627 xi->xi_name_index, in ocfs2_xattr_set_entry_index_block()
5628 xi->xi_name, xs); in ocfs2_xattr_set_entry_index_block()
5634 ret = ocfs2_xattr_set_entry_bucket(inode, xi, xs, ctxt); in ocfs2_xattr_set_entry_index_block()
5746 struct ocfs2_xattr_info *xi, in ocfs2_prepare_refcount_xattr() argument
5848 if (!xi->xi_value || xi->xi_value_len <= OCFS2_XATTR_INLINE_SIZE) { in ocfs2_prepare_refcount_xattr()