]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
super1: Do not create bad block log for clustered devices.
authorNeilBrown <neilb@suse.com>
Mon, 28 Sep 2015 01:49:53 +0000 (11:49 +1000)
committerNeilBrown <neilb@suse.com>
Mon, 28 Sep 2015 02:27:37 +0000 (12:27 +1000)
We currently have no synchronization techniques for the bad
block log, so disable it for the cluster.

Reported-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
super1.c

index 52952eb40e43749622ca845378d11deca4400c50..6f4229196d8c935dbc69cd227df32be6ab9b255d 100644 (file)
--- a/super1.c
+++ b/super1.c
@@ -1701,7 +1701,8 @@ static int write_init_super1(struct supertype *st)
                        rv = -EINVAL;
                        goto out;
                }
-               if (conf_get_create_info()->bblist == 0) {
+               /* Disable badblock log on clusters, or when explicitly requested */
+               if (st->nodes > 0 || conf_get_create_info()->bblist == 0) {
                        sb->bblog_size = 0;
                        sb->bblog_offset = 0;
                }