md-cluster.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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. int (*metadata_update_start)(struct mddev *mddev);
  13. int (*metadata_update_finish)(struct mddev *mddev);
  14. void (*metadata_update_cancel)(struct mddev *mddev);
  15. int (*resync_start)(struct mddev *mddev);
  16. int (*resync_finish)(struct mddev *mddev);
  17. int (*area_resyncing)(struct mddev *mddev, int direction, sector_t lo, sector_t hi);
  18. int (*add_new_disk)(struct mddev *mddev, struct md_rdev *rdev);
  19. void (*add_new_disk_cancel)(struct mddev *mddev);
  20. int (*new_disk_ack)(struct mddev *mddev, bool ack);
  21. int (*remove_disk)(struct mddev *mddev, struct md_rdev *rdev);
  22. void (*load_bitmaps)(struct mddev *mddev, int total_slots);
  23. int (*gather_bitmaps)(struct md_rdev *rdev);
  24. int (*lock_all_bitmaps)(struct mddev *mddev);
  25. void (*unlock_all_bitmaps)(struct mddev *mddev);
  26. void (*update_size)(struct mddev *mddev, sector_t old_dev_sectors);
  27. };
  28. #endif /* _MD_CLUSTER_H */