]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - super-ddf.c
Introduce MaxSector
[thirdparty/mdadm.git] / super-ddf.c
index fe83642f779c13f0ad15c52f3a2329b62c0c5fca..8c3f4bebffe195cc7baea9c71ced1188f896c85c 100644 (file)
@@ -1433,7 +1433,7 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info)
            (ddf->virt->entries[info->container_member].init_state
             & DDF_initstate_mask)
            == DDF_init_full)
-               info->resync_start = ~0ULL;
+               info->resync_start = MaxSector;
 
        uuid_from_super_ddf(st, info->uuid);
 
@@ -2921,7 +2921,7 @@ static struct mdinfo *container_content_ddf(struct supertype *st)
                        this->resync_start = 0;
                } else {
                        this->array.state = 1;
-                       this->resync_start = ~0ULL;
+                       this->resync_start = MaxSector;
                }
                memcpy(this->name, ddf->virt->entries[i].name, 16);
                this->name[16]=0;
@@ -3066,7 +3066,7 @@ static int ddf_set_array_state(struct active_array *a, int consistent)
        if (consistent == 2) {
                /* Should check if a recovery should be started FIXME */
                consistent = 1;
-               if (!is_resync_complete(a))
+               if (!is_resync_complete(&a->info))
                        consistent = 0;
        }
        if (consistent)
@@ -3078,9 +3078,9 @@ static int ddf_set_array_state(struct active_array *a, int consistent)
 
        old = ddf->virt->entries[inst].init_state;
        ddf->virt->entries[inst].init_state &= ~DDF_initstate_mask;
-       if (is_resync_complete(a))
+       if (is_resync_complete(&a->info))
                ddf->virt->entries[inst].init_state |= DDF_init_full;
-       else if (a->resync_start == 0)
+       else if (a->info.resync_start == 0)
                ddf->virt->entries[inst].init_state |= DDF_init_not;
        else
                ddf->virt->entries[inst].init_state |= DDF_init_quick;
@@ -3088,7 +3088,7 @@ static int ddf_set_array_state(struct active_array *a, int consistent)
                ddf->updates_pending = 1;
 
        dprintf("ddf mark %d %s %llu\n", inst, consistent?"clean":"dirty",
-               a->resync_start);
+               a->info.resync_start);
        return consistent;
 }