diff options
author | Artur Paszkiewicz <artur.paszkiewicz@intel.com> | 2017-04-24 16:03:26 +0200 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2017-04-24 23:10:56 +0200 |
commit | b75805662e7208799207a8e5f8a61f69a44888f0 (patch) | |
tree | 1578130c984cd37df66a60ba2dc2bc5bbc59208f /super-intel.c | |
parent | maps: Simplify implementation of map_name() (diff) | |
download | mdadm-b75805662e7208799207a8e5f8a61f69a44888f0.tar.xz mdadm-b75805662e7208799207a8e5f8a61f69a44888f0.zip |
Don't use UnSet with consistency_policy
Use CONSISTENCY_POLICY_UNKNOWN instead. Simplify some checks because
since 5e8e35fb7e17 ("maps: Use keyvalue for null terminator to indicate
'unset' value") map_name() can return this default directly.
Suggested-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/super-intel.c b/super-intel.c index 0aed57c8..fbff215c 100644 --- a/super-intel.c +++ b/super-intel.c @@ -5369,9 +5369,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info, } mpb->num_raid_devs++; - if (s->consistency_policy == UnSet || - s->consistency_policy == CONSISTENCY_POLICY_RESYNC || - s->consistency_policy == CONSISTENCY_POLICY_NONE) { + if (s->consistency_policy <= CONSISTENCY_POLICY_RESYNC) { dev->rwh_policy = RWH_OFF; } else if (s->consistency_policy == CONSISTENCY_POLICY_PPL) { dev->rwh_policy = RWH_DISTRIBUTED; |