quota.h 895 B

123456789101112131415161718192021222324252627282930313233343536
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright (C) 2018-2023 Oracle. All Rights Reserved.
  4. * Author: Darrick J. Wong <djwong@kernel.org>
  5. */
  6. #ifndef __XFS_SCRUB_QUOTA_H__
  7. #define __XFS_SCRUB_QUOTA_H__
  8. xfs_dqtype_t xchk_quota_to_dqtype(struct xfs_scrub *sc);
  9. /* dquot iteration code */
  10. struct xchk_dqiter {
  11. struct xfs_scrub *sc;
  12. /* Quota file that we're walking. */
  13. struct xfs_inode *quota_ip;
  14. /* Cached data fork mapping for the dquot. */
  15. struct xfs_bmbt_irec bmap;
  16. /* The next dquot to scan. */
  17. uint64_t id;
  18. /* Quota type (user/group/project). */
  19. xfs_dqtype_t dqtype;
  20. /* Data fork sequence number to detect stale mappings. */
  21. unsigned int if_seq;
  22. };
  23. void xchk_dqiter_init(struct xchk_dqiter *cursor, struct xfs_scrub *sc,
  24. xfs_dqtype_t dqtype);
  25. int xchk_dquot_iter(struct xchk_dqiter *cursor, struct xfs_dquot **dqpp);
  26. #endif /* __XFS_SCRUB_QUOTA_H__ */