readdir.h 743 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) 2022-2023 Oracle. All Rights Reserved.
  4. * Author: Darrick J. Wong <djwong@kernel.org>
  5. */
  6. #ifndef __XFS_SCRUB_READDIR_H__
  7. #define __XFS_SCRUB_READDIR_H__
  8. typedef int (*xchk_dirent_fn)(struct xfs_scrub *sc, struct xfs_inode *dp,
  9. xfs_dir2_dataptr_t dapos, const struct xfs_name *name,
  10. xfs_ino_t ino, void *priv);
  11. int xchk_dir_walk(struct xfs_scrub *sc, struct xfs_inode *dp,
  12. xchk_dirent_fn dirent_fn, void *priv);
  13. int xchk_dir_lookup(struct xfs_scrub *sc, struct xfs_inode *dp,
  14. const struct xfs_name *name, xfs_ino_t *ino);
  15. int xchk_dir_trylock_for_pptrs(struct xfs_scrub *sc, struct xfs_inode *ip,
  16. unsigned int *lockmode);
  17. #endif /* __XFS_SCRUB_READDIR_H__ */