All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@arcor.de>
To: Francis Moreau <francis.moro@gmail.com>,
	linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Weirdness with DDF arrays (mdadm 3.3)
Date: Mon, 16 Sep 2013 19:02:27 +0200	[thread overview]
Message-ID: <523739A3.60507@arcor.de> (raw)
In-Reply-To: <CAC9WiBiFs8V+_iWx9sRW6WEPLAKR85zxBpHb3SsWa0k6J7z7Fg@mail.gmail.com>

On 09/16/2013 03:47 PM, Francis Moreau wrote:
[...]

>>>> Wrt loop1[2], I think you interpret the [2] wrongly. It seems to be the
>>>> kernel index of the device somehow. The mdstat parsing code of mdadm
>>>> doesn't look at this number. If you look at
>>>> /sys/class/block/md124/md/dev-loop*/slot, the number should be correct -
>>>> I tried it here.
>>>
>>> Well I think I interpreted the numbers the way it's described here :
>>>
>>> https://raid.wiki.kernel.org/index.php/Mdstat#md_device_line
>>
>> That description is not quite correct. The number in brackets [2] means
>> the index of the disk in the meta data (for DDF, that's the index in the
>> "physical disks" table of the container). That number isn't very
>> meaningful except for the meta data itself.
>>
>> The logical disk index is represented by the "slot" attribute in sysfs.
>>
>> See e.g.
>> http://lxr.missinglinkelectronics.com/linux+*/drivers/md/md.h#L79
>>
>> The number displayed in /proc/mdstat is "desc_nr", while the number that
>> actually matters is "raid_disk".
> 
> Maybe the description in the wiki is correct but there's a bun in the
> kernel which displays the wrong number ?
>
> If "desc_nr" isn't meaningful, I don't see the point to show it in
> /proc/mdstat.

Well, we could propose to change the value displayed by the kernel. The
question is whether the kernel maintainers would allow that, because it
would change the kernel-userspace API. mdadm itself doesn't look at this
number, but other tools might, so there is some small but non-zero risk
of breaking something somewhere.

Let's wait what others have to say.

Martin

  reply	other threads:[~2013-09-16 17:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 10:02 Weirdness with DDF arrays (mdadm 3.3) Francis Moreau
2013-09-14 14:16 ` Martin Wilck
2013-09-14 15:25   ` Francis Moreau
2013-09-14 20:12     ` Martin Wilck
     [not found]     ` <5234C300.1050206@arcor.de>
     [not found]       ` <CAC9WiBg+HQBzP_GpUosQrVgvv8znh+pOwtDVGseB2t5yxB6pbA@mail.gmail.com>
2013-09-15 19:46         ` Martin Wilck
2013-09-16 13:47           ` Francis Moreau
2013-09-16 17:02             ` Martin Wilck [this message]
2013-09-16 19:31               ` Francis Moreau
2013-09-14 21:01   ` "detect reshape on array start" (was Re: Weirdness with DDF arrays (mdadm 3.3)) Martin Wilck
2013-09-14 21:16     ` Martin Wilck
2013-09-14 21:24       ` [PATCH] Monitor: don't set arrays dirty after transition to read-only mwilck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=523739A3.60507@arcor.de \
    --to=mwilck@arcor.de \
    --cc=francis.moro@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.