]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blame - scrub/descr.h
xfs_scrub: remove moveon from repair action list helpers
[thirdparty/xfsprogs-dev.git] / scrub / descr.h
CommitLineData
b3f76f94
DW
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*
3 * Copyright (C) 2019 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 */
6#ifndef XFS_SCRUB_DESCR_H_
7#define XFS_SCRUB_DESCR_H_
8
9typedef int (*descr_fn)(struct scrub_ctx *ctx, char *buf, size_t buflen,
10 void *data);
11
12struct descr {
13 struct scrub_ctx *ctx;
14 descr_fn fn;
15 void *where;
16};
17
18#define DEFINE_DESCR(_name, _ctx, _fn) \
19 struct descr _name = { .ctx = (_ctx), .fn = (_fn) }
20
21const char *__descr_render(struct descr *dsc, const char *file, int line);
22#define descr_render(dsc) __descr_render((dsc), __FILE__, __LINE__)
23
24void descr_set(struct descr *dsc, void *where);
25
26int descr_init_phase(struct scrub_ctx *ctx, unsigned int nr_threads);
27void descr_end_phase(void);
28
29#endif /* XFS_SCRUB_DESCR_H_ */