52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (C) 2017-2018 HUAWEI, Inc.
|
|
* https://www.huawei.com/
|
|
*/
|
|
#ifndef _FS_EROFS_XATTR_H_
|
|
#define _FS_EROFS_XATTR_H_
|
|
|
|
#if WITH_EROFS_XATTR && WITH_EROFS_POSIX_ACL
|
|
#include <sys/acl.h>
|
|
#endif
|
|
|
|
#include "internal.h"
|
|
|
|
#if WITH_EROFS_XATTR
|
|
int erofs_xattr_prefixes_init(struct erofs_sb_info *sbi);
|
|
void erofs_xattr_prefixes_cleanup(struct erofs_sb_info *sbi);
|
|
int erofs_listxattr(struct vnode *vp, int attrnamespace, struct uio *uio,
|
|
size_t *sizep);
|
|
int erofs_getxattr(struct vnode *vp, int attrnamespace, const char *name,
|
|
struct uio *uio, size_t *sizep);
|
|
#if WITH_EROFS_POSIX_ACL
|
|
int erofs_get_acl(struct vnode *vp, acl_type_t type, struct acl *aclp);
|
|
#endif
|
|
void erofs_xattr_cache_init(struct erofs_inode *vi);
|
|
void erofs_xattr_cache_fini(struct erofs_sb_info *sbi,
|
|
struct erofs_inode *vi);
|
|
#else
|
|
static inline int
|
|
erofs_xattr_prefixes_init(struct erofs_sb_info *sbi __unused)
|
|
{
|
|
return (0);
|
|
}
|
|
|
|
static inline void
|
|
erofs_xattr_prefixes_cleanup(struct erofs_sb_info *sbi __unused)
|
|
{
|
|
}
|
|
|
|
static inline void
|
|
erofs_xattr_cache_init(struct erofs_inode *vi __unused)
|
|
{
|
|
}
|
|
|
|
static inline void
|
|
erofs_xattr_cache_fini(struct erofs_sb_info *sbi __unused,
|
|
struct erofs_inode *vi __unused)
|
|
{
|
|
}
|
|
#endif
|
|
#endif
|