]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - scrub/filemap.h
1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
6 #ifndef XFS_SCRUB_FILEMAP_H_
7 #define XFS_SCRUB_FILEMAP_H_
9 /* inode fork block mapping */
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 */
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
);
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
,
25 #endif /* XFS_SCRUB_FILEMAP_H_ */