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 11:27:17 +0100 [thread overview]
Message-ID: <50AA0985.6060601@profitbricks.com> (raw)
In-Reply-To: <CAA9_cmcViMsVMrxyEcC9yaHPq9Xc-5Dt63fMEJ+X+kZst8O9Fg@mail.gmail.com>
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.
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.
Cheers,
Sebastian
next prev parent reply other threads:[~2012-11-19 10:27 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 [this message]
2012-11-19 16:08 ` Sebastian Riemer
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=50AA0985.6060601@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.