summaryrefslogtreecommitdiff
path: root/super-ddf.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2014-04-09 17:11:57 +1000
committerNeilBrown <neilb@suse.de>2014-05-21 11:54:48 +1000
commit07de2684262d924820b174070592d694723572d2 (patch)
tree2a0d8cb58c76fc1c85efa031b763e7c91244a4b3 /super-ddf.c
parent0d255ff84e2f679a9c8ad190b5c3238e62fca5cb (diff)
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);