linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Martin Wilck <martin.wilck@ts.fujitsu.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] DDF: _write_super_to_disk: fix anchor header type
Date: Wed, 13 May 2015 10:34:15 +1000	[thread overview]
Message-ID: <20150513103415.0bf79e71@notabene.brown> (raw)
In-Reply-To: <1431353384-8637-1-git-send-email-martin.wilck@ts.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]

On Mon, 11 May 2015 16:09:44 +0200 Martin Wilck <martin.wilck@ts.fujitsu.com>
wrote:

> Since commit 30bee0201, the anchor is updated from the active
> DDF header. This requires fixing the header type before the
> anchor is written.
> 
> The LSI Software RAID code will reject DDF meta data with wrong
> anchor type and will erase all meta data when it encounters
> such a broken anchor. Thus starting Linux md once on a system
> with LSI RAID BIOS may cause the meta data to get destroyed.
> ---
>  super-ddf.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/super-ddf.c b/super-ddf.c
> index d0b2ac7..faaf0a7 100644
> --- a/super-ddf.c
> +++ b/super-ddf.c
> @@ -3158,6 +3158,7 @@ static int _write_super_to_disk(struct ddf_super *ddf, struct dl *d)
>  	memcpy(&ddf->primary, &ddf->anchor, 512);
>  	memcpy(&ddf->secondary, &ddf->anchor, 512);
>  
> +	ddf->anchor.type = DDF_HEADER_ANCHOR;
>  	ddf->anchor.openflag = 0xFF; /* 'open' means nothing */
>  	ddf->anchor.seq = cpu_to_be32(0xFFFFFFFF); /* no sequencing in anchor */
>  	ddf->anchor.crc = calc_crc(&ddf->anchor, 512);


Thanks Martin!
Applied,
NeilBrown

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

      reply	other threads:[~2015-05-13  0:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 14:09 [PATCH] DDF: _write_super_to_disk: fix anchor header type Martin Wilck
2015-05-13  0:34 ` NeilBrown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150513103415.0bf79e71@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=martin.wilck@ts.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).