2014-03-29 15:01:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef _MD_CLUSTER_H
|
|
|
|
#define _MD_CLUSTER_H
|
|
|
|
|
|
|
|
#include "md.h"
|
|
|
|
|
|
|
|
struct mddev;
|
2014-10-29 23:51:31 +00:00
|
|
|
struct md_rdev;
|
2014-03-29 15:01:53 +00:00
|
|
|
|
|
|
|
struct md_cluster_operations {
|
2014-03-30 05:42:49 +00:00
|
|
|
int (*join)(struct mddev *mddev, int nodes);
|
2014-03-29 15:01:53 +00:00
|
|
|
int (*leave)(struct mddev *mddev);
|
2014-03-30 05:42:49 +00:00
|
|
|
int (*slot_number)(struct mddev *mddev);
|
2015-08-18 22:14:42 +00:00
|
|
|
int (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi);
|
2014-06-07 06:44:51 +00:00
|
|
|
int (*metadata_update_start)(struct mddev *mddev);
|
|
|
|
int (*metadata_update_finish)(struct mddev *mddev);
|
2015-10-01 18:20:27 +00:00
|
|
|
void (*metadata_update_cancel)(struct mddev *mddev);
|
2015-09-30 18:20:35 +00:00
|
|
|
int (*resync_start)(struct mddev *mddev);
|
|
|
|
int (*resync_finish)(struct mddev *mddev);
|
2015-06-24 14:30:32 +00:00
|
|
|
int (*area_resyncing)(struct mddev *mddev, int direction, sector_t lo, sector_t hi);
|
2015-10-01 18:20:27 +00:00
|
|
|
int (*add_new_disk)(struct mddev *mddev, struct md_rdev *rdev);
|
|
|
|
void (*add_new_disk_cancel)(struct mddev *mddev);
|
2015-03-02 16:55:49 +00:00
|
|
|
int (*new_disk_ack)(struct mddev *mddev, bool ack);
|
2015-04-14 15:44:44 +00:00
|
|
|
int (*remove_disk)(struct mddev *mddev, struct md_rdev *rdev);
|
2016-05-04 06:17:09 +00:00
|
|
|
void (*load_bitmaps)(struct mddev *mddev, int total_slots);
|
2015-04-14 15:45:42 +00:00
|
|
|
int (*gather_bitmaps)(struct md_rdev *rdev);
|
2015-12-20 23:51:00 +00:00
|
|
|
int (*lock_all_bitmaps)(struct mddev *mddev);
|
|
|
|
void (*unlock_all_bitmaps)(struct mddev *mddev);
|
2017-03-01 08:42:40 +00:00
|
|
|
void (*update_size)(struct mddev *mddev, sector_t old_dev_sectors);
|
2014-03-29 15:01:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _MD_CLUSTER_H */
|