]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - scrub/descr.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2019-2023 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <djwong@kernel.org>
6 #ifndef XFS_SCRUB_DESCR_H_
7 #define XFS_SCRUB_DESCR_H_
9 typedef int (*descr_fn
)(struct scrub_ctx
*ctx
, char *buf
, size_t buflen
,
13 struct scrub_ctx
*ctx
;
18 #define DEFINE_DESCR(_name, _ctx, _fn) \
19 struct descr _name = { .ctx = (_ctx), .fn = (_fn) }
21 const char *__descr_render(struct descr
*dsc
, const char *file
, int line
);
22 #define descr_render(dsc) __descr_render((dsc), __FILE__, __LINE__)
24 void descr_set(struct descr
*dsc
, void *where
);
26 int descr_init_phase(struct scrub_ctx
*ctx
, unsigned int nr_threads
);
27 void descr_end_phase(void);
29 #endif /* XFS_SCRUB_DESCR_H_ */