From: mwilck@arcor.de
To: neilb@suse.de, linux-raid@vger.kernel.org
Cc: mwilck@arcor.de
Subject: [PATCH 1/2] DDF: add_to_super_ddf: leave invalid secondary_lba untouched
Date: Tue, 24 Sep 2013 19:18:51 +0200 [thread overview]
Message-ID: <1380043132-8099-2-git-send-email-mwilck@arcor.de> (raw)
In-Reply-To: <1380043132-8099-1-git-send-email-mwilck@arcor.de>
If the current DDF structure doesn't have a secondary header,
don't set it.
Signed-off-by: Martin Wilck <mwilck@arcor.de>
---
super-ddf.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/super-ddf.c b/super-ddf.c
index 002b271..3e13ff0 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -2822,8 +2822,9 @@ static int add_to_super_ddf(struct supertype *st,
} while (0)
__calc_lba(dd, ddf->dlist, workspace_lba, 32);
__calc_lba(dd, ddf->dlist, primary_lba, 16);
- if (ddf->dlist == NULL ||
- be64_to_cpu(ddf->dlist->secondary_lba) != ~(__u64)0)
+ if (be64_to_cpu(ddf->active->secondary_lba) == ~(__u64)0)
+ dd->secondary_lba = ddf->active->secondary_lba;
+ else
__calc_lba(dd, ddf->dlist, secondary_lba, 32);
pde->config_size = dd->workspace_lba;
--
1.7.3.4
next prev parent reply other threads:[~2013-09-24 17:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-24 17:18 [PATCH 0/2] Fix mdadm --add for LSI fake RAID mwilck
2013-09-24 17:18 ` mwilck [this message]
2013-09-24 18:13 ` [PATCH 1/2] *DO NOT APPLY* DDF: add_to_super_ddf: leave invalid secondary_lba untouched Martin Wilck
2013-09-24 17:18 ` [PATCH 2/2] DDF: add_to_super_ddf: be careful with workspace_lba mwilck
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=1380043132-8099-2-git-send-email-mwilck@arcor.de \
--to=mwilck@arcor.de \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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).