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;
|
||||
unsigned long long reshape_progress;
|
||||
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 errors;
|
||||
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;
|
||||
|
||||
strcpy(info->text_version, "ddf");
|
||||
info->safe_mode_delay = 0;
|
||||
|
||||
// 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",
|
||||
devnum2devname(st->container_dev),
|
||||
st->subarray);
|
||||
info->safe_mode_delay = 200;
|
||||
|
||||
// info->name[] ?? ;
|
||||
}
|
||||
|
|
|
@ -655,6 +655,7 @@ static void getinfo_super_imsm_volume(struct supertype *st, struct mdinfo *info)
|
|||
sprintf(info->text_version, "/%s/%d",
|
||||
devnum2devname(st->container_dev),
|
||||
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->reshape_active = 0;
|
||||
strcpy(info->text_version, "imsm");
|
||||
info->safe_mode_delay = 0;
|
||||
info->disk.number = -1;
|
||||
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;
|
||||
|
||||
sprintf(info->text_version, "0.%d", sb->minor_version);
|
||||
info->safe_mode_delay = 200;
|
||||
|
||||
uuid_from_super0(st, info->uuid);
|
||||
|
||||
|
|
Loading…
Reference in New Issue