Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 Red Hat. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public |
| 6 | * License v2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 | * General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public |
| 14 | * License along with this program; if not, write to the |
| 15 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 16 | * Boston, MA 021110-1307, USA. |
| 17 | */ |
| 18 | |
| 19 | #ifndef __XATTR__ |
| 20 | #define __XATTR__ |
| 21 | |
| 22 | #include <linux/xattr.h> |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 23 | |
Stephen Hemminger | f01cbd3 | 2010-05-13 17:53:15 -0700 | [diff] [blame] | 24 | extern const struct xattr_handler *btrfs_xattr_handlers[]; |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 25 | |
Christoph Hellwig | 95819c0 | 2008-08-28 06:21:17 -0400 | [diff] [blame] | 26 | extern ssize_t __btrfs_getxattr(struct inode *inode, const char *name, |
| 27 | void *buffer, size_t size); |
Yan, Zheng | f34f57a | 2009-11-12 09:35:27 +0000 | [diff] [blame] | 28 | extern int __btrfs_setxattr(struct btrfs_trans_handle *trans, |
| 29 | struct inode *inode, const char *name, |
| 30 | const void *value, size_t size, int flags); |
Christoph Hellwig | 95819c0 | 2008-08-28 06:21:17 -0400 | [diff] [blame] | 31 | extern ssize_t btrfs_getxattr(struct dentry *dentry, const char *name, |
| 32 | void *buffer, size_t size); |
| 33 | extern int btrfs_setxattr(struct dentry *dentry, const char *name, |
| 34 | const void *value, size_t size, int flags); |
| 35 | extern int btrfs_removexattr(struct dentry *dentry, const char *name); |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 36 | |
Yan, Zheng | f34f57a | 2009-11-12 09:35:27 +0000 | [diff] [blame] | 37 | extern int btrfs_xattr_security_init(struct btrfs_trans_handle *trans, |
Eric Paris | 2a7dba3 | 2011-02-01 11:05:39 -0500 | [diff] [blame] | 38 | struct inode *inode, struct inode *dir, |
| 39 | const struct qstr *qstr); |
Jim Owens | 0279b4c | 2009-02-04 09:29:13 -0500 | [diff] [blame] | 40 | |
Josef Bacik | 5103e94 | 2007-11-16 11:45:54 -0500 | [diff] [blame] | 41 | #endif /* __XATTR__ */ |