Add Linux compatibility header stubs needed to compile extents_status.c: - backing-dev.h: Backing device info stub - dax.h: Direct Access (DAX) stubs - iomap.h: I/O mapping operations and structures - mman.h: Memory mapping flags - mount.h: VFS mount structures - pagevec.h: Page vector batching - pfn_t.h: Page frame number type - posix_acl_xattr.h: POSIX ACL xattr definitions - proc_fs.h: Proc filesystem stub - uio.h: User I/O vector definitions - xattr.h: Extended attributes - trace/events/ext4.h: Trace event stubs Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
58 lines
1.4 KiB
C
58 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
File: linux/xattr.h
|
|
|
|
Extended attributes handling.
|
|
|
|
Copyright (C) 2001 by Andreas Gruenbacher <a.gruenbacher@computer.org>
|
|
Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
|
|
Copyright (c) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com>
|
|
*/
|
|
|
|
#ifndef _LINUX_XATTR_H
|
|
#define _LINUX_XATTR_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
/* XATTR namespace prefixes */
|
|
#define XATTR_USER_PREFIX "user."
|
|
#define XATTR_USER_PREFIX_LEN 5
|
|
|
|
#define XATTR_TRUSTED_PREFIX "trusted."
|
|
#define XATTR_TRUSTED_PREFIX_LEN 8
|
|
|
|
#define XATTR_SECURITY_PREFIX "security."
|
|
#define XATTR_SECURITY_PREFIX_LEN 9
|
|
|
|
#define XATTR_SYSTEM_PREFIX "system."
|
|
#define XATTR_SYSTEM_PREFIX_LEN 7
|
|
|
|
/* Maximum size of an xattr value */
|
|
#define XATTR_SIZE_MAX 65536
|
|
|
|
/* Maximum length of an xattr name */
|
|
#define XATTR_NAME_MAX 255
|
|
|
|
/* Maximum size of a listxattr buffer */
|
|
#define XATTR_LIST_MAX 65536
|
|
|
|
struct xattr_handler {
|
|
const char *name;
|
|
const char *prefix;
|
|
int flags;
|
|
bool (*list)(struct dentry *dentry);
|
|
int (*get)(const struct xattr_handler *handler,
|
|
struct dentry *dentry, struct inode *inode,
|
|
const char *name, void *buffer, size_t size);
|
|
int (*set)(const struct xattr_handler *handler,
|
|
struct mnt_idmap *idmap, struct dentry *dentry,
|
|
struct inode *inode, const char *name, const void *value,
|
|
size_t size, int flags);
|
|
};
|
|
|
|
/* Common flags */
|
|
#define XATTR_CREATE 0x1
|
|
#define XATTR_REPLACE 0x2
|
|
|
|
#endif /* _LINUX_XATTR_H */
|