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); |
David Sterba | ab0d093 | 2018-02-27 15:48:54 +0100 | [diff] [blame] | 15 | int btrfs_setxattr(struct btrfs_trans_handle *trans, |
Yan, Zheng | f34f57a | 2009-11-12 09:35:27 +0000 | [diff] [blame] | 16 | struct inode *inode, const char *name, |
| 17 | const void *value, size_t size, int flags); |
David Sterba | 738c93d | 2018-02-27 15:48:59 +0100 | [diff] [blame] | 18 | ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size); |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 19 | |
David Sterba | ab0d093 | 2018-02-27 15:48:54 +0100 | [diff] [blame] | 20 | int btrfs_xattr_security_init(struct btrfs_trans_handle *trans, |
Eric Paris | 2a7dba3 | 2011-02-01 11:05:39 -0500 | [diff] [blame] | 21 | struct inode *inode, struct inode *dir, |
| 22 | const struct qstr *qstr); |
Jim Owens | 0279b4c | 2009-02-04 09:29:13 -0500 | [diff] [blame] | 23 | |
David Sterba | 9888c34 | 2018-04-03 19:16:55 +0200 | [diff] [blame] | 24 | #endif |