blob: 6817ee00e053d7d7e74b734185414c0cb3b18a38 [file] [log] [blame]
Goldwyn Rodriguesedb39c92014-03-29 10:01:53 -05001
2
3#ifndef _MD_CLUSTER_H
4#define _MD_CLUSTER_H
5
6#include "md.h"
7
8struct mddev;
Goldwyn Rodrigues1aee41f2014-10-29 18:51:31 -05009struct md_rdev;
Goldwyn Rodriguesedb39c92014-03-29 10:01:53 -050010
11struct md_cluster_operations {
Goldwyn Rodriguescf921cc2014-03-30 00:42:49 -050012 int (*join)(struct mddev *mddev, int nodes);
Goldwyn Rodriguesedb39c92014-03-29 10:01:53 -050013 int (*leave)(struct mddev *mddev);
Goldwyn Rodriguescf921cc2014-03-30 00:42:49 -050014 int (*slot_number)(struct mddev *mddev);
Goldwyn Rodrigues96ae9232014-06-06 12:35:34 -050015 void (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi);
Goldwyn Rodrigues965400e2014-06-07 02:16:58 -050016 int (*resync_start)(struct mddev *mddev, sector_t lo, sector_t hi);
17 void (*resync_finish)(struct mddev *mddev);
Goldwyn Rodrigues293467a2014-06-07 01:44:51 -050018 int (*metadata_update_start)(struct mddev *mddev);
19 int (*metadata_update_finish)(struct mddev *mddev);
20 int (*metadata_update_cancel)(struct mddev *mddev);
Goldwyn Rodrigues589a1c42014-06-07 02:39:37 -050021 int (*area_resyncing)(struct mddev *mddev, sector_t lo, sector_t hi);
Goldwyn Rodrigues1aee41f2014-10-29 18:51:31 -050022 int (*add_new_disk_start)(struct mddev *mddev, struct md_rdev *rdev);
23 int (*add_new_disk_finish)(struct mddev *mddev);
Goldwyn Rodriguesfa8259d2015-03-02 10:55:49 -060024 int (*new_disk_ack)(struct mddev *mddev, bool ack);
Goldwyn Rodrigues88bcfef2015-04-14 10:44:44 -050025 int (*remove_disk)(struct mddev *mddev, struct md_rdev *rdev);
Goldwyn Rodrigues97f6cd32015-04-14 10:45:42 -050026 int (*gather_bitmaps)(struct md_rdev *rdev);
Goldwyn Rodriguesedb39c92014-03-29 10:01:53 -050027};
28
29#endif /* _MD_CLUSTER_H */