summaryrefslogtreecommitdiff
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-12-23 09:56:55 +1100
committerNeilBrown <neilb@suse.de>2011-12-23 09:56:55 +1100
commit09cd9270ea52e0f9851528e8ed028073f96b3c34 (patch)
tree8cfb20f05531dc1e83c7d295e6b59dd692bdf99d /drivers/md/linear.c
parent5d8c71f9e5fbdd95650be00294d238e27a363b5c (diff)
downloadlwn-09cd9270ea52e0f9851528e8ed028073f96b3c34.tar.gz
lwn-09cd9270ea52e0f9851528e8ed028073f96b3c34.zip
md/linear: fix hot-add of devices to linear arrays.
commit d70ed2e4fafdbef0800e73942482bb075c21578b broke hot-add to a linear array. After that commit, metadata if not written to devices until they have been fully integrated into the array as determined by saved_raid_disk. That patch arranged to clear that field after a recovery completed. However for linear arrays, there is no recovery - the integration is instantaneous. So we need to explicitly clear the saved_raid_disk field. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r--drivers/md/linear.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index c3273efd08cb..627456542fb3 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -230,6 +230,7 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)
return -EINVAL;
rdev->raid_disk = rdev->saved_raid_disk;
+ rdev->saved_raid_disk = -1;
newconf = linear_conf(mddev,mddev->raid_disks+1);