mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 07:39:47 +00:00
fa8259da0e
A --cluster-confirm without an --add (by another node) can crash the kernel. Fix it by guarding it using a state. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: NeilBrown <neilb@suse.de>
28 lines
874 B
C
28 lines
874 B
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);
|
|
void (*resync_info_update)(struct mddev *mddev, sector_t lo, sector_t hi);
|
|
int (*resync_start)(struct mddev *mddev, sector_t lo, sector_t hi);
|
|
void (*resync_finish)(struct mddev *mddev);
|
|
int (*metadata_update_start)(struct mddev *mddev);
|
|
int (*metadata_update_finish)(struct mddev *mddev);
|
|
int (*metadata_update_cancel)(struct mddev *mddev);
|
|
int (*area_resyncing)(struct mddev *mddev, sector_t lo, sector_t hi);
|
|
int (*add_new_disk_start)(struct mddev *mddev, struct md_rdev *rdev);
|
|
int (*add_new_disk_finish)(struct mddev *mddev);
|
|
int (*new_disk_ack)(struct mddev *mddev, bool ack);
|
|
};
|
|
|
|
#endif /* _MD_CLUSTER_H */
|