brintos

brintos / linux-shallow public Read only

0
0
Text · 911 B · 40b462c Raw
38 lines · c
1// SPDX-License-Identifier: GPL-2.0-or-later2/*3 * Copyright (C) 2018-2023 Oracle.  All Rights Reserved.4 * Author: Darrick J. Wong <djwong@kernel.org>5 */6#ifndef __XFS_SCRUB_FSB_BITMAP_H__7#define __XFS_SCRUB_FSB_BITMAP_H__8 9/* Bitmaps, but for type-checked for xfs_fsblock_t */10 11struct xfsb_bitmap {12	struct xbitmap64	fsbitmap;13};14 15static inline void xfsb_bitmap_init(struct xfsb_bitmap *bitmap)16{17	xbitmap64_init(&bitmap->fsbitmap);18}19 20static inline void xfsb_bitmap_destroy(struct xfsb_bitmap *bitmap)21{22	xbitmap64_destroy(&bitmap->fsbitmap);23}24 25static inline int xfsb_bitmap_set(struct xfsb_bitmap *bitmap,26		xfs_fsblock_t start, xfs_filblks_t len)27{28	return xbitmap64_set(&bitmap->fsbitmap, start, len);29}30 31static inline int xfsb_bitmap_walk(struct xfsb_bitmap *bitmap,32		xbitmap64_walk_fn fn, void *priv)33{34	return xbitmap64_walk(&bitmap->fsbitmap, fn, priv);35}36 37#endif	/* __XFS_SCRUB_FSB_BITMAP_H__ */38