linux/fs/bcachefs/xattr.c

// SPDX-License-Identifier: GPL-2.0

#include "bcachefs.h"
#include "acl.h"
#include "bkey_methods.h"
#include "btree_update.h"
#include "extents.h"
#include "fs.h"
#include "rebalance.h"
#include "str_hash.h"
#include "xattr.h"

#include <linux/dcache.h>
#include <linux/posix_acl_xattr.h>
#include <linux/xattr.h>

static const struct xattr_handler *bch2_xattr_type_to_handler(unsigned);

static u64 bch2_xattr_hash(const struct bch_hash_info *info,
			  const struct xattr_search_key *key)
{}

static u64 xattr_hash_key(const struct bch_hash_info *info, const void *key)
{}

static u64 xattr_hash_bkey(const struct bch_hash_info *info, struct bkey_s_c k)
{}

static bool xattr_cmp_key(struct bkey_s_c _l, const void *_r)
{}

static bool xattr_cmp_bkey(struct bkey_s_c _l, struct bkey_s_c _r)
{}

const struct bch_hash_desc bch2_xattr_hash_desc =;

int bch2_xattr_invalid(struct bch_fs *c, struct bkey_s_c k,
		       enum bch_validate_flags flags,
		       struct printbuf *err)
{}

void bch2_xattr_to_text(struct printbuf *out, struct bch_fs *c,
			struct bkey_s_c k)
{}

static int bch2_xattr_get_trans(struct btree_trans *trans, struct bch_inode_info *inode,
				const char *name, void *buffer, size_t size, int type)
{}

int bch2_xattr_set(struct btree_trans *trans, subvol_inum inum,
		   struct bch_inode_unpacked *inode_u,
		   const struct bch_hash_info *hash_info,
		   const char *name, const void *value, size_t size,
		   int type, int flags)
{}

struct xattr_buf {};

static int __bch2_xattr_emit(const char *prefix,
			     const char *name, size_t name_len,
			     struct xattr_buf *buf)
{}

static int bch2_xattr_emit(struct dentry *dentry,
			    const struct bch_xattr *xattr,
			    struct xattr_buf *buf)
{}

static int bch2_xattr_list_bcachefs(struct bch_fs *c,
				    struct bch_inode_unpacked *inode,
				    struct xattr_buf *buf,
				    bool all)
{}

ssize_t bch2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
{}

static int bch2_xattr_get_handler(const struct xattr_handler *handler,
				  struct dentry *dentry, struct inode *vinode,
				  const char *name, void *buffer, size_t size)
{}

static int bch2_xattr_set_handler(const struct xattr_handler *handler,
				  struct mnt_idmap *idmap,
				  struct dentry *dentry, struct inode *vinode,
				  const char *name, const void *value,
				  size_t size, int flags)
{}

static const struct xattr_handler bch_xattr_user_handler =;

static bool bch2_xattr_trusted_list(struct dentry *dentry)
{}

static const struct xattr_handler bch_xattr_trusted_handler =;

static const struct xattr_handler bch_xattr_security_handler =;

#ifndef NO_BCACHEFS_FS

static int opt_to_inode_opt(int id)
{}

static int __bch2_xattr_bcachefs_get(const struct xattr_handler *handler,
				struct dentry *dentry, struct inode *vinode,
				const char *name, void *buffer, size_t size,
				bool all)
{}

static int bch2_xattr_bcachefs_get(const struct xattr_handler *handler,
				   struct dentry *dentry, struct inode *vinode,
				   const char *name, void *buffer, size_t size)
{}

struct inode_opt_set {};

static int inode_opt_set_fn(struct btree_trans *trans,
			    struct bch_inode_info *inode,
			    struct bch_inode_unpacked *bi,
			    void *p)
{}

static int bch2_xattr_bcachefs_set(const struct xattr_handler *handler,
				   struct mnt_idmap *idmap,
				   struct dentry *dentry, struct inode *vinode,
				   const char *name, const void *value,
				   size_t size, int flags)
{}

static const struct xattr_handler bch_xattr_bcachefs_handler =;

static int bch2_xattr_bcachefs_get_effective(
				const struct xattr_handler *handler,
				struct dentry *dentry, struct inode *vinode,
				const char *name, void *buffer, size_t size)
{}

static const struct xattr_handler bch_xattr_bcachefs_effective_handler =;

#endif /* NO_BCACHEFS_FS */

const struct xattr_handler *bch2_xattr_handlers[] =;

static const struct xattr_handler *bch_xattr_handler_map[] =;

static const struct xattr_handler *bch2_xattr_type_to_handler(unsigned type)
{}