diff options
author | NeilBrown <neilb@suse.de> | 2008-11-04 21:45:07 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-11-04 21:45:07 +1100 |
commit | cfc76b8961e767b800593f9a3858bc567c9401f4 (patch) | |
tree | ecd3d8f8d7ca660c1a36d62d3424928d44c1a653 | |
parent | 201f3dc49d575c85e4c7a15592f33cb72bac651e (diff) | |
download | mdadm-scratch-3.0.tar.gz |
Stop: drop any partitions that may be associated with an array when stopping it.scratch-3.0
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"); |