diff options
author | NeilBrown <neilb@suse.de> | 2008-11-04 11:56:42 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-11-04 11:56:42 +0100 |
commit | d49410d3ab87cf62f1f34eb6ccca5eaefb2f5428 (patch) | |
tree | e46a4a88518b927306b0414c8e606b872ee13b71 | |
parent | Wait for name to appear after create/assemble etc. (diff) | |
download | mdadm-d49410d3ab87cf62f1f34eb6ccca5eaefb2f5428.tar.xz mdadm-d49410d3ab87cf62f1f34eb6ccca5eaefb2f5428.zip |
Stop: drop any partitions that may be associated with an array when stopping it.
Not all kernels automatically discard partitions when the
array is stopped, so call the RRPART ioctl to force it.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | Manage.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -260,8 +260,11 @@ int Manage_runstop(char *devname, int fd, int runstop, int quiet) return 1; } /* prior to 2.6.28, KOBJ_CHANGE was not sent when an md array - * was stopped, so We'll do it here just to be sure. + * was stopped, so We'll do it here just to be sure. Drop any + * partitions as well... */ + if (fd >= 0) + ioctl(fd, BLKRRPART, 0); if (mdi) sysfs_uevent(mdi, "change"); |