linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] imsm: set generation number when reading superblock
@ 2016-12-08 11:12 Mariusz Dabrowski
  2016-12-12 19:25 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Mariusz Dabrowski @ 2016-12-08 11:12 UTC (permalink / raw)
  To: linux-raid; +Cc: jes.sorensen, Mariusz Dabrowski

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] imsm: set generation number when reading superblock
  2016-12-08 11:12 [PATCH] imsm: set generation number when reading superblock Mariusz Dabrowski
@ 2016-12-12 19:25 ` Jes Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2016-12-12 19:25 UTC (permalink / raw)
  To: Mariusz Dabrowski; +Cc: linux-raid

Mariusz Dabrowski <mariusz.dabrowski@intel.com> writes:
> 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(+)

Applied!

Thanks,
Jes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-12 19:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08 11:12 [PATCH] imsm: set generation number when reading superblock Mariusz Dabrowski
2016-12-12 19:25 ` Jes Sorensen

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).