]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - scrub/filemap.h
xfsprogs: Release v6.7.0
[thirdparty/xfsprogs-dev.git] / scrub / filemap.h
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3 * Copyright (C) 2018 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 */
6 #ifndef XFS_SCRUB_FILEMAP_H_
7 #define XFS_SCRUB_FILEMAP_H_
8
9 /* inode fork block mapping */
10 struct xfs_bmap {
11 uint64_t bm_offset; /* file offset of segment in bytes */
12 uint64_t bm_physical; /* physical starting byte */
13 uint64_t bm_length; /* length of segment, bytes */
14 uint32_t bm_flags; /* output flags */
15 };
16
17 typedef bool (*xfs_bmap_iter_fn)(struct scrub_ctx *ctx, const char *descr,
18 int fd, int whichfork, struct fsxattr *fsx,
19 struct xfs_bmap *bmap, void *arg);
20
21 bool xfs_iterate_filemaps(struct scrub_ctx *ctx, const char *descr, int fd,
22 int whichfork, struct xfs_bmap *key, xfs_bmap_iter_fn fn,
23 void *arg);
24
25 #endif /* XFS_SCRUB_FILEMAP_H_ */