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_VFS_H_
7 #define XFS_SCRUB_VFS_H_
10 * Visit a subdirectory prior to iterating entries in that subdirectory.
11 * Return 0 to continue iteration or a positive error code to stop iterating
12 * and return to the caller.
14 typedef int (*scan_fs_tree_dir_fn
)(struct scrub_ctx
*, const char *,
18 * Visit each directory entry in a directory. Return 0 to continue iteration
19 * or a positive error code to stop iterating and return to the caller.
21 typedef int (*scan_fs_tree_dirent_fn
)(struct scrub_ctx
*, const char *,
22 int, struct dirent
*, struct stat
*, void *);
24 int scan_fs_tree(struct scrub_ctx
*ctx
, scan_fs_tree_dir_fn dir_fn
,
25 scan_fs_tree_dirent_fn dirent_fn
, void *arg
);
27 void fstrim(struct scrub_ctx
*ctx
);
29 #endif /* XFS_SCRUB_VFS_H_ */