summaryrefslogtreecommitdiff
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.de>2015-04-14 15:43:24 (GMT)
committerNeilBrown <neilb@suse.de>2015-04-21 21:59:39 (GMT)
commitfb56dfef4e31f214cfbfa0eb8a1949591c20b118 (patch)
tree62421135b80e9abc3f2668e38db57a71ead02480 /drivers/md/md.c
parent8c58f02e244d5b35fa38aa308007715d4957d4c7 (diff)
downloadlinux-fb56dfef4e31f214cfbfa0eb8a1949591c20b118.tar.xz
md: Export and rename kick_rdev_from_array
This export is required for clustering module in order to co-ordinate remove/readd a rdev from all nodes. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index eb6f92e..bc1e430 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2168,11 +2168,12 @@ static void export_rdev(struct md_rdev *rdev)
kobject_put(&rdev->kobj);
}
-static void kick_rdev_from_array(struct md_rdev *rdev)
+void md_kick_rdev_from_array(struct md_rdev *rdev)
{
unbind_rdev_from_array(rdev);
export_rdev(rdev);
}
+EXPORT_SYMBOL_GPL(md_kick_rdev_from_array);
static void export_array(struct mddev *mddev)
{
@@ -2181,7 +2182,7 @@ static void export_array(struct mddev *mddev)
while (!list_empty(&mddev->disks)) {
rdev = list_first_entry(&mddev->disks, struct md_rdev,
same_set);
- kick_rdev_from_array(rdev);
+ md_kick_rdev_from_array(rdev);
}
mddev->raid_disks = 0;
mddev->major_version = 0;
@@ -2476,7 +2477,7 @@ state_store(struct md_rdev *rdev, const char *buf, size_t len)
struct mddev *mddev = rdev->mddev;
if (mddev_is_clustered(mddev))
md_cluster_ops->metadata_update_start(mddev);
- kick_rdev_from_array(rdev);
+ md_kick_rdev_from_array(rdev);
if (mddev->pers)
md_update_sb(mddev, 1);
md_new_event(mddev);
@@ -3134,7 +3135,7 @@ static void analyze_sbs(struct mddev *mddev)
"md: fatal superblock inconsistency in %s"
" -- removing from array\n",
bdevname(rdev->bdev,b));
- kick_rdev_from_array(rdev);
+ md_kick_rdev_from_array(rdev);
}
super_types[mddev->major_version].
@@ -3149,7 +3150,7 @@ static void analyze_sbs(struct mddev *mddev)
"md: %s: %s: only %d devices permitted\n",
mdname(mddev), bdevname(rdev->bdev, b),
mddev->max_disks);
- kick_rdev_from_array(rdev);
+ md_kick_rdev_from_array(rdev);
continue;
}
if (rdev != freshest) {
@@ -3158,7 +3159,7 @@ static void analyze_sbs(struct mddev *mddev)
printk(KERN_WARNING "md: kicking non-fresh %s"
" from array!\n",
bdevname(rdev->bdev,b));
- kick_rdev_from_array(rdev);
+ md_kick_rdev_from_array(rdev);
continue;
}
/* No device should have a Candidate flag
@@ -3167,7 +3168,7 @@ static void analyze_sbs(struct mddev *mddev)
if (test_bit(Candidate, &rdev->flags)) {
pr_info("md: kicking Cluster Candidate %s from array!\n",
bdevname(rdev->bdev, b));
- kick_rdev_from_array(rdev);
+ md_kick_rdev_from_array(rdev);
}
}
if (mddev->level == LEVEL_MULTIPATH) {
@@ -5966,7 +5967,7 @@ static int hot_remove_disk(struct mddev *mddev, dev_t dev)
if (rdev->raid_disk >= 0)
goto busy;
- kick_rdev_from_array(rdev);
+ md_kick_rdev_from_array(rdev);
md_update_sb(mddev, 1);
md_new_event(mddev);