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