md-cluster.h 1.1 KB

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