]>
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 */
18 * Visit each inode fork mapping. Return 0 to continue iteration or a positive
19 * error code to stop iterating and return to the caller.
21 typedef int (*scrub_bmap_iter_fn
)(struct scrub_ctx
*ctx
, int fd
, int whichfork
,
22 struct fsxattr
*fsx
, struct file_bmap
*bmap
, void *arg
);
24 int scrub_iterate_filemaps(struct scrub_ctx
*ctx
, int fd
, int whichfork
,
25 struct file_bmap
*key
, scrub_bmap_iter_fn fn
, void *arg
);
27 #endif /* XFS_SCRUB_FILEMAP_H_ */