]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
md-cluster: clean related infos of cluster
authorGuoqing Jiang <gqjiang@suse.com>
Fri, 12 Aug 2016 05:42:38 +0000 (13:42 +0800)
committerShaohua Li <shli@fb.com>
Wed, 21 Sep 2016 16:09:44 +0000 (09:09 -0700)
cluster_info and bitmap_info.nodes also need to be
cleared when array is stopped.

Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/md.c

index b6ad04b58766e4593bb79cfd46c40f5ec9263ea9..cd6797b3cdf791a50c20f29fdc7f66461b3f9d51 100644 (file)
@@ -5454,12 +5454,14 @@ static void md_clean(struct mddev *mddev)
        mddev->degraded = 0;
        mddev->safemode = 0;
        mddev->private = NULL;
+       mddev->cluster_info = NULL;
        mddev->bitmap_info.offset = 0;
        mddev->bitmap_info.default_offset = 0;
        mddev->bitmap_info.default_space = 0;
        mddev->bitmap_info.chunksize = 0;
        mddev->bitmap_info.daemon_sleep = 0;
        mddev->bitmap_info.max_write_behind = 0;
+       mddev->bitmap_info.nodes = 0;
 }
 
 static void __md_stop_writes(struct mddev *mddev)