Tiger Yang | cf1d6c7 | 2008-08-18 17:11:00 +0800 | [diff] [blame] | 1 | /* -*- mode: c; c-basic-offset: 8; -*- |
| 2 | * vim: noexpandtab sw=8 ts=8 sts=0: |
| 3 | * |
| 4 | * xattr.h |
| 5 | * |
Tiger Yang | c3cb682 | 2008-10-23 16:33:03 +0800 | [diff] [blame] | 6 | * Copyright (C) 2004, 2008 Oracle. All rights reserved. |
Tiger Yang | cf1d6c7 | 2008-08-18 17:11:00 +0800 | [diff] [blame] | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public |
Tiger Yang | c3cb682 | 2008-10-23 16:33:03 +0800 | [diff] [blame] | 10 | * License version 2 as published by the Free Software Foundation. |
Tiger Yang | cf1d6c7 | 2008-08-18 17:11:00 +0800 | [diff] [blame] | 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. |
Tiger Yang | cf1d6c7 | 2008-08-18 17:11:00 +0800 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | #ifndef OCFS2_XATTR_H |
| 19 | #define OCFS2_XATTR_H |
| 20 | |
| 21 | #include <linux/init.h> |
| 22 | #include <linux/xattr.h> |
| 23 | |
| 24 | enum 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 | |
| 33 | extern struct xattr_handler ocfs2_xattr_user_handler; |
| 34 | extern struct xattr_handler ocfs2_xattr_trusted_handler; |
Tiger Yang | cf1d6c7 | 2008-08-18 17:11:00 +0800 | [diff] [blame] | 35 | extern struct xattr_handler *ocfs2_xattr_handlers[]; |
| 36 | |
Tiger Yang | 0030e00 | 2008-10-23 16:33:33 +0800 | [diff] [blame] | 37 | ssize_t ocfs2_listxattr(struct dentry *, char *, size_t); |
| 38 | int ocfs2_xattr_set(struct inode *, int, const char *, const void *, |
| 39 | size_t, int); |
Tiger Yang | 6c3faba | 2008-11-14 11:16:03 +0800 | [diff] [blame^] | 40 | int ocfs2_xattr_set_handle(handle_t *, struct inode *, struct buffer_head *, |
| 41 | int, const char *, const void *, size_t, int, |
| 42 | struct ocfs2_alloc_context *, |
| 43 | struct ocfs2_alloc_context *); |
Tiger Yang | 0030e00 | 2008-10-23 16:33:33 +0800 | [diff] [blame] | 44 | int ocfs2_xattr_remove(struct inode *, struct buffer_head *); |
Tao Ma | 0c044f0 | 2008-08-18 17:38:50 +0800 | [diff] [blame] | 45 | |
Tiger Yang | cf1d6c7 | 2008-08-18 17:11:00 +0800 | [diff] [blame] | 46 | #endif /* OCFS2_XATTR_H */ |