mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 01:57:06 +07:00
f6a2dc64ee
For clustered raid, we need to do extra actions when change bitmap to none. 1. check if all the bitmap lock could be get or not, if yes then we can continue the change since cluster raid is only active in current node. Otherwise return fail and unlock the related bitmap locks 2. set nodes to 0 and then leave cluster environment. 3. release other nodes's bitmap lock. Signed-off-by: Guoqing Jiang <gqjiang@suse.com> Signed-off-by: NeilBrown <neilb@suse.com>
32 lines
1.0 KiB
C
32 lines
1.0 KiB
C
|
|
|
|
#ifndef _MD_CLUSTER_H
|
|
#define _MD_CLUSTER_H
|
|
|
|
#include "md.h"
|
|
|
|
struct mddev;
|
|
struct md_rdev;
|
|
|
|
struct md_cluster_operations {
|
|
int (*join)(struct mddev *mddev, int nodes);
|
|
int (*leave)(struct mddev *mddev);
|
|
int (*slot_number)(struct mddev *mddev);
|
|
int (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi);
|
|
int (*metadata_update_start)(struct mddev *mddev);
|
|
int (*metadata_update_finish)(struct mddev *mddev);
|
|
void (*metadata_update_cancel)(struct mddev *mddev);
|
|
int (*resync_start)(struct mddev *mddev);
|
|
int (*resync_finish)(struct mddev *mddev);
|
|
int (*area_resyncing)(struct mddev *mddev, int direction, sector_t lo, sector_t hi);
|
|
int (*add_new_disk)(struct mddev *mddev, struct md_rdev *rdev);
|
|
void (*add_new_disk_cancel)(struct mddev *mddev);
|
|
int (*new_disk_ack)(struct mddev *mddev, bool ack);
|
|
int (*remove_disk)(struct mddev *mddev, struct md_rdev *rdev);
|
|
int (*gather_bitmaps)(struct md_rdev *rdev);
|
|
int (*lock_all_bitmaps)(struct mddev *mddev);
|
|
void (*unlock_all_bitmaps)(struct mddev *mddev);
|
|
};
|
|
|
|
#endif /* _MD_CLUSTER_H */
|