]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF: update timestamp in DDF header.
authorNeilBrown <neilb@suse.de>
Wed, 9 Apr 2014 07:11:57 +0000 (17:11 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 21 May 2014 01:54:48 +0000 (11:54 +1000)
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>
super-ddf.c

index 414bdef2a7b28dffa72a7192693532dd31739a45..598c43bf015fa6f97896c0cf62afeb888f992466 100644 (file)
@@ -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);