rcbag.h 862 B

12345678910111213141516171819202122232425262728
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright (c) 2022-2024 Oracle. All Rights Reserved.
  4. * Author: Darrick J. Wong <djwong@kernel.org>
  5. */
  6. #ifndef __XFS_SCRUB_RCBAG_H__
  7. #define __XFS_SCRUB_RCBAG_H__
  8. struct xfs_mount;
  9. struct rcbag;
  10. struct xfs_buftarg;
  11. int rcbag_init(struct xfs_mount *mp, struct xfs_buftarg *btp,
  12. struct rcbag **bagp);
  13. void rcbag_free(struct rcbag **bagp);
  14. int rcbag_add(struct rcbag *bag, struct xfs_trans *tp,
  15. const struct xfs_rmap_irec *rmap);
  16. uint64_t rcbag_count(const struct rcbag *bag);
  17. int rcbag_next_edge(struct rcbag *bag, struct xfs_trans *tp,
  18. const struct xfs_rmap_irec *next_rmap, bool next_valid,
  19. uint32_t *next_bnop);
  20. int rcbag_remove_ending_at(struct rcbag *bag, struct xfs_trans *tp,
  21. uint32_t next_bno);
  22. void rcbag_dump(struct rcbag *bag, struct xfs_trans *tp);
  23. #endif /* __XFS_SCRUB_RCBAG_H__ */