Allow metadata handlers to communicate desired safemode delay via mdinfo
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
parent
d253482527
commit
a67dd8cc58
1
mdadm.h
1
mdadm.h
|
@ -149,6 +149,7 @@ struct mdinfo {
|
||||||
int reshape_active;
|
int reshape_active;
|
||||||
unsigned long long reshape_progress;
|
unsigned long long reshape_progress;
|
||||||
unsigned long long resync_start;
|
unsigned long long resync_start;
|
||||||
|
unsigned long safe_mode_delay; /* ms delay to mark clean */
|
||||||
int new_level, delta_disks, new_layout, new_chunk;
|
int new_level, delta_disks, new_layout, new_chunk;
|
||||||
int errors;
|
int errors;
|
||||||
int cache_size; /* size of raid456 stripe cache*/
|
int cache_size; /* size of raid456 stripe cache*/
|
||||||
|
|
|
@ -1247,6 +1247,7 @@ static void getinfo_super_ddf(struct supertype *st, struct mdinfo *info)
|
||||||
info->reshape_active = 0;
|
info->reshape_active = 0;
|
||||||
|
|
||||||
strcpy(info->text_version, "ddf");
|
strcpy(info->text_version, "ddf");
|
||||||
|
info->safe_mode_delay = 0;
|
||||||
|
|
||||||
// uuid_from_super_ddf(info->uuid, sbv);
|
// uuid_from_super_ddf(info->uuid, sbv);
|
||||||
|
|
||||||
|
@ -1303,6 +1304,7 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info)
|
||||||
sprintf(info->text_version, "/%s/%s",
|
sprintf(info->text_version, "/%s/%s",
|
||||||
devnum2devname(st->container_dev),
|
devnum2devname(st->container_dev),
|
||||||
st->subarray);
|
st->subarray);
|
||||||
|
info->safe_mode_delay = 200;
|
||||||
|
|
||||||
// info->name[] ?? ;
|
// info->name[] ?? ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -655,6 +655,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info)
|
||||||
sprintf(info->text_version, "/%s/%d",
|
sprintf(info->text_version, "/%s/%d",
|
||||||
devnum2devname(st->container_dev),
|
devnum2devname(st->container_dev),
|
||||||
info->container_member);
|
info->container_member);
|
||||||
|
info->safe_mode_delay = 4000; /* 4 secs like the Matrix driver */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -685,6 +686,7 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info)
|
||||||
info->disk.raid_disk = -1;
|
info->disk.raid_disk = -1;
|
||||||
info->reshape_active = 0;
|
info->reshape_active = 0;
|
||||||
strcpy(info->text_version, "imsm");
|
strcpy(info->text_version, "imsm");
|
||||||
|
info->safe_mode_delay = 0;
|
||||||
info->disk.number = -1;
|
info->disk.number = -1;
|
||||||
info->disk.state = 0;
|
info->disk.state = 0;
|
||||||
|
|
||||||
|
|
1
super0.c
1
super0.c
|
@ -370,6 +370,7 @@ static void getinfo_super0(struct supertype *st, struct mdinfo *info)
|
||||||
info->data_offset = 0;
|
info->data_offset = 0;
|
||||||
|
|
||||||
sprintf(info->text_version, "0.%d", sb->minor_version);
|
sprintf(info->text_version, "0.%d", sb->minor_version);
|
||||||
|
info->safe_mode_delay = 200;
|
||||||
|
|
||||||
uuid_from_super0(st, info->uuid);
|
uuid_from_super0(st, info->uuid);
|
||||||
|
|
||||||
|
|
1
super1.c
1
super1.c
|
@ -532,6 +532,7 @@ static void getinfo_super1(struct supertype *st, struct mdinfo *info)
|
||||||
}
|
}
|
||||||
info->events = __le64_to_cpu(sb->events);
|
info->events = __le64_to_cpu(sb->events);
|
||||||
sprintf(info->text_version, "1.%d", st->minor_version);
|
sprintf(info->text_version, "1.%d", st->minor_version);
|
||||||
|
info->safe_mode_delay = 200;
|
||||||
|
|
||||||
memcpy(info->uuid, sb->set_uuid, 16);
|
memcpy(info->uuid, sb->set_uuid, 16);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue