summaryrefslogtreecommitdiff
path: root/super-ddf.c
diff options
context:
space:
mode:
authormwilck@arcor.de <mwilck@arcor.de>2013-08-16 20:21:58 +0200
committerNeilBrown <neilb@suse.de>2013-08-28 14:58:34 +1000
commit5684fff6f800098564b0456ad9b16c3c651dd4c0 (patch)
treef4960f40bd3a68e666579963fc5345f19faf558c /super-ddf.c
parent1219c77e72e32085c719e78758bec179eedde46c (diff)
DDF: increase default value for safe_mode_delay to 4000ms
That is the same value that IMSM uses. The current default of 200ms seems to have been copied from the native MD meta data. That value appears to be much too low for DDF, given that writing the DDF meta data means that easily several MB worth of data need to be written to disk. Signed-off-by: Martin Wilck <mwilck@arcor.de> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/super-ddf.c b/super-ddf.c
index a5852a76..8bba70a3 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -47,6 +47,10 @@ unsigned long crc32(
#define DDF_NOTFOUND (~0U)
#define DDF_CONTAINER (DDF_NOTFOUND-1)
+/* Default for safe_mode_delay. Same value as for IMSM.
+ */
+static const int DDF_SAFE_MODE_DELAY = 4000;
+
/* The DDF metadata handling.
* DDF metadata lives at the end of the device.
* The last 512 byte block provides an 'anchor' which is used to locate
@@ -1976,7 +1980,7 @@ static void getinfo_super_ddf_bvd(struct supertype *st, struct mdinfo *info, cha
sprintf(info->text_version, "/%s/%d",
st->container_devnm,
info->container_member);
- info->safe_mode_delay = 200;
+ info->safe_mode_delay = DDF_SAFE_MODE_DELAY;
memcpy(info->name, ddf->virt->entries[info->container_member].name, 16);
info->name[16]=0;
@@ -3668,7 +3672,7 @@ static struct mdinfo *container_content_ddf(struct supertype *st, char *subarray
this->array.md_minor = -1;
this->array.major_version = -1;
this->array.minor_version = -2;
- this->safe_mode_delay = 200;
+ this->safe_mode_delay = DDF_SAFE_MODE_DELAY;
cptr = (__u32 *)(vc->conf.guid + 16);
this->array.ctime = DECADE + __be32_to_cpu(*cptr);
this->array.utime = DECADE +