Skip to contentSkip to conversation

master - raid: fix version check of target

PATCH Zdenek Kabelac 1 participant 1 message Mar 17, 2018 MD RAID

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=67fbe980a710a790d6d1ea7f9cfaf9d8c6e50448
Commit:        67fbe980a710a790d6d1ea7f9cfaf9d8c6e50448
Parent:        689af32313ac120dd67a16d73e78ede5295e308c
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Sat Mar 17 21:44:53 2018 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Sat Mar 17 23:30:14 2018 +0100

raid: fix version check of target

Comparision missed to check patch level for matching minor version. Howerver since all checked patchlevels were 0 - the fix doesn't change result.

---
 WHATS_NEW       |    1 +
 lib/raid/raid.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
WHATS_NEW +1 -0
index a974a6c..5711f41 100644
@@ -1,5 +1,6 @@
 Version 2.02.178 - 
 =====================================
+  Fix raid target version testing for supported features.
   Allow activation of pools when thin/cache_check tool is missing.
   Remove RaidLV on creation failure when rmeta devices can't be activated.
   Add prioritized_section() to restore cookie boundaries (2.02.177).
lib/raid/raid.c +1 -1
index 269a30c..e926ae1 100644
@@ -464,7 +464,7 @@ struct raid_feature {
 static int _check_feature(const struct raid_feature *feature, uint32_t maj, uint32_t min, uint32_t patchlevel)
 {
 	return (maj > feature->maj) ||
-	       (maj == feature->maj && min >= feature->min) ||
+	       (maj == feature->maj && min > feature->min) ||
 	       (maj == feature->maj && min == feature->min && patchlevel >= feature->patchlevel);
 }