]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Don't create bitmap for raid5 with journal disk
authorXiao Ni <xni@redhat.com>
Tue, 15 Sep 2020 07:44:42 +0000 (15:44 +0800)
committerJes Sorensen <jsorensen@fb.com>
Wed, 14 Oct 2020 15:24:39 +0000 (11:24 -0400)
Journal disk and bitmap can't exist at the same time. It needs to check if the raid
has a journal disk when creating bitmap.

Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Create.c

index 6f84e5b0de9944dc05ce6c445a454d376d916615..0efa19ca7a9247c0e617b582722ef79c2bc352e9 100644 (file)
--- a/Create.c
+++ b/Create.c
@@ -542,6 +542,7 @@ int Create(struct supertype *st, char *mddev,
        if (!s->bitmap_file &&
            s->level >= 1 &&
            st->ss->add_internal_bitmap &&
+           s->journaldisks == 0 &&
            (s->consistency_policy != CONSISTENCY_POLICY_RESYNC &&
             s->consistency_policy != CONSISTENCY_POLICY_PPL) &&
            (s->write_behind || s->size > 100*1024*1024ULL)) {