From: Doug Ledford <dledford@redhat.com>
To: Neil Brown <neilb@suse.de>
Cc: Linux RAID Mailing List <linux-raid@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>
Subject: Re: [Patch mdadm] Add hot-unplug support to mdadm
Date: Tue, 06 Apr 2010 23:07:47 -0400 [thread overview]
Message-ID: <4BBBF703.6030508@redhat.com> (raw)
In-Reply-To: <4BBBECD5.6010903@redhat.com>
[-- Attachment #1.1: Type: text/plain, Size: 402 bytes --]
Here's another minor incremental patch to the original. This makes
hot-remove of imsm devices work. The sanity tests just needed to be
updated to deal with an already missing device.
--
Doug Ledford <dledford@redhat.com>
GPG KeyID: CFBFF194
http://people.redhat.com/dledford
Infiniband specific RPMs available at
http://people.redhat.com/dledford/Infiniband
[-- Attachment #1.2: mdadm-3.1.2-decremental-3.patch --]
[-- Type: text/plain, Size: 1079 bytes --]
commit 1934c67fe5bc25a79393ad78e29bf9ef778bc701
Author: Doug Ledford <dledford@redhat.com>
Date: Tue Apr 6 23:02:47 2010 -0400
Only close lfd if we have an external metadata type since that's the only
time we'll have it open.
If we weren't able to open the device file, assume the device is gone
already and skip the sysfs_unique_holder test as it is guaranteed to
fail.
Signed-off-by: Doug Ledford <dledford@redhat.com>
diff --git a/Manage.c b/Manage.c
index b15586b..a690cfc 100644
--- a/Manage.c
+++ b/Manage.c
@@ -811,6 +811,7 @@ int Manage_subdevs(char *devname, int fd,
* rely on the 'detached' checks
*/
if (strcmp(dv->devname, "detached") == 0 ||
+ tfd < 0 ||
sysfs_unique_holder(dnum, stb.st_rdev))
/* pass */;
else {
@@ -878,8 +879,8 @@ int Manage_subdevs(char *devname, int fd,
ping_manager(name);
free(name);
+ close(lfd);
}
- close(lfd);
if (verbose >= 0)
fprintf(stderr, Name ": hot removed %s\n",
dnprintable);
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2010-04-07 3:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-05 16:40 [Patch mdadm] Add hot-unplug support to mdadm Doug Ledford
2010-04-06 16:26 ` Doug Ledford
2010-04-07 1:30 ` Neil Brown
2010-04-07 2:02 ` Doug Ledford
2010-04-07 2:24 ` Doug Ledford
2010-04-07 3:07 ` Doug Ledford [this message]
2010-04-07 5:32 ` Luca Berra
2010-04-07 6:59 ` Neil Brown
2010-04-08 23:31 ` Neil Brown
2010-04-09 0:33 ` Neil Brown
2010-04-09 20:02 ` Doug Ledford
2010-04-13 9:28 ` Tomáš Dulík
2010-04-13 16:27 ` Doug Ledford
2010-04-13 18:49 ` Doug Ledford
[not found] ` <4BC5ADB2.2060705@unart.cz>
2010-04-15 5:24 ` Neil Brown
2010-04-15 13:11 ` Tomáš Dulík
2010-04-13 19:04 ` Doug Ledford
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=4BBBF703.6030508@redhat.com \
--to=dledford@redhat.com \
--cc=dan.j.williams@intel.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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).