xref: /linux/fs/ntfs/ea.h (revision b715537e26684581a1f99b6bd1cc5d43b6d563e1)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef _LINUX_NTFS_EA_H
4 #define _LINUX_NTFS_EA_H
5 
6 #define NTFS_EA_UID	BIT(1)
7 #define NTFS_EA_GID	BIT(2)
8 #define NTFS_EA_MODE	BIT(3)
9 
10 /* $LINUXFLAGS stores these bits in a single little-endian 32-bit value. */
11 #define NTFS_LINUXFLAGS_IMMUTABLE	BIT(0)
12 #define NTFS_LINUXFLAGS_APPEND	BIT(1)
13 #define NTFS_LINUXFLAGS_NODUMP	BIT(2)
14 #define NTFS_LINUXFLAGS_NOATIME	BIT(3)
15 #define NTFS_LINUXFLAGS_MASK	(NTFS_LINUXFLAGS_IMMUTABLE | \
16 				 NTFS_LINUXFLAGS_APPEND | NTFS_LINUXFLAGS_NODUMP | \
17 				 NTFS_LINUXFLAGS_NOATIME)
18 
19 extern const struct xattr_handler *const ntfs_xattr_handlers[];
20 
21 int ntfs_ea_set_wsl_not_symlink(struct ntfs_inode *ni, mode_t mode, dev_t dev);
22 int ntfs_ea_get_wsl_inode(struct inode *inode, dev_t *rdevp, unsigned int flags,
23 			  bool *has_lxmod);
24 int ntfs_ea_set_wsl_inode(struct inode *inode, dev_t rdev, __le16 *ea_size,
25 		unsigned int flags);
26 int ntfs_ea_get_linuxflags(struct inode *inode);
27 int ntfs_ea_set_linuxflags(struct inode *inode, u32 linuxflags);
28 ssize_t ntfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
29 
30 #ifdef CONFIG_NTFS_FS_POSIX_ACL
31 struct posix_acl *ntfs_get_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
32 			       int type);
33 int ntfs_set_acl(const struct mnt_idmap *idmap, struct dentry *dentry,
34 		 struct posix_acl *acl, int type);
35 int ntfs_init_acl(const struct mnt_idmap *idmap, struct inode *inode,
36 		  struct inode *dir);
37 #else
38 #define ntfs_get_acl NULL
39 #define ntfs_set_acl NULL
40 #endif
41 
42 #endif /* _LINUX_NTFS_EA_H */
43