ocfs2: add ocfs2_xattr_get_nolock
[deliverable/linux.git] / fs / ocfs2 / xattr.h
CommitLineData
cf1d6c76
TY
1/* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
3 *
4 * xattr.h
5 *
c3cb6827 6 * Copyright (C) 2004, 2008 Oracle. All rights reserved.
cf1d6c76
TY
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
c3cb6827 10 * License version 2 as published by the Free Software Foundation.
cf1d6c76
TY
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
cf1d6c76
TY
16 */
17
18#ifndef OCFS2_XATTR_H
19#define OCFS2_XATTR_H
20
21#include <linux/init.h>
22#include <linux/xattr.h>
23
24enum ocfs2_xattr_type {
25 OCFS2_XATTR_INDEX_USER = 1,
26 OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS,
27 OCFS2_XATTR_INDEX_POSIX_ACL_DEFAULT,
28 OCFS2_XATTR_INDEX_TRUSTED,
29 OCFS2_XATTR_INDEX_SECURITY,
30 OCFS2_XATTR_MAX
31};
32
534eaddd
TY
33struct ocfs2_security_xattr_info {
34 int enable;
35 char *name;
36 void *value;
37 size_t value_len;
38};
39
cf1d6c76
TY
40extern struct xattr_handler ocfs2_xattr_user_handler;
41extern struct xattr_handler ocfs2_xattr_trusted_handler;
923f7f31 42extern struct xattr_handler ocfs2_xattr_security_handler;
cf1d6c76
TY
43extern struct xattr_handler *ocfs2_xattr_handlers[];
44
0030e001 45ssize_t ocfs2_listxattr(struct dentry *, char *, size_t);
4e3e9d02
TY
46int ocfs2_xattr_get_nolock(struct inode *, struct buffer_head *, int,
47 const char *, void *, size_t);
0030e001
TY
48int ocfs2_xattr_set(struct inode *, int, const char *, const void *,
49 size_t, int);
6c3faba4
TY
50int ocfs2_xattr_set_handle(handle_t *, struct inode *, struct buffer_head *,
51 int, const char *, const void *, size_t, int,
52 struct ocfs2_alloc_context *,
53 struct ocfs2_alloc_context *);
0030e001 54int ocfs2_xattr_remove(struct inode *, struct buffer_head *);
534eaddd
TY
55int ocfs2_init_security_get(struct inode *, struct inode *,
56 struct ocfs2_security_xattr_info *);
57int ocfs2_init_security_set(handle_t *, struct inode *,
58 struct buffer_head *,
59 struct ocfs2_security_xattr_info *,
60 struct ocfs2_alloc_context *,
61 struct ocfs2_alloc_context *);
62int ocfs2_calc_security_init(struct inode *,
63 struct ocfs2_security_xattr_info *,
64 int *, int *, struct ocfs2_alloc_context **);
01225596 65
cf1d6c76 66#endif /* OCFS2_XATTR_H */
This page took 0.096509 seconds and 5 git commands to generate.