From: Sebastian Riemer <sebastian.riemer@profitbricks.com>
To: Dan Williams <djbw@fb.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: [PATCH v2] md: also hot remove disk from pers when hot removing
Date: Mon, 19 Nov 2012 17:08:13 +0100 [thread overview]
Message-ID: <50AA596D.4080003@profitbricks.com> (raw)
In-Reply-To: <50AA0985.6060601@profitbricks.com>
On 19.11.2012 11:27, Sebastian Riemer wrote:
> On 17.11.2012 01:07, Dan Williams wrote:
>> Hmm, how are you getting ->raid_disk set to -1 without the personality
>> being notified? That seems to be the source of the bug. Otherwise it
>> would seem the state_store("remove") path is also susceptible.
>>
>> --
>> Dan
> Thanks for your feedback!
>
> Perhaps it's only something for my use-case of read-only
> raid1-replicated volumes where I never have any spares. I don't set
> ->raid_disk to -1 when hot adding them. I have to put them directly to
> their stored slot because I assemble read-only on read-only rdevs. So
> the syncer never runs. Those read-only rdevs are coming from remote
> storage. Imagine HA CD-ROM images.
>
> My thought was that it would be cleaner behavior if the cleanup of an
> rdev in the personality already happens when hot removing the disk.
>
> You're right, the state_store("remove") path would need this change, too.
>
> With the "slot_store" path I could trigger a panic when I hot added the
> disk as spare, marked it insync and tried to give it the slot it belongs
> to. I'll test this with the latest vanilla kernel and try to reproduce
> this on rw volumes which I set to read-only. If I can also crash it that
> way, I've got a proof that there is a bug.
The kernel blocks most ioctls on a read-only mddev. So I guess I've got
another custom patch. IMHO it would be still cleaner to also hot remove
the disk from the personality when hot removing an rdev.
> If the disk isn't cleaned up in the pers, then hot_add_disk doesn't
> return any error for raid1. Instead it crashes when referencing the old
> pointer when calling "print_conf" in raid1.c.
next prev parent reply other threads:[~2012-11-19 16:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 16:04 [PATCH v2] md: also hot remove disk from pers when hot removing Sebastian Riemer
2012-11-17 0:07 ` Dan Williams
2012-11-19 10:27 ` Sebastian Riemer
2012-11-19 16:08 ` Sebastian Riemer [this message]
2012-11-19 21:19 ` NeilBrown
2012-11-20 9:52 ` Sebastian Riemer
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=50AA596D.4080003@profitbricks.com \
--to=sebastian.riemer@profitbricks.com \
--cc=djbw@fb.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.