blob: 1cd3fc0a8f178fa28c947c19cf3085e2ff87fe4d [file] [log] [blame]
David Sterba9888c342018-04-03 19:16:55 +02001/* SPDX-License-Identifier: GPL-2.0 */
Josef Bacik5103e942007-11-16 11:45:54 -05002/*
3 * Copyright (C) 2007 Red Hat. All rights reserved.
Josef Bacik5103e942007-11-16 11:45:54 -05004 */
5
David Sterba9888c342018-04-03 19:16:55 +02006#ifndef BTRFS_XATTR_H
7#define BTRFS_XATTR_H
Josef Bacik5103e942007-11-16 11:45:54 -05008
9#include <linux/xattr.h>
Josef Bacik5103e942007-11-16 11:45:54 -050010
Stephen Hemmingerf01cbd32010-05-13 17:53:15 -070011extern const struct xattr_handler *btrfs_xattr_handlers[];
Josef Bacik5103e942007-11-16 11:45:54 -050012
David Sterbabcadd702018-02-27 15:48:57 +010013int btrfs_getxattr(struct inode *inode, const char *name,
Christoph Hellwig95819c02008-08-28 06:21:17 -040014 void *buffer, size_t size);
Anand Jain3e125a72019-04-12 16:02:56 +080015int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
16 const char *name, const void *value, size_t size, int flags);
Anand Jaine3de9b12019-04-12 16:02:59 +080017int btrfs_setxattr_trans(struct inode *inode, const char *name,
18 const void *value, size_t size, int flags);
David Sterba738c93d2018-02-27 15:48:59 +010019ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
Josef Bacik5103e942007-11-16 11:45:54 -050020
David Sterbaab0d0932018-02-27 15:48:54 +010021int btrfs_xattr_security_init(struct btrfs_trans_handle *trans,
Eric Paris2a7dba32011-02-01 11:05:39 -050022 struct inode *inode, struct inode *dir,
23 const struct qstr *qstr);
Jim Owens0279b4c2009-02-04 09:29:13 -050024
David Sterba9888c342018-04-03 19:16:55 +020025#endif