md-cluster.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _MD_CLUSTER_H
  3. #define _MD_CLUSTER_H
  4. #include "md.h"
  5. struct mddev;
  6. struct md_rdev;
  7. struct md_cluster_operations {
  8. int (*join)(struct mddev *mddev, int nodes);
  9. int (*leave)(struct mddev *mddev);
  10. int (*slot_number)(struct mddev *mddev);
  11. int (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi);
  12. void (*resync_info_get)(struct mddev *mddev, sector_t *lo, sector_t *hi);
  13. int (*metadata_update_start)(struct mddev *mddev);
  14. int (*metadata_update_finish)(struct mddev *mddev);
  15. void (*metadata_update_cancel)(struct mddev *mddev);
  16. int (*resync_start)(struct mddev *mddev);
  17. int (*resync_finish)(struct mddev *mddev);
  18. int (*area_resyncing)(struct mddev *mddev, int direction, sector_t lo, sector_t hi);
  19. int (*add_new_disk)(struct mddev *mddev, struct md_rdev *rdev);
  20. void (*add_new_disk_cancel)(struct mddev *mddev);
  21. int (*new_disk_ack)(struct mddev *mddev, bool ack);
  22. int (*remove_disk)(struct mddev *mddev, struct md_rdev *rdev);
  23. void (*load_bitmaps)(struct mddev *mddev, int total_slots);
  24. int (*gather_bitmaps)(struct md_rdev *rdev);
  25. int (*resize_bitmaps)(struct mddev *mddev, sector_t newsize, sector_t oldsize);
  26. int (*lock_all_bitmaps)(struct mddev *mddev);
  27. void (*unlock_all_bitmaps)(struct mddev *mddev);
  28. void (*update_size)(struct mddev *mddev, sector_t old_dev_sectors);
  29. };
  30. #endif /* _MD_CLUSTER_H */