mdadm/mdadm-3.1.2-decremental-3.patch
Doug Ledford f2098b61d7 - Fix up directory in mdmonitor init script so that we restart mdmon like
we are supposed to
- Add a rule to run incremental assembly on containers in case there are
    multiple volumes in a container and we only started some of them in the
    initramfs
- Make -If work with imsm arrays. We had too restrictive of a test in
    sysfs_unique_holder.
2010-04-07 14:51:17 +00:00

36 lines
1.0 KiB
Diff

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);