linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Obitotskiy <aleksey.obitotskiy@intel.com>
To: linux-raid@vger.kernel.org
Cc: shli@kernel.org
Subject: [PATCH] md: notify about new spare disk in the container
Date: Fri, 21 Jul 2017 12:19:04 +0200	[thread overview]
Message-ID: <1500632344-22339-1-git-send-email-aleksey.obitotskiy@intel.com> (raw)

In case of external metadata arrays spare disks are added to containers
first. mdadm keeps monitoring /proc/mdstat output and when spare disk is
available, it moves it from the container to the array. The problem is
there is no notification of new spare disk in the container and mdadm
waits a long time (until timeout) before it takes the action.

Signed-off-by: Alexey Obitotskiy <aleksey.obitotskiy@intel.com>
---
 drivers/md/md.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 66f6b92..02f4c6f 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4283,6 +4283,7 @@ new_dev_store(struct mddev *mddev, const char *buf, size_t len)
 	if (err)
 		export_rdev(rdev);
 	mddev_unlock(mddev);
+	md_new_event(mddev);
 	return err ? err : len;
 }
 
-- 
2.7.4


             reply	other threads:[~2017-07-21 10:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 10:19 Alexey Obitotskiy [this message]
2017-07-21 20:24 ` [PATCH] md: notify about new spare disk in the container Shaohua Li
2017-07-28 13:49   ` [PATCH v2] " Artur Paszkiewicz
2017-07-28 17:00     ` Shaohua Li

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=1500632344-22339-1-git-send-email-aleksey.obitotskiy@intel.com \
    --to=aleksey.obitotskiy@intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=shli@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).