71165988bf
Resolves: bz807743 (f17) bz769323 (f16) bz791159 (f15) Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
From 69fe207ed68e560d76a592fd86af32a9d1deca25 Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.de>
|
|
Date: Thu, 22 Mar 2012 15:53:53 +1100
|
|
Subject: [PATCH] Incremental: fix adding devices with --incremental
|
|
|
|
We should use 'info' here, not 'info2'.
|
|
info2 refers to some other device (There may not even be one).l
|
|
info is *this* disk.
|
|
|
|
This is particularly important for getting info.disk.state
|
|
correct, which the kernel depends on to get 're-add' functionality
|
|
correct.
|
|
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
---
|
|
Incremental.c | 8 ++++----
|
|
1 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/Incremental.c b/Incremental.c
|
|
index 836a6f1..a61f453 100644
|
|
--- a/Incremental.c
|
|
+++ b/Incremental.c
|
|
@@ -414,19 +414,19 @@ int Incremental(char *devname, int verbose, int runstop,
|
|
goto out_unlock;
|
|
}
|
|
}
|
|
- info2.disk.major = major(stb.st_rdev);
|
|
- info2.disk.minor = minor(stb.st_rdev);
|
|
+ info.disk.major = major(stb.st_rdev);
|
|
+ info.disk.minor = minor(stb.st_rdev);
|
|
/* add disk needs to know about containers */
|
|
if (st->ss->external)
|
|
sra->array.level = LEVEL_CONTAINER;
|
|
- err = add_disk(mdfd, st, sra, &info2);
|
|
+ err = add_disk(mdfd, st, sra, &info);
|
|
if (err < 0 && errno == EBUSY) {
|
|
/* could be another device present with the same
|
|
* disk.number. Find and reject any such
|
|
*/
|
|
find_reject(mdfd, st, sra, info.disk.number,
|
|
info.events, verbose, chosen_name);
|
|
- err = add_disk(mdfd, st, sra, &info2);
|
|
+ err = add_disk(mdfd, st, sra, &info);
|
|
}
|
|
if (err < 0) {
|
|
fprintf(stderr, Name ": failed to add %s to %s: %s.\n",
|
|
--
|
|
1.7.7.6
|
|
|