Whamcloud - gitweb
- make HEAD from b_post_cmd3
[fs/lustre-release.git] / lustre / include / linux / lustre_acl.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  *
4  *   This file is part of Lustre, http://www.lustre.org
5  *
6  * MDS data structures.
7  * See also lustre_idl.h for wire formats of requests.
8  */
9
10 #ifndef _LUSTRE_ACL_H
11 #define _LUSTRE_ACL_H
12
13 #ifdef __KERNEL__
14 # include <linux/fs.h>
15 # include <linux/dcache.h>
16 # ifdef CONFIG_FS_POSIX_ACL
17 # include <linux/xattr_acl.h>
18 # endif
19 #endif
20
21 /* ACL */
22 #ifdef CONFIG_FS_POSIX_ACL
23 #ifdef HAVE_XATTR_ACL
24 #  define MDS_XATTR_NAME_ACL_ACCESS XATTR_NAME_ACL_ACCESS
25 #  define mds_xattr_acl_size(entry) xattr_acl_size(entry)
26 # else
27 #  define MDS_XATTR_NAME_ACL_ACCESS POSIX_ACL_XATTR_ACCESS
28 #  define mds_xattr_acl_size(entry) posix_acl_xattr_size(entry)
29 # endif
30 # define LUSTRE_POSIX_ACL_MAX_ENTRIES   (32)
31 # define LUSTRE_POSIX_ACL_MAX_SIZE              \
32                 (sizeof(xattr_acl_header) +     \
33                 LUSTRE_POSIX_ACL_MAX_ENTRIES *  \
34                 sizeof(xattr_acl_entry))
35 #else
36 # define LUSTRE_POSIX_ACL_MAX_SIZE      0
37 #endif
38
39 #endif