linux/fs/bcachefs/xattr.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _BCACHEFS_XATTR_H
#define _BCACHEFS_XATTR_H

#include "str_hash.h"

extern const struct bch_hash_desc bch2_xattr_hash_desc;

int bch2_xattr_invalid(struct bch_fs *, struct bkey_s_c,
		       enum bch_validate_flags, struct printbuf *);
void bch2_xattr_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c);

#define bch2_bkey_ops_xattr

static inline unsigned xattr_val_u64s(unsigned name_len, unsigned val_len)
{}

#define xattr_val(_xattr)

struct xattr_search_key {};

#define X_SEARCH(_type, _name, _len)

struct dentry;
struct xattr_handler;
struct bch_hash_info;
struct bch_inode_info;

/* Exported for cmd_migrate.c in tools: */
int bch2_xattr_set(struct btree_trans *, subvol_inum,
		   struct bch_inode_unpacked *, const struct bch_hash_info *,
		   const char *, const void *, size_t, int, int);

ssize_t bch2_xattr_list(struct dentry *, char *, size_t);

extern const struct xattr_handler *bch2_xattr_handlers[];

#endif /* _BCACHEFS_XATTR_H */