xref: /openbmc/linux/fs/btrfs/xattr.h (revision c39f2d9db0fd81ea20bb5cce9b3f082ca63753e2)
19888c340SDavid Sterba /* SPDX-License-Identifier: GPL-2.0 */
25103e947SJosef Bacik /*
35103e947SJosef Bacik  * Copyright (C) 2007 Red Hat.  All rights reserved.
45103e947SJosef Bacik  */
55103e947SJosef Bacik 
69888c340SDavid Sterba #ifndef BTRFS_XATTR_H
79888c340SDavid Sterba #define BTRFS_XATTR_H
85103e947SJosef Bacik 
95103e947SJosef Bacik #include <linux/xattr.h>
105103e947SJosef Bacik 
11f01cbd3fSStephen Hemminger extern const struct xattr_handler *btrfs_xattr_handlers[];
125103e947SJosef Bacik 
13bcadd705SDavid Sterba int btrfs_getxattr(struct inode *inode, const char *name,
145103e947SJosef Bacik 		void *buffer, size_t size);
153e125a74SAnand Jain int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
163e125a74SAnand Jain 		   const char *name, const void *value, size_t size, int flags);
17*e3de9b15SAnand Jain int btrfs_setxattr_trans(struct inode *inode, const char *name,
185103e947SJosef Bacik 			 const void *value, size_t size, int flags);
19738c93d4SDavid Sterba ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
2095819c05SChristoph Hellwig 
21ab0d0936SDavid Sterba int btrfs_xattr_security_init(struct btrfs_trans_handle *trans,
222a7dba39SEric Paris 				     struct inode *inode, struct inode *dir,
232a7dba39SEric Paris 				     const struct qstr *qstr);
240279b4cdSJim Owens 
259888c340SDavid Sterba #endif
26