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:
Dan Williams 2008-09-15 20:58:42 -07:00
parent d253482527
commit a67dd8cc58
5 changed files with 7 additions and 0 deletions

View File

@ -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*/

View File

@ -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[] ?? ;
}

View File

@ -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;

View File

@ -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);

View File

@ -532,6 +532,7 @@ static void getinfo_super1(struct supertype *st, struct mdinfo *info)
}
info->events = __le64_to_cpu(sb->events);
sprintf(info->text_version, "1.%d", st->minor_version);
info->safe_mode_delay = 200;
memcpy(info->uuid, sb->set_uuid, 16);