Whamcloud - gitweb
0583ea48f369f9227f947626b560ad951f1d0c7f
[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 #  ifdef HAVE_XATTR_ACL
18 #   include <linux/xattr_acl.h>
19 #  endif
20 #  ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
21 #   include <linux/posix_acl_xattr.h>
22 #  endif
23 # endif
24 # ifndef HAVE_VFS_INTENT_PATCHES
25 #  include <linux/lustre_intent.h>
26 # endif
27 #endif
28
29 /* ACL */
30 #ifdef CONFIG_FS_POSIX_ACL
31 # ifdef HAVE_XATTR_ACL
32 #  define MDS_XATTR_NAME_ACL_ACCESS XATTR_NAME_ACL_ACCESS
33 #  define mds_xattr_acl_size(entry) xattr_acl_size(entry)
34 # else /* HAVE_XATTR_ACL */
35 #  ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
36 #   define MDS_XATTR_NAME_ACL_ACCESS POSIX_ACL_XATTR_ACCESS
37 #   define mds_xattr_acl_size(entry) posix_acl_xattr_size(entry)
38 #  endif /* HAVE_LINUX_POSIX_ACL_XATTR_H */
39 # endif /* HAVE_XATTR_ACL */
40
41 # define LUSTRE_POSIX_ACL_MAX_ENTRIES   (32)
42
43 # define LUSTRE_POSIX_ACL_MAX_SIZE   XATTR_ACL_SIZE
44
45 #else /* CONFIG_FS_POSIX_ACL */
46 # define LUSTRE_POSIX_ACL_MAX_SIZE      0
47 #endif /* CONFIG_FS_POSIX_ACL */
48
49 #endif /* _LUSTRE_ACL_H */