#include <linux/hashtable.h>
#include <linux/xattr.h>
#include "messages.h"
#include "props.h"
#include "btrfs_inode.h"
#include "transaction.h"
#include "ctree.h"
#include "xattr.h"
#include "compression.h"
#include "space-info.h"
#include "fs.h"
#include "accessors.h"
#include "super.h"
#include "dir-item.h"
#define BTRFS_PROP_HANDLERS_HT_BITS …
static DEFINE_HASHTABLE(prop_handlers_ht, BTRFS_PROP_HANDLERS_HT_BITS);
struct prop_handler { … };
static const struct hlist_head *find_prop_handlers_by_hash(const u64 hash)
{ … }
static const struct prop_handler *
find_prop_handler(const char *name,
const struct hlist_head *handlers)
{ … }
int btrfs_validate_prop(const struct btrfs_inode *inode, const char *name,
const char *value, size_t value_len)
{ … }
bool btrfs_ignore_prop(const struct btrfs_inode *inode, const char *name)
{ … }
int btrfs_set_prop(struct btrfs_trans_handle *trans, struct btrfs_inode *inode,
const char *name, const char *value, size_t value_len,
int flags)
{ … }
static int iterate_object_props(struct btrfs_root *root,
struct btrfs_path *path,
u64 objectid,
void (*iterator)(void *,
const struct prop_handler *,
const char *,
size_t),
void *ctx)
{ … }
static void inode_prop_iterator(void *ctx,
const struct prop_handler *handler,
const char *value,
size_t len)
{ … }
int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path)
{ … }
static int prop_compression_validate(const struct btrfs_inode *inode,
const char *value, size_t len)
{ … }
static int prop_compression_apply(struct inode *inode, const char *value,
size_t len)
{ … }
static bool prop_compression_ignore(const struct btrfs_inode *inode)
{ … }
static const char *prop_compression_extract(const struct inode *inode)
{ … }
static struct prop_handler prop_handlers[] = …;
int btrfs_inode_inherit_props(struct btrfs_trans_handle *trans,
struct inode *inode, const struct inode *parent)
{ … }
int __init btrfs_props_init(void)
{ … }