diff options
author | NeilBrown <neilb@suse.de> | 2012-08-15 01:51:20 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-08-15 01:51:20 +0200 |
commit | 9cf9a1de36ca37dfc447caf35fbe87967709c40c (patch) | |
tree | 244aa2eb86a9aaf0e912c84e7a0726e7026940c3 /Manage.c | |
parent | Manage.c: fix make everything compilation error (diff) | |
download | mdadm-9cf9a1de36ca37dfc447caf35fbe87967709c40c.tar.xz mdadm-9cf9a1de36ca37dfc447caf35fbe87967709c40c.zip |
Manage: zero metadata before adding to 'external' array.
'external' arrays don't support --re-add yet so old metadata is no
value, and 'ddf' gets confusing in mdmon if old metadata is found.
So for now, zero out any old metadata found before adding a spare to
an externally-managed array.
Reported-by: Albert Pauw <albert.pauw@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to '')
-rw-r--r-- | Manage.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -786,6 +786,7 @@ int Manage_add(int fd, int tfd, struct mddev_dev *dv, return -1; } + Kill(dv->devname, NULL, 0, -1, 0); dfd = dev_open(dv->devname, O_RDWR | O_EXCL|O_DIRECT); if (mdmon_running(tst->container_dev)) tst->update_tail = &tst->updates; |