]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - scrub/unicrash.h
xfs_scrub: don't use statvfs to collect filesystem summary counts
[thirdparty/xfsprogs-dev.git] / scrub / unicrash.h
CommitLineData
959ef981 1// SPDX-License-Identifier: GPL-2.0+
4bbed4ec
DW
2/*
3 * Copyright (C) 2018 Oracle. All Rights Reserved.
4bbed4ec 4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
4bbed4ec
DW
5 */
6#ifndef XFS_SCRUB_UNICRASH_H_
7#define XFS_SCRUB_UNICRASH_H_
8
9struct unicrash;
10
11/* Unicode name collision detection. */
bff5d1a4 12#ifdef HAVE_LIBICU
4bbed4ec
DW
13
14struct dirent;
15
ac1c1f8e 16int unicrash_dir_init(struct unicrash **ucp, struct scrub_ctx *ctx,
4cca629d 17 struct xfs_bulkstat *bstat);
ac1c1f8e 18int unicrash_xattr_init(struct unicrash **ucp, struct scrub_ctx *ctx,
4cca629d 19 struct xfs_bulkstat *bstat);
ac1c1f8e 20int unicrash_fs_label_init(struct unicrash **ucp, struct scrub_ctx *ctx);
4bbed4ec 21void unicrash_free(struct unicrash *uc);
ac1c1f8e 22int unicrash_check_dir_name(struct unicrash *uc, struct descr *dsc,
4bbed4ec 23 struct dirent *dirent);
ac1c1f8e 24int unicrash_check_xattr_name(struct unicrash *uc, struct descr *dsc,
4bbed4ec 25 const char *attrname);
ac1c1f8e 26int unicrash_check_fs_label(struct unicrash *uc, struct descr *dsc,
3baa69cd 27 const char *label);
4bbed4ec 28#else
ac1c1f8e
DW
29# define unicrash_dir_init(u, c, b) (0)
30# define unicrash_xattr_init(u, c, b) (0)
31# define unicrash_fs_label_init(u, c) (0)
4bbed4ec 32# define unicrash_free(u) do {(u) = (u);} while (0)
ac1c1f8e
DW
33# define unicrash_check_dir_name(u, d, n) (0)
34# define unicrash_check_xattr_name(u, d, n) (0)
35# define unicrash_check_fs_label(u, d, n) (0)
bff5d1a4 36#endif /* HAVE_LIBICU */
4bbed4ec
DW
37
38#endif /* XFS_SCRUB_UNICRASH_H_ */