Thread (7 messages) 7 messages, 2 authors, 2013-05-16

Re: 0.90 vs 1.X - Differing behavior for device # during fail/remove/add operation

From: Dusty Mabe <hidden>
Date: 2013-05-11 00:04:27
Subsystem: software raid (multiple disks) support, the rest · Maintainers: Song Liu, Yu Kuai, Linus Torvalds

On Thu, May 9, 2013 at 5:29 PM, NeilBrown [off-list ref] wrote:
It is an unfortunate consequence of incoherent design.
I've occasionally wondered if I should "fix" it.
Neil,

Thanks for the insight. I don't know the code well but I do notice
that changing the md_seq_show() function to print out the raid_disk
rather than desc_nr at least gives me the "desired" behavior from
/proc/mdstat. This still doesn't change the fact that the "Number" is
still changed in the mdadm --detail output but is a quick easy way to
change mdstat without actually having to re-architect anything.

What do you think?
diff --git a/drivers/md/md.c b/drivers/md/md.c
index aeceedf..b47fd35 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7023,7 +7023,7 @@ static int md_seq_show(struct seq_file *seq, void *v)
                rdev_for_each(rdev, mddev) {
                        char b[BDEVNAME_SIZE];
                        seq_printf(seq, " %s[%d]",
-                               bdevname(rdev->bdev,b), rdev->desc_nr);
+                               bdevname(rdev->bdev,b), rdev->raid_disk);
                        if (test_bit(WriteMostly, &rdev->flags))
                                seq_printf(seq, "(W)");
                        if (test_bit(Faulty, &rdev->flags)) {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help