]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super1.c
super1.c: avoid useless sync when bitmap switches from clustered to none
[thirdparty/mdadm.git] / super1.c
index 70aa1d3d0219735ca991b1a66ba8413a50438a86..7b03329dac916e4ec7659b27ff1140af01921daa 100644 (file)
--- a/super1.c
+++ b/super1.c
@@ -1346,6 +1346,8 @@ static int update_super1(struct supertype *st, struct mdinfo *info,
                        memcpy(bms->uuid, sb->set_uuid, 16);
        } else if (strcmp(update, "no-bitmap") == 0) {
                sb->feature_map &= ~__cpu_to_le32(MD_FEATURE_BITMAP_OFFSET);
+               if (bms->version == BITMAP_MAJOR_CLUSTERED && !IsBitmapDirty(devname))
+                       sb->resync_offset = MaxSector;
        } else if (strcmp(update, "bbl") == 0) {
                /* only possible if there is room after the bitmap, or if
                 * there is no bitmap