summaryrefslogtreecommitdiffstats
path: root/super-ddf.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-04-09 09:11:57 +0200
committerNeilBrown <neilb@suse.de>2014-05-21 03:54:48 +0200
commit07de2684262d924820b174070592d694723572d2 (patch)
tree2a0d8cb58c76fc1c85efa031b763e7c91244a4b3 /super-ddf.c
parentDDF: avoid ref outside array in getinfo_super_ddf_bvd (diff)
downloadmdadm-07de2684262d924820b174070592d694723572d2.tar.xz
mdadm-07de2684262d924820b174070592d694723572d2.zip
DDF: update timestamp in DDF header.
Doco says: Header update timestamp. MUST be set when the DDF header is updated. So I guess we should. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-ddf.c')
-rw-r--r--super-ddf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/super-ddf.c b/super-ddf.c
index 414bdef2..598c43bf 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -3107,6 +3107,7 @@ static int _write_super_to_disk(struct ddf_super *ddf, struct dl *d)
ddf->anchor.secondary_lba =
cpu_to_be64(size - 32*1024*2);
ddf->anchor.seq = ddf->active->seq;
+ ddf->anchor.timestamp = cpu_to_be32(time(0) - DECADE);
memcpy(&ddf->primary, &ddf->anchor, 512);
memcpy(&ddf->secondary, &ddf->anchor, 512);