Add node recovery callbacks

DLM offers callbacks when a node fails and the lock remastery
is performed:

1. recover_prep: called when DLM discovers a node is down
2. recover_slot: called when DLM identifies the node and recovery
		can start
3. recover_done: called when all nodes have completed recover_slot

recover_slot() and recover_done() are also called when the node joins
initially in order to inform the node with its slot number. These slot
numbers start from one, so we deduct one to make it start with zero
which the cluster-md code uses.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
This commit is contained in:
Goldwyn Rodrigues
2014-03-30 00:42:49 -05:00
parent ca8895d9bb
commit cf921cc19c
6 changed files with 64 additions and 9 deletions

View File

@@ -7277,7 +7277,7 @@ int md_setup_cluster(struct mddev *mddev, int nodes)
}
spin_unlock(&pers_lock);
return md_cluster_ops->join(mddev);
return md_cluster_ops->join(mddev, nodes);
}
void md_cluster_stop(struct mddev *mddev)