summaryrefslogtreecommitdiffstats
path: root/super-intel.c
diff options
context:
space:
mode:
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>2017-09-28 14:41:07 +0200
committerJes Sorensen <jsorensen@fb.com>2017-10-02 22:07:04 +0200
commit2c8890e926a4c7f9169b5054e3dbf84426fe1025 (patch)
treeb4c0e98d2c0d8848872ed0c837a1f9a788a460f2 /super-intel.c
parentmdadm: fixes some trivial typos in comments (diff)
downloadmdadm-2c8890e926a4c7f9169b5054e3dbf84426fe1025.tar.xz
mdadm-2c8890e926a4c7f9169b5054e3dbf84426fe1025.zip
Don't abort starting the array if kernel does not support ppl
Change the behavior of assemble and create for consistency-policy=ppl for external metadata arrays. If the kernel does not support ppl, don't abort but print a warning and start the array without ppl (consistency-policy=resync). No change for native md arrays because the kernel will not allow starting the array if it finds an unsupported feature bit in the superblock. In sysfs_add_disk() check consistency_policy in the mdinfo structure that represents the array, not the disk and read the current consistency policy from sysfs in mdmon's manage_member(). This is necessary to make sysfs_add_disk() honor the actual consistency policy and not what is in the metadata. Also remove all the places where consistency_policy is set for a disk's mdinfo - it is a property of the array, not the disk. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/super-intel.c b/super-intel.c
index bbe7bc71..e3dcd3d2 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7669,7 +7669,6 @@ static struct mdinfo *container_content_imsm(struct supertype *st, char *subarra
} else {
info_d->component_size = blocks_per_member(map);
}
- info_d->consistency_policy = this->consistency_policy;
info_d->bb.supported = 1;
get_volume_badblocks(super->bbm_log, ord_to_idx(ord),
@@ -8758,8 +8757,7 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a,
di->component_size = a->info.component_size;
di->container_member = inst;
di->bb.supported = 1;
- if (dev->rwh_policy == RWH_DISTRIBUTED) {
- di->consistency_policy = CONSISTENCY_POLICY_PPL;
+ if (a->info.consistency_policy == CONSISTENCY_POLICY_PPL) {
di->ppl_sector = get_ppl_sector(super, inst);
di->ppl_size = (PPL_HEADER_SIZE + PPL_ENTRY_SPACE) >> 9;
}