summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-09-15 20:58:42 -0700
committerDan Williams <dan.j.williams@intel.com>2008-09-15 20:58:42 -0700
commita67dd8cc58845b3375cba9bc45e20ed0d03d2034 (patch)
tree7c88d88de098503e23365446b66103247a822066
parentd2534825272003cb1735ff6676fba57b66c7eb95 (diff)
downloadmdadm-a67dd8cc58845b3375cba9bc45e20ed0d03d2034.tar.gz
mdadm-a67dd8cc58845b3375cba9bc45e20ed0d03d2034.tar.xz
mdadm-a67dd8cc58845b3375cba9bc45e20ed0d03d2034.zip
Allow metadata handlers to communicate desired safemode delay via mdinfo
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--mdadm.h1
-rw-r--r--super-ddf.c2
-rw-r--r--super-intel.c2
-rw-r--r--super0.c1
-rw-r--r--super1.c1
5 files changed, 7 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index 4fbde1c..3d31576 100644
--- a/mdadm.h
+++ b/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*/
diff --git a/super-ddf.c b/super-ddf.c
index 3477adf..d7efa9f 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -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[] ?? ;
}
diff --git a/super-intel.c b/super-intel.c
index d49f9c6..709923a 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -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;
diff --git a/super0.c b/super0.c
index ab63660..ed44aff 100644
--- a/super0.c
+++ b/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);
diff --git a/super1.c b/super1.c
index 06d0a18..176579d 100644
--- a/super1.c
+++ b/super1.c
@@ -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);