Neil Brown: Remove partitions from a device before adding it to an array.
Martin F. Krafft
madduck at alioth.debian.org
Tue Apr 22 10:25:58 UTC 2008
Module: mdadm
Branch: upstream-patches
Commit: 25037aa872006fd4613d97e3d3da3c26c61e708f
URL: http://git.debian.org/?p=pkg-mdadm/mdadm.git/?a=commit;h=25037aa872006fd4613d97e3d3da3c26c61e708f
Author: Neil Brown <neilb at suse.de>
Date: Fri Oct 19 14:03:17 2007 +1000
Remove partitions from a device before adding it to an array.
The 'remove_partitions' call is in the wrong place and applying
to the wrong file.
---
Manage.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Manage.c b/Manage.c
index 7a96d45..8150be3 100644
--- a/Manage.c
+++ b/Manage.c
@@ -306,6 +306,7 @@ int Manage_subdevs(char *devname, int fd,
dv->devname, strerror(errno));
return 1;
}
+ remove_partitions(tfd);
if (array.not_persistent==0)
st->ss->load_super(st, tfd, &osuper, NULL);
/* will use osuper later */
@@ -361,7 +362,6 @@ int Manage_subdevs(char *devname, int fd,
close(dfd);
continue;
}
- remove_partitions(dfd);
close(dfd);
break;
}
More information about the pkg-mdadm-commits
mailing list