dm-space-map-metadata.h 731 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (C) 2011 Red Hat, Inc.
  3. *
  4. * This file is released under the GPL.
  5. */
  6. #ifndef DM_SPACE_MAP_METADATA_H
  7. #define DM_SPACE_MAP_METADATA_H
  8. #include "dm-transaction-manager.h"
  9. /*
  10. * Unfortunately we have to use two-phase construction due to the cycle
  11. * between the tm and sm.
  12. */
  13. struct dm_space_map *dm_sm_metadata_init(void);
  14. /*
  15. * Create a fresh space map.
  16. */
  17. int dm_sm_metadata_create(struct dm_space_map *sm,
  18. struct dm_transaction_manager *tm,
  19. dm_block_t nr_blocks,
  20. dm_block_t superblock);
  21. /*
  22. * Open from a previously-recorded root.
  23. */
  24. int dm_sm_metadata_open(struct dm_space_map *sm,
  25. struct dm_transaction_manager *tm,
  26. void *root_le, size_t len);
  27. #endif /* DM_SPACE_MAP_METADATA_H */