linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] imsm:FIX: change arrays reshape order
@ 2011-01-31  8:59 Adam Kwolek
  2011-01-31  8:59 ` [PATCH 2/2] imsm: Update metadata for second array Adam Kwolek
  2011-01-31  9:18 ` [PATCH 1/2] imsm:FIX: change arrays reshape order NeilBrown
  0 siblings, 2 replies; 9+ messages in thread
From: Adam Kwolek @ 2011-01-31  8:59 UTC (permalink / raw)
  To: neilb; +Cc: linux-raid, dan.j.williams, ed.ciechanowski, wojciech.neubauer

Reshape is started from second array, so it causes imsm incompatibility
and problems during second array start.

Reshape should be started in arrays metadata order.

Signed-off-by: Adam Kwolek <adam.kwolek@intel.com>
---

 super-intel.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index f578057..8484df6 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5848,6 +5848,7 @@ static int apply_reshape_container_disks_update(struct imsm_update_reshape *u,
 	int devices_to_reshape = 1;
 	struct imsm_super *mpb = super->anchor;
 	int ret_val = 0;
+	unsigned int dev_id;
 
 	dprintf("imsm: imsm_process_update() for update_reshape\n");
 
@@ -5877,11 +5878,17 @@ static int apply_reshape_container_disks_update(struct imsm_update_reshape *u,
 		" mpb->num_raid_devs = %i\n", mpb->num_raid_devs);
 	/* manage changes in volume
 	 */
-	for (id = super->devlist ; id; id = id->next) {
+	for (dev_id = 0; dev_id < mpb->num_raid_devs; dev_id++) {
 		void **sp = *space_list;
 		struct imsm_dev *newdev;
 		struct imsm_map *newmap, *oldmap;
 
+		for (id = super->devlist ; id; id = id->next) {
+			if (id->index == dev_id)
+				break;
+		}
+		if (id == NULL)
+			break;
 		if (!sp)
 			continue;
 		*space_list = *sp;


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

end of thread, other threads:[~2011-01-31 23:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-31  8:59 [PATCH 1/2] imsm:FIX: change arrays reshape order Adam Kwolek
2011-01-31  8:59 ` [PATCH 2/2] imsm: Update metadata for second array Adam Kwolek
2011-01-31  9:19   ` NeilBrown
2011-01-31  9:28     ` Kwolek, Adam
2011-01-31 23:23       ` NeilBrown
2011-01-31  9:18 ` [PATCH 1/2] imsm:FIX: change arrays reshape order NeilBrown
2011-01-31  9:30   ` Kwolek, Adam
2011-01-31 10:10     ` Kwolek, Adam
2011-01-31 23:18       ` NeilBrown

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