summaryrefslogtreecommitdiffstats
path: root/fs/erofs/xattr.h
diff options
context:
space:
mode:
authorJingbo Xu <jefflexu@linux.alibaba.com>2023-04-07 22:17:08 +0800
committerGao Xiang <hsiangkao@linux.alibaba.com>2023-04-17 01:15:52 +0800
commit9e382914617c5cab89a01a223b8d00bbd43ad3b3 (patch)
treeb2c5eb1084e5bbbc5533443bf1bb7f46ac62cc73 /fs/erofs/xattr.h
parentb3bfcb9dbfff3da26a63efc60558acd60b96392a (diff)
downloadlinux-9e382914617c5cab89a01a223b8d00bbd43ad3b3.tar.gz
linux-9e382914617c5cab89a01a223b8d00bbd43ad3b3.tar.bz2
linux-9e382914617c5cab89a01a223b8d00bbd43ad3b3.zip
erofs: add helpers to load long xattr name prefixes
Long xattr name prefixes will be scanned upon mounting and the in-memory long xattr name prefix array will be initialized accordingly. Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com> Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com> Acked-by: Chao Yu <chao@kernel.org> Link: https://lore.kernel.org/r/20230407141710.113882-6-jefflexu@linux.alibaba.com Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Diffstat (limited to 'fs/erofs/xattr.h')
-rw-r--r--fs/erofs/xattr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/erofs/xattr.h b/fs/erofs/xattr.h
index a65158cba14f..e1265351aedd 100644
--- a/fs/erofs/xattr.h
+++ b/fs/erofs/xattr.h
@@ -40,9 +40,13 @@ static inline const struct xattr_handler *erofs_xattr_handler(unsigned int idx)
extern const struct xattr_handler *erofs_xattr_handlers[];
+int erofs_xattr_prefixes_init(struct super_block *sb);
+void erofs_xattr_prefixes_cleanup(struct super_block *sb);
int erofs_getxattr(struct inode *, int, const char *, void *, size_t);
ssize_t erofs_listxattr(struct dentry *, char *, size_t);
#else
+static inline int erofs_xattr_prefixes_init(struct super_block *sb) { return 0; }
+static inline void erofs_xattr_prefixes_cleanup(struct super_block *sb) {}
static inline int erofs_getxattr(struct inode *inode, int index,
const char *name, void *buffer,
size_t buffer_size)