]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: enable bad block support for imsm metadata
authorTomasz Majchrzak <tomasz.majchrzak@intel.com>
Wed, 28 Dec 2016 08:38:07 +0000 (09:38 +0100)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 29 Dec 2016 19:28:36 +0000 (14:28 -0500)
Enable bad block support for imsm metadata as commit e522751d605d
("seq_file: reset iterator to first record for zero offset") has been
accepted in upstream kernel. Prior to that patch mdmon had not been able
to read bad blocks sysfs file.

Signed-off-by: Tomasz Majchrzak <tomasz.majchrzak@intel.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
super-intel.c

index df95957226ccf43986264cebd0105bc48bad4126..29b2163d01c34de72adb6b2ce8d9a5d9ff8cca5d 100644 (file)
@@ -3209,7 +3209,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info,
                                                        info->array.chunk_size,
                                                        super->sector_size,
                                                        info->component_size);
-       info->bb.supported = 0;
+       info->bb.supported = 1;
 
        memset(info->uuid, 0, sizeof(info->uuid));
        info->recovery_start = MaxSector;
@@ -3376,7 +3376,7 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char *
        info->name[0] = 0;
        info->recovery_start = MaxSector;
        info->recovery_blocked = imsm_reshape_blocks_arrays_changes(st->sb);
-       info->bb.supported = 0;
+       info->bb.supported = 1;
 
        /* do we have the all the insync disks that we expect? */
        mpb = super->anchor;
@@ -7380,7 +7380,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
                                info_d->component_size = blocks_per_member(map);
                        }
 
-                       info_d->bb.supported = 0;
+                       info_d->bb.supported = 1;
                        get_volume_badblocks(super->bbm_log, ord_to_idx(ord),
                                             info_d->data_offset,
                                             info_d->component_size,
@@ -8410,7 +8410,7 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a,
                di->data_offset = pba_of_lba0(map);
                di->component_size = a->info.component_size;
                di->container_member = inst;
-               di->bb.supported = 0;
+               di->bb.supported = 1;
                super->random = random32();
                di->next = rv;
                rv = di;