David Sterba | 9888c34 | 2018-04-03 19:16:55 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2007 Red Hat. All rights reserved. |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 4 | */ |
| 5 | |
David Sterba | 9888c34 | 2018-04-03 19:16:55 +0200 | [diff] [blame] | 6 | #ifndef BTRFS_XATTR_H |
| 7 | #define BTRFS_XATTR_H |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 8 | |
| 9 | #include <linux/xattr.h> |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 10 | |
Stephen Hemminger | f01cbd3 | 2010-05-13 17:53:15 -0700 | [diff] [blame] | 11 | extern const struct xattr_handler *btrfs_xattr_handlers[]; |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 12 | |
David Sterba | bcadd70 | 2018-02-27 15:48:57 +0100 | [diff] [blame] | 13 | int btrfs_getxattr(struct inode *inode, const char *name, |
Christoph Hellwig | 95819c0 | 2008-08-28 06:21:17 -0400 | [diff] [blame] | 14 | void *buffer, size_t size); |
Anand Jain | 3e125a7 | 2019-04-12 16:02:56 +0800 | [diff] [blame] | 15 | int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode, |
| 16 | const char *name, const void *value, size_t size, int flags); |
Anand Jain | e3de9b1 | 2019-04-12 16:02:59 +0800 | [diff] [blame] | 17 | int btrfs_setxattr_trans(struct inode *inode, const char *name, |
| 18 | const void *value, size_t size, int flags); |
David Sterba | 738c93d | 2018-02-27 15:48:59 +0100 | [diff] [blame] | 19 | ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size); |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 20 | |
David Sterba | ab0d093 | 2018-02-27 15:48:54 +0100 | [diff] [blame] | 21 | int btrfs_xattr_security_init(struct btrfs_trans_handle *trans, |
Eric Paris | 2a7dba3 | 2011-02-01 11:05:39 -0500 | [diff] [blame] | 22 | struct inode *inode, struct inode *dir, |
| 23 | const struct qstr *qstr); |
Jim Owens | 0279b4c | 2009-02-04 09:29:13 -0500 | [diff] [blame] | 24 | |
David Sterba | 9888c34 | 2018-04-03 19:16:55 +0200 | [diff] [blame] | 25 | #endif |