linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mariusz Dabrowski <mariusz.dabrowski@intel.com>
To: linux-raid@vger.kernel.org
Cc: jes.sorensen@redhat.com, Mariusz Dabrowski <mariusz.dabrowski@intel.com>
Subject: [PATCH] imsm: set generation number when reading superblock
Date: Thu,  8 Dec 2016 12:12:48 +0100	[thread overview]
Message-ID: <1481195568-12973-1-git-send-email-mariusz.dabrowski@intel.com> (raw)

IMSM doesn't set 'events' field with generation number, so sometimes mdadm
tries to re-assembly container using metadata which isn't most recent (e. g.
from spare disk).

Signed-off-by: Mariusz Dabrowski <mariusz.dabrowski@intel.com>
---
 super-intel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/super-intel.c b/super-intel.c
index 0407d43..06b199a 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -3381,6 +3381,7 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char *
 
 	/* do we have the all the insync disks that we expect? */
 	mpb = super->anchor;
+	info->events = __le32_to_cpu(mpb->generation_num);
 
 	for (i = 0; i < mpb->num_raid_devs; i++) {
 		struct imsm_dev *dev = get_imsm_dev(super, i);
-- 
1.8.3.1


             reply	other threads:[~2016-12-08 11:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08 11:12 Mariusz Dabrowski [this message]
2016-12-12 19:25 ` [PATCH] imsm: set generation number when reading superblock Jes Sorensen

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=1481195568-12973-1-git-send-email-mariusz.dabrowski@intel.com \
    --to=mariusz.dabrowski@intel.com \
    --cc=jes.sorensen@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    /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).